define member variables with capital letters
This commit is contained in:
@@ -17,12 +17,12 @@ class AircraftPerformance:
|
||||
|
||||
aircraft = PerformanceData(key)
|
||||
|
||||
aircraft.speedAboveFL240 = config[key]['speedabovefl240']
|
||||
aircraft.rodAboveFL240 = config[key]['rodabovefl240']
|
||||
aircraft.speedAboveFL100 = config[key]['speedabovefl100']
|
||||
aircraft.rodAboveFL100 = config[key]['rodabovefl100']
|
||||
aircraft.speedBelowFL100 = config[key]['speedbelowfl100']
|
||||
aircraft.rodBelowFL100 = config[key]['rodbelowfl100']
|
||||
aircraft.speedApproach = config[key]['speedapproach']
|
||||
aircraft.SpeedAboveFL240 = config[key]['speedabovefl240']
|
||||
aircraft.RodAboveFL240 = config[key]['rodabovefl240']
|
||||
aircraft.SpeedAboveFL100 = config[key]['speedabovefl100']
|
||||
aircraft.RodAboveFL100 = config[key]['rodabovefl100']
|
||||
aircraft.SpeedBelowFL100 = config[key]['speedbelowfl100']
|
||||
aircraft.RodBelowFL100 = config[key]['rodbelowfl100']
|
||||
aircraft.SpeedApproach = config[key]['speedapproach']
|
||||
|
||||
self.Aircrafts[aircraft.icao] = aircraft
|
||||
self.Aircrafts[aircraft.Icao] = aircraft
|
||||
|
||||
@@ -43,7 +43,7 @@ class Airport:
|
||||
if None == planning.get('arrivalspacingdefault'):
|
||||
sys.stderr.write('No "arrivalspacingdefault" entry found!')
|
||||
sys.exit(-1)
|
||||
if not icao in self.GngData.runways:
|
||||
if not icao in self.GngData.Runways:
|
||||
sys.stderr.write('Unable to find' + icao + 'in the SCT data!')
|
||||
sys.exit(-1)
|
||||
|
||||
@@ -77,8 +77,8 @@ class Airport:
|
||||
sys.exit(-1)
|
||||
|
||||
found = False
|
||||
for runway in self.GngData.runways[icao]:
|
||||
if ident == runway.name:
|
||||
for runway in self.GngData.Runways[icao]:
|
||||
if ident == runway.Name:
|
||||
sequence = RunwaySequencing(runway)
|
||||
sequence.Spacing = spacings[ident]
|
||||
self.DefaultSequencing.activateRunway(sequence)
|
||||
@@ -103,9 +103,13 @@ class Airport:
|
||||
for i in range(0, len(dependencies), 2):
|
||||
self.DefaultSequencing.addDependency(dependencies[i], dependencies[i + 1])
|
||||
|
||||
def __init__(self, filepath : str, icao : str):
|
||||
self.arrivalRoutes = {}
|
||||
def parseConstraints(self, icao : str, planning):
|
||||
for key in planning:
|
||||
if True == key.startswith('constraints'):
|
||||
star = key.replace('constraints', '').upper()
|
||||
#print(star)
|
||||
|
||||
def __init__(self, filepath : str, icao : str):
|
||||
config = configparser.ConfigParser()
|
||||
config.read(filepath)
|
||||
|
||||
@@ -153,5 +157,6 @@ class Airport:
|
||||
sys.exit(-1)
|
||||
self.GaforId = dataConfig['gaforid']
|
||||
|
||||
# get the default sequencing data
|
||||
# get the default sequencing data and constraints
|
||||
self.parseDefaultSequencingConfiguration(icao, planningConfig)
|
||||
self.parseConstraints(icao, planningConfig)
|
||||
|
||||
@@ -13,14 +13,14 @@ class AirportSequencing:
|
||||
|
||||
def activateRunway(self, runway : RunwaySequencing):
|
||||
for active in self.ActiveArrivalRunways:
|
||||
if active.Runway.name == runway.Runway.name:
|
||||
self.ActiveArrivalRunways[runway.Runway.name] = runway
|
||||
if active.Runway.Name == runway.Runway.Name:
|
||||
self.ActiveArrivalRunways[runway.Runway.Name] = runway
|
||||
return
|
||||
self.ActiveArrivalRunways.append(runway)
|
||||
|
||||
def runwayIndex(self, identifier : str):
|
||||
for i in range(0, len(self.ActiveArrivalRunways)):
|
||||
if self.ActiveArrivalRunways[i].Runway.name == identifier:
|
||||
if self.ActiveArrivalRunways[i].Runway.Name == identifier:
|
||||
return i
|
||||
return -1
|
||||
|
||||
@@ -70,7 +70,7 @@ class AirportSequencing:
|
||||
|
||||
def findRunway(self, identifier : str):
|
||||
for runway in self.ActiveArrivalRunways:
|
||||
if runway.Runway.name == identifier:
|
||||
if runway.Runway.Name == identifier:
|
||||
return runway
|
||||
return None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user