|
@@ -25,6 +25,14 @@ class Node:
|
|
|
return star
|
|
|
return None
|
|
|
|
|
|
+ def updateArrivalWaypoint(self, arrivalRoute, flightTime, altitude, indicatedAirspeed, groundSpeed):
|
|
|
+ arrivalRoute[-1].FlightTime = timedelta(seconds = flightTime)
|
|
|
+ arrivalRoute[-1].ETA = self.PredictionTime + arrivalRoute[-1].FlightTime
|
|
|
+ arrivalRoute[-1].PTA = arrivalRoute[-1].ETA
|
|
|
+ arrivalRoute[-1].Altitude = altitude
|
|
|
+ arrivalRoute[-1].IndicatedAirspeed = indicatedAirspeed
|
|
|
+ arrivalRoute[-1].GroundSpeed = groundSpeed
|
|
|
+
|
|
|
def arrivalEstimation(self, runway : Runway, star : ArrivalRoute, weather : WeatherModel):
|
|
|
|
|
|
trackmiles = self.PredictedDistanceToIAF
|
|
@@ -113,6 +121,7 @@ class Node:
|
|
|
|
|
|
flightTimeSeconds += 10
|
|
|
if flownDistance >= trackmiles:
|
|
|
+ self.updateArrivalWaypoint(arrivalRoute, flightTimeSeconds, currentPosition[0], currentIAS, currentPosition[1])
|
|
|
break
|
|
|
|
|
|
|
|
@@ -120,12 +129,7 @@ class Node:
|
|
|
lastWaypointIndex = nextWaypointIndex
|
|
|
nextWaypointIndex += 1
|
|
|
|
|
|
- arrivalRoute[-1].FlightTime = timedelta(seconds = flightTimeSeconds)
|
|
|
- arrivalRoute[-1].ETA = self.PredictionTime + arrivalRoute[-1].FlightTime
|
|
|
- arrivalRoute[-1].PTA = arrivalRoute[-1].ETA
|
|
|
- arrivalRoute[-1].Altitude = currentPosition[0]
|
|
|
- arrivalRoute[-1].IndicatedAirspeed = currentIAS
|
|
|
- arrivalRoute[-1].GroundSpeed = currentPosition[1]
|
|
|
+ self.updateArrivalWaypoint(arrivalRoute, flightTimeSeconds, currentPosition[0], currentIAS, currentPosition[1])
|
|
|
|
|
|
|
|
|
if -1 != turnIndices[0] and nextWaypointIndex > turnIndices[0] and nextWaypointIndex < turnIndices[1]:
|