Kaynağa Gözat

fix two found crashes

Sven Czarnian 3 yıl önce
ebeveyn
işleme
43589eaa35
2 değiştirilmiş dosya ile 1 ekleme ve 2 silme
  1. 0 1
      aman/sys/RecedingHorizonControl.py
  2. 1 1
      aman/types/Inbound.py

+ 0 - 1
aman/sys/RecedingHorizonControl.py

@@ -31,7 +31,6 @@ class RecedingHorizonControl:
 
             plannedInbound = self.Windows[index].inbound(inbound.Report.aircraft.callsign)
             plannedInbound.CurrentPosition = inbound.CurrentPosition
-            plannedInbound.MaximumTimeToGain = inbound.MaximumTimeToGain
             plannedInbound.ArrivalCandidates = inbound.ArrivalCandidates
 
             # check if we need to update the inbound

+ 1 - 1
aman/types/Inbound.py

@@ -178,6 +178,6 @@ class Inbound:
                 if nextWaypointIndex < len(star.Route):
                     distanceToWaypoint = star.Route[lastWaypointIndex].haversine(star.Route[nextWaypointIndex]) * 0.539957
                     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