README update and fixes while writing readme

master
nzkarit 6 years ago
parent a8cf3da745
commit 6a9cf210bb

@ -105,10 +105,8 @@ def manyPlanes(arguments):
row['longitude'] = float(row['longitude'])
if not 'altitude' in row.keys():
row['altitude'] = arguments.altitude
print('here')
else:
row['altitude'] = float(row['altitude'])
print('there')
if not 'capability' in row.keys():
row['capability'] = arguments.capability
if not 'typecode' in row.keys():
@ -123,7 +121,6 @@ def manyPlanes(arguments):
row['surface'] = arguments.surface
logger.debug('Row from CSV: %s' % (row))
modes = ModeS()
print(row['altitude'])
(df17_even, df17_odd) = modes.df17_pos_rep_encode(row['capability'], row['icao'], row['typecode'], row['surveillancestatus'], row['nicsupplementb'], row['altitude'], row['time'], row['latitude'], row['longitude'], row['surface'])
ppm = PPM()

@ -11,7 +11,7 @@ def auto_int(x):
return int(x, 0)
def argParser():
description = 'This script will take a FR24 CSV file and convert it into a format for ADSB_Encoder.py'
description = 'This script will take a FR24 CSV file and convert it into a format for FR24csv.py'
parser = argparse.ArgumentParser(description=description)
parser.add_argument('-i', '--icao', action='store', type=auto_int, dest='icao', default=cfg.get('plane', 'icao'), help='The ICAO number for the plane in hex. Ensure the ICAO is prefixed with \'0x\' to ensure this is parsed as a hex number. This is 24 bits long. Default: %(default)s')
parser.add_argument('--csv', '--csvfile', '--in', '--input', action='store', type=str, dest='csvfile', help='The name of the FR24 CSV file', required=True)

@ -103,6 +103,26 @@ These CSV files can be used for input into the application
## generateAllICAO.py
This script will generate a CSV with all the different ICAO numbers in it.
# Import FlightRadar24 CSV files
This script will take a FR24 CSV files and convert it ready for import into ADSB_Encoder.py. It outputs a file called fr24.csv.
```
$ ./FR24csv.py --csv <exportFromFR24.csv>
$ ./ADSB_Encoder.py --csv fr24.csv
$ ./FR24csv.py --help
usage: FR24csv.py [-h] [-i ICAO] --csv CSVFILE
This script will take a FR24 CSV file and convert it into a format for
FR24csv.py
optional arguments:
-h, --help show this help message and exit
-i ICAO, --icao ICAO The ICAO number for the plane in hex. Ensure the ICAO
is prefixed with '0x' to ensure this is parsed as a
hex number. This is 24 bits long. Default: 0x75008F
--csv CSVFILE, --csvfile CSVFILE, --in CSVFILE, --input CSVFILE
The name of the FR24 CSV file
```
# References
1. "*Gr-Air-Modes*", **Nick Foster**, 2012
1. "*EXPLOITING THE AUTOMATIC DEPENDENT SURVEILLANCE BROADCAST SYSTEM VIA FALSE TARGET INJECTION*", **Domenic Magazu III**, 2012

Loading…
Cancel
Save