add more values for later plannings
This commit is contained in:
@@ -28,8 +28,17 @@ class Inbound:
|
|||||||
self.findArrivalRunway(sequencingConfig)
|
self.findArrivalRunway(sequencingConfig)
|
||||||
self.findArrivalRoute(navData)
|
self.findArrivalRoute(navData)
|
||||||
|
|
||||||
duration = self.secondsUntilTouchdown(weatherModel)
|
flightTime, flightTimeUntilIaf, trackmiles = self.secondsUntilTouchdown(weatherModel)
|
||||||
self.InitialArrivalTime = self.ReportTime + duration
|
|
||||||
|
# calculate the maximum time to gain (assumption: 10% speed increase by acceleration and shortcuts)
|
||||||
|
avgSpeed = self.Report.distanceToIAF / (float(flightTimeUntilIaf.seconds) / 3600.0)
|
||||||
|
self.MaximumTimeToGain = flightTimeUntilIaf - timedelta(minutes = (self.Report.distanceToIAF / (avgSpeed * 1.1)) * 60)
|
||||||
|
avgSpeed = trackmiles / (float(flightTime.seconds) / 3600.0)
|
||||||
|
self.MaximumTimeToGain += flightTime - timedelta(minutes = (trackmiles / (avgSpeed * 1.1)) * 60)
|
||||||
|
|
||||||
|
# calculate the different arrival times
|
||||||
|
self.InitialArrivalTime = self.ReportTime + flightTime
|
||||||
|
self.EarliestArrivalTime = self.InitialArrivalTime - self.MaximumTimeToGain
|
||||||
self.EstimatedArrivalTime = self.InitialArrivalTime
|
self.EstimatedArrivalTime = self.InitialArrivalTime
|
||||||
self.EstimatedStarEntryTime = None
|
self.EstimatedStarEntryTime = None
|
||||||
|
|
||||||
@@ -104,6 +113,7 @@ class Inbound:
|
|||||||
currentIAS = self.PerformanceData.ias(self.Report.dynamics.altitude, trackmiles)
|
currentIAS = self.PerformanceData.ias(self.Report.dynamics.altitude, trackmiles)
|
||||||
currentPosition = [ self.Report.dynamics.altitude, self.Report.dynamics.groundSpeed ]
|
currentPosition = [ self.Report.dynamics.altitude, self.Report.dynamics.groundSpeed ]
|
||||||
distanceToWaypoint = self.Report.distanceToIAF
|
distanceToWaypoint = self.Report.distanceToIAF
|
||||||
|
flightTimeUntilIafSeconds = 0
|
||||||
flightTimeSeconds = 0
|
flightTimeSeconds = 0
|
||||||
nextWaypointIndex = 0
|
nextWaypointIndex = 0
|
||||||
flownDistance = 0.0
|
flownDistance = 0.0
|
||||||
@@ -147,6 +157,8 @@ class Inbound:
|
|||||||
currentIAS = newIAS
|
currentIAS = newIAS
|
||||||
|
|
||||||
flightTimeSeconds += 10
|
flightTimeSeconds += 10
|
||||||
|
if flownDistance <= self.Report.distanceToIAF:
|
||||||
|
flightTimeUntilIafSeconds += 10
|
||||||
if flownDistance >= trackmiles:
|
if flownDistance >= trackmiles:
|
||||||
break
|
break
|
||||||
|
|
||||||
@@ -165,4 +177,4 @@ class Inbound:
|
|||||||
currentHeading = self.PlannedStar.Route[lastWaypointIndex].bearing(self.PlannedStar.Route[nextWaypointIndex])
|
currentHeading = self.PlannedStar.Route[lastWaypointIndex].bearing(self.PlannedStar.Route[nextWaypointIndex])
|
||||||
currentPosition[1] = min(weather.calculateGS(newAltitude, currentIAS, currentHeading), currentPosition[1])
|
currentPosition[1] = min(weather.calculateGS(newAltitude, currentIAS, currentHeading), currentPosition[1])
|
||||||
|
|
||||||
return timedelta(seconds = flightTimeSeconds)
|
return timedelta(seconds = flightTimeSeconds), timedelta(seconds = flightTimeUntilIafSeconds), trackmiles
|
||||||
|
|||||||
Reference in New Issue
Block a user