|
@@ -128,13 +128,26 @@ def configuration(icao):
|
|
for runway in runways:
|
|
for runway in runways:
|
|
availableRunways.append(runway.Name);
|
|
availableRunways.append(runway.Name);
|
|
|
|
|
|
|
|
+ # get all IAFs of the airport
|
|
|
|
+ iafs = []
|
|
|
|
+ for runway in airport.Configuration.GngData.ArrivalRoutes:
|
|
|
|
+ for route in airport.Configuration.GngData.ArrivalRoutes[runway]:
|
|
|
|
+ found = False
|
|
|
|
+ for iaf in iafs:
|
|
|
|
+ if iaf['name'] == route.Iaf.Name:
|
|
|
|
+ found = True
|
|
|
|
+ break
|
|
|
|
+ if False == found:
|
|
|
|
+ iafs.append({ 'name' : route.Iaf.Name, 'lat' : route.Iaf.Coordinate[0], 'lon' : route.Iaf.Coordinate[1] })
|
|
|
|
+
|
|
dictionary = {
|
|
dictionary = {
|
|
'airport' : airport.Icao,
|
|
'airport' : airport.Icao,
|
|
'useShallShouldMay' : config.UseShallShouldMay,
|
|
'useShallShouldMay' : config.UseShallShouldMay,
|
|
'availableRunways' : availableRunways,
|
|
'availableRunways' : availableRunways,
|
|
'activeRunways' : config.ActiveArrivalRunways,
|
|
'activeRunways' : config.ActiveArrivalRunways,
|
|
'dependentRunways' : dependencies,
|
|
'dependentRunways' : dependencies,
|
|
- 'iafColorization' : airport.Configuration.IafColorization
|
|
|
|
|
|
+ 'iafColorization' : airport.Configuration.IafColorization,
|
|
|
|
+ 'iafs' : iafs
|
|
}
|
|
}
|
|
data = json.dumps(dictionary, ensure_ascii=True, cls=RunwaySequencingEncoder)
|
|
data = json.dumps(dictionary, ensure_ascii=True, cls=RunwaySequencingEncoder)
|
|
return Response(data, status=200, mimetype='application/json')
|
|
return Response(data, status=200, mimetype='application/json')
|