fix two found crashes
This commit is contained in:
@@ -31,7 +31,6 @@ class RecedingHorizonControl:
|
|||||||
|
|
||||||
plannedInbound = self.Windows[index].inbound(inbound.Report.aircraft.callsign)
|
plannedInbound = self.Windows[index].inbound(inbound.Report.aircraft.callsign)
|
||||||
plannedInbound.CurrentPosition = inbound.CurrentPosition
|
plannedInbound.CurrentPosition = inbound.CurrentPosition
|
||||||
plannedInbound.MaximumTimeToGain = inbound.MaximumTimeToGain
|
|
||||||
plannedInbound.ArrivalCandidates = inbound.ArrivalCandidates
|
plannedInbound.ArrivalCandidates = inbound.ArrivalCandidates
|
||||||
|
|
||||||
# check if we need to update the inbound
|
# check if we need to update the inbound
|
||||||
|
|||||||
@@ -178,6 +178,6 @@ class Inbound:
|
|||||||
if nextWaypointIndex < len(star.Route):
|
if nextWaypointIndex < len(star.Route):
|
||||||
distanceToWaypoint = star.Route[lastWaypointIndex].haversine(star.Route[nextWaypointIndex]) * 0.539957
|
distanceToWaypoint = star.Route[lastWaypointIndex].haversine(star.Route[nextWaypointIndex]) * 0.539957
|
||||||
currentHeading = star.Route[lastWaypointIndex].bearing(star.Route[nextWaypointIndex])
|
currentHeading = star.Route[lastWaypointIndex].bearing(star.Route[nextWaypointIndex])
|
||||||
currentPosition[1] = min(weather.calculateGS(newAltitude, currentIAS, currentHeading), currentPosition[1])
|
currentPosition[1] = min(weather.calculateGS(currentPosition[0], currentIAS, currentHeading), currentPosition[1])
|
||||||
|
|
||||||
return timedelta(seconds = flightTimeSeconds), timedelta(seconds = flightTimeUntilIafSeconds), trackmiles
|
return timedelta(seconds = flightTimeSeconds), timedelta(seconds = flightTimeUntilIafSeconds), trackmiles
|
||||||
|
|||||||
Reference in New Issue
Block a user