define member variables with capital letters

This commit is contained in:
Sven Czarnian
2021-10-13 12:52:29 +02:00
parent 9d69a60396
commit 1e043e2765
15 changed files with 229 additions and 223 deletions

View File

@@ -39,7 +39,7 @@ class Inbound:
distance = 100000.0
currentPosition = Waypoint('', self.Report.position.latitude, self.Report.position.longitude)
for runway in sequencingConfig.ActiveArrivalRunways:
candidateDistance = runway.Runway.start.haversine(currentPosition)
candidateDistance = runway.Runway.Start.haversine(currentPosition)
if distance > candidateDistance:
self.PlannedRunway = runway
distance = candidateDistance
@@ -49,11 +49,11 @@ class Inbound:
if None == self.PlannedRunway:
return
for arrivalRunway in navData.arrivalRoutes:
if arrivalRunway == self.PlannedRunway.Runway.name:
stars = navData.arrivalRoutes[arrivalRunway]
for arrivalRunway in navData.ArrivalRoutes:
if arrivalRunway == self.PlannedRunway.Runway.Name:
stars = navData.ArrivalRoutes[arrivalRunway]
for star in stars:
if 0 != len(star.route) and self.Report.initialApproachFix == star.iaf.name:
if 0 != len(star.Route) and self.Report.initialApproachFix == star.Iaf.Name:
self.PlannedStar = star
return
@@ -63,14 +63,14 @@ class Inbound:
# calculate remaining trackmiles
remainingDistanceNM = self.Report.distanceToIAF
start = self.PlannedStar.route[0]
for i in range(1, len(self.PlannedStar.route)):
remainingDistanceNM += start.haversine(self.PlannedStar.route[i]) * 0.539957
start = self.PlannedStar.route[i]
start = self.PlannedStar.Route[0]
for i in range(1, len(self.PlannedStar.Route)):
remainingDistanceNM += start.haversine(self.PlannedStar.Route[i]) * 0.539957
start = self.PlannedStar.Route[i]
# calculate descend profile
flightTimeSeconds = 0
currentHeading = Waypoint('', self.Report.position.latitude, self.Report.position.longitude).bearing(self.PlannedStar.route[0])
currentHeading = Waypoint('', self.Report.position.latitude, self.Report.position.longitude).bearing(self.PlannedStar.Route[0])
distanceToWaypoint = self.Report.distanceToIAF
nextWaypointIndex = 0
currentPosition = [ self.Report.dynamics.altitude, self.Report.dynamics.groundSpeed ]
@@ -105,7 +105,7 @@ class Inbound:
distanceToWaypoint -= abs(lastDistance - remainingDistanceNM)
if 0 >= distanceToWaypoint:
nextWaypointIndex += 1
if nextWaypointIndex < len(self.PlannedStar.route):
currentHeading = self.PlannedStar.route[nextWaypointIndex - 1].bearing(self.PlannedStar.route[nextWaypointIndex])
if nextWaypointIndex < len(self.PlannedStar.Route):
currentHeading = self.PlannedStar.Route[nextWaypointIndex - 1].bearing(self.PlannedStar.Route[nextWaypointIndex])
return timedelta(seconds = flightTimeSeconds)