add the flight time until the IAF
This commit is contained in:
		| @@ -77,6 +77,7 @@ class Node: | ||||
|         currentPosition = [ self.Inbound.Report.dynamics.altitude, self.Inbound.Report.dynamics.groundSpeed ] | ||||
|         distanceToWaypoint = self.PredictedDistanceToIAF | ||||
|         flightTimeSeconds = 0 | ||||
|         flightTimeOnStarSeconds = 0 | ||||
|         nextWaypointIndex = 0 | ||||
|         flownDistance = 0.0 | ||||
|         arrivalRoute = [ ArrivalWaypoint(waypoint = star.Route[0], trackmiles = distanceToWaypoint) ] | ||||
| @@ -120,6 +121,8 @@ class Node: | ||||
|                 currentIAS = newIAS | ||||
|  | ||||
|             flightTimeSeconds += 10 | ||||
|             if flownDistance >= self.PredictedDistanceToIAF: | ||||
|                 flightTimeOnStarSeconds += 10 | ||||
|             if flownDistance >= trackmiles: | ||||
|                 self.updateArrivalWaypoint(arrivalRoute, flightTimeSeconds, currentPosition[0], currentIAS, currentPosition[1]) | ||||
|                 break | ||||
| @@ -143,7 +146,7 @@ class Node: | ||||
|  | ||||
|                     arrivalRoute.append(ArrivalWaypoint(waypoint = star.Route[nextWaypointIndex], trackmiles = arrivalRoute[-1].Trackmiles + distanceToWaypoint)) | ||||
|  | ||||
|         return timedelta(seconds = flightTimeSeconds), trackmiles, arrivalRoute | ||||
|         return timedelta(seconds = flightTimeSeconds), trackmiles, arrivalRoute, timedelta(seconds = flightTimeOnStarSeconds) | ||||
|  | ||||
|     def __init__(self, inbound : Inbound, referenceTime : datetime, weatherModel : WeatherModel, | ||||
|                  navData : SctEseFormat, sequencingConfig : AirportSequencing): | ||||
| @@ -179,7 +182,7 @@ class Node: | ||||
|             star = Node.findArrivalRoute(self.Inbound.Report.initialApproachFix, identifier.Runway, navData) | ||||
|  | ||||
|             if None != star: | ||||
|                 flightTime, trackmiles, arrivalRoute = self.arrivalEstimation(identifier.Runway, star, weatherModel) | ||||
|                 flightTime, trackmiles, arrivalRoute, flightTimeOnStar = self.arrivalEstimation(identifier.Runway, star, weatherModel) | ||||
|  | ||||
|                 # calculate average speed gain | ||||
|                 avgSpeed = trackmiles / (flightTime.total_seconds() / 3600.0) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user