Преглед на файлове

add more information to the arrival waypoints

Sven Czarnian преди 3 години
родител
ревизия
75224a1952
променени са 2 файла, в които са добавени 12 реда и са изтрити 0 реда
  1. 9 0
      aman/types/ArrivalWaypoint.py
  2. 3 0
      aman/types/Inbound.py

+ 9 - 0
aman/types/ArrivalWaypoint.py

@@ -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)
 

+ 3 - 0
aman/types/Inbound.py

@@ -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]: