add more information to the arrival waypoints

This commit is contained in:
Sven Czarnian
2021-11-13 09:46:43 +01:00
vanhempi 8c703c13a1
commit 75224a1952
2 muutettua tiedostoa jossa 12 lisäystä ja 0 poistoa

Näytä tiedosto

@@ -5,6 +5,9 @@ class ArrivalWaypoint():
self.Waypoint = None
self.FlightTime = None
self.Trackmiles = None
self.IndicatedAirspeed = None
self.GroundSpeed = None
self.Altitude = None
self.ETA = None
self.PTA = None
@@ -19,6 +22,12 @@ class ArrivalWaypoint():
self.PTA = value
elif 'trackmiles' == key.lower():
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:
raise Exception('Invalid constructor argument: ' + key)

Näytä tiedosto

@@ -191,6 +191,9 @@ class Inbound:
arrivalRoute[-1].FlightTime = timedelta(seconds = flightTimeSeconds)
arrivalRoute[-1].ETA = self.ReportTime + arrivalRoute[-1].FlightTime
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
if -1 != turnIndices[0] and nextWaypointIndex > turnIndices[0] and nextWaypointIndex < turnIndices[1]: