Adding generateAllLat and also some bug fixes to make the generation work properly

This commit is contained in:
nzkarit
2018-05-06 11:20:24 +12:00
parent 3c618b9e1b
commit 8b51c15ce1
4 changed files with 89 additions and 5 deletions

View File

@@ -90,13 +90,15 @@ def manyPlanes(arguments):
for i in range(0, arguments.repeats):
with open(arguments.csvfile, newline='') as csvfile:
reader = csv.DictReader(csvfile, delimiter=',')
for row in reader:
for row in reader:
if not 'icao' in row.keys():
row['icao'] = arguments.icao
else:
row['icao'] = int(row['icao'], 0)
if not 'latitude' in row.keys():
row['latitude'] = arguments.latitude
else:
row['latitude'] = float(row['latitude'])
if not 'longitude' in row.keys():
row['longitude'] = arguments.longitude
if not 'altitude' in row.keys():