add the IAF spacing constraint to the arrival estimation
This commit is contained in:
@@ -141,6 +141,41 @@ class RunwayManager:
|
|||||||
lostTime = delta
|
lostTime = delta
|
||||||
eta = candidate
|
eta = candidate
|
||||||
|
|
||||||
|
# find the corresponding IAF
|
||||||
|
iaf = node.ArrivalCandidates[selectedRunway.Name].ArrivalRoute[0].Waypoint.Name
|
||||||
|
if iaf in self.IafInbounds:
|
||||||
|
delta = 100000.0
|
||||||
|
targetLevel = None
|
||||||
|
|
||||||
|
# find the planned level
|
||||||
|
for level in self.IafInbounds[iaf]:
|
||||||
|
difference = abs(level - node.ArrivalCandidates[selectedRunway.Name].ArrivalRoute[0].Altitude)
|
||||||
|
if difference < delta:
|
||||||
|
delta = difference
|
||||||
|
targetLevel = level
|
||||||
|
|
||||||
|
if targetLevel in self.IafInbounds[iaf]:
|
||||||
|
# check if we have to lose time to ensure the IAF spacing
|
||||||
|
# the function assumes that model allows only TTG during flight to IAF
|
||||||
|
if None != self.IafInbounds[iaf][targetLevel]:
|
||||||
|
if None != self.IafInbounds[iaf][targetLevel].Inbound.PlannedArrivalRoute:
|
||||||
|
# ETA at IAF of preceeding traffic
|
||||||
|
plannedDelta = self.IafInbounds[iaf][targetLevel].Inbound.PlannedArrivalTime - self.IafInbounds[iaf][targetLevel].Inbound.EnrouteArrivalTime
|
||||||
|
iafETAPreceeding = self.IafInbounds[iaf][targetLevel].Inbound.PlannedArrivalRoute[0].ETA + plannedDelta
|
||||||
|
|
||||||
|
# ETA at IAF of current inbound
|
||||||
|
plannedDelta = eta - node.Inbound.EnrouteArrivalTime
|
||||||
|
iafETACurrent = node.ArrivalCandidates[selectedRunway.Name].ArrivalRoute[0].ETA
|
||||||
|
|
||||||
|
# required time delte to ensure IAF spacing
|
||||||
|
timeSpacing = timedelta(hours = self.Configuration.AirportConfiguration.IafSpacing / node.ArrivalCandidates[selectedRunway.Name].ArrivalRoute[0].GroundSpeed)
|
||||||
|
|
||||||
|
# we are too close to preceeding traffic
|
||||||
|
currentTimeSpacing = iafETACurrent - iafETAPreceeding
|
||||||
|
if timeSpacing > currentTimeSpacing:
|
||||||
|
eta = eta + (timeSpacing - currentTimeSpacing)
|
||||||
|
lostTime += (timeSpacing - currentTimeSpacing)
|
||||||
|
|
||||||
return selectedRunway, eta, lostTime
|
return selectedRunway, eta, lostTime
|
||||||
|
|
||||||
def registerNode(self, node : Node, runway : str):
|
def registerNode(self, node : Node, runway : str):
|
||||||
|
|||||||
Reference in New Issue
Block a user