add more information to the arrival waypoints

This commit is contained in:
Sven Czarnian
2021-11-13 09:46:43 +01:00
parent 8c703c13a1
commit 75224a1952
2 changed files with 12 additions and 0 deletions

View File

@@ -5,6 +5,9 @@ class ArrivalWaypoint():
self.Waypoint = None self.Waypoint = None
self.FlightTime = None self.FlightTime = None
self.Trackmiles = None self.Trackmiles = None
self.IndicatedAirspeed = None
self.GroundSpeed = None
self.Altitude = None
self.ETA = None self.ETA = None
self.PTA = None self.PTA = None
@@ -19,6 +22,12 @@ class ArrivalWaypoint():
self.PTA = value self.PTA = value
elif 'trackmiles' == key.lower(): elif 'trackmiles' == key.lower():
self.Trackmiles = value self.Trackmiles = value
elif 'altitude' == key.lower():
self.Altitude = value
elif 'groundspeed' == key.lower():
self.GroundSpeed = value
elif 'indicated' == key.lower():
self.IndicatedAirspeed = value
else: else:
raise Exception('Invalid constructor argument: ' + key) raise Exception('Invalid constructor argument: ' + key)

View File

@@ -191,6 +191,9 @@ class Inbound:
arrivalRoute[-1].FlightTime = timedelta(seconds = flightTimeSeconds) arrivalRoute[-1].FlightTime = timedelta(seconds = flightTimeSeconds)
arrivalRoute[-1].ETA = self.ReportTime + arrivalRoute[-1].FlightTime arrivalRoute[-1].ETA = self.ReportTime + arrivalRoute[-1].FlightTime
arrivalRoute[-1].PTA = arrivalRoute[-1].ETA arrivalRoute[-1].PTA = arrivalRoute[-1].ETA
arrivalRoute[-1].Altitude = currentPosition[0]
arrivalRoute[-1].IndicatedAirspeed = currentIAS
arrivalRoute[-1].GroundSpeed = currentPosition[1]
# check if a skip from base to final turn waypoints is needed # check if a skip from base to final turn waypoints is needed
if -1 != turnIndices[0] and nextWaypointIndex > turnIndices[0] and nextWaypointIndex < turnIndices[1]: if -1 != turnIndices[0] and nextWaypointIndex > turnIndices[0] and nextWaypointIndex < turnIndices[1]: