|
@@ -136,27 +136,24 @@ class RecedingHorizonControl:
|
|
|
continue
|
|
|
|
|
|
node = Node(inbound, None, None, None, None)
|
|
|
- node.EstimatedTouchdownTime = inbound.PlannedArrivalTime
|
|
|
- node.EstimatedIafAltitude = inbound.PlannedArrivalRoute[0].Altitude
|
|
|
- node.EstimatedIafTime = inbound.PlannedArrivalRoute[0].PTA
|
|
|
|
|
|
if inbound.PlannedRunway.Name in runwayInbounds:
|
|
|
if None == runwayInbounds[inbound.PlannedRunway.Name] or runwayInbounds[inbound.PlannedRunway.Name].EstimatedTouchdownTime < node.EstimatedTouchdownTime:
|
|
|
runwayInbounds[inbound.PlannedRunway.Name] = node
|
|
|
|
|
|
- if inbound.PlannedArrivalRoute[0].Name in iafInbounds:
|
|
|
+ if inbound.PlannedArrivalRoute[0].Waypoint.Name in iafInbounds:
|
|
|
delta = 100000.0
|
|
|
targetLevel = None
|
|
|
- for level in iafInbounds[inbound.PlannedArrivalRoute[0].Name]:
|
|
|
+ for level in iafInbounds[inbound.PlannedArrivalRoute[0].Waypoint.Name]:
|
|
|
difference = abs(level - inbound.PlannedArrivalRoute[0].Altitude)
|
|
|
if difference < delta:
|
|
|
delta = difference
|
|
|
targetLevel = level
|
|
|
|
|
|
- if None == iafInbounds[inbound.PlannedArrivalRoute[0].Name][targetLevel]:
|
|
|
- iafInbounds[inbound.PlannedArrivalRoute[0].Name][targetLevel] = Node
|
|
|
- elif iafInbounds[inbound.PlannedArrivalRoute[0].Name][targetLevel].EstimatedIafTime < node.EstimatedIafTime:
|
|
|
- iafInbounds[inbound.PlannedArrivalRoute[0].Name][targetLevel] = Node
|
|
|
+ if None == iafInbounds[inbound.PlannedArrivalRoute[0].Waypoint.Name][targetLevel]:
|
|
|
+ iafInbounds[inbound.PlannedArrivalRoute[0].Waypoint.Name][targetLevel] = node
|
|
|
+ elif iafInbounds[inbound.PlannedArrivalRoute[0].Waypoint.Name][targetLevel].EstimatedIafTime < node.EstimatedIafTime:
|
|
|
+ iafInbounds[inbound.PlannedArrivalRoute[0].Waypoint.Name][targetLevel] = node
|
|
|
|
|
|
return runwayInbounds, iafInbounds
|
|
|
|