fix a system crash

This commit is contained in:
Sven Czarnian
2021-12-22 13:43:29 +01:00
parent 97c7173313
commit 8d196129f0

View File

@@ -138,7 +138,7 @@ class RecedingHorizonControl:
node = Node(inbound, None, None, None, None)
if inbound.PlannedRunway.Name in runwayInbounds:
if None == runwayInbounds[inbound.PlannedRunway.Name] or runwayInbounds[inbound.PlannedRunway.Name].EstimatedTouchdownTime < node.EstimatedTouchdownTime:
if None == runwayInbounds[inbound.PlannedRunway.Name] or runwayInbounds[inbound.PlannedRunway.Name].Inbound.PlannedArrivalTime < node.Inbound.PlannedArrivalTime:
runwayInbounds[inbound.PlannedRunway.Name] = node
if inbound.PlannedArrivalRoute[0].Waypoint.Name in iafInbounds:
@@ -152,7 +152,7 @@ class RecedingHorizonControl:
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:
elif iafInbounds[inbound.PlannedArrivalRoute[0].Waypoint.Name][targetLevel].Inbound.PlannedArrivalTime < node.Inbound.PlannedArrivalTime:
iafInbounds[inbound.PlannedArrivalRoute[0].Waypoint.Name][targetLevel] = node
return runwayInbounds, iafInbounds