Browse Source

fix different interpretations of the freezed index

Sven Czarnian 3 years ago
parent
commit
1bf7d850eb
1 changed files with 3 additions and 2 deletions
  1. 3 2
      aman/sys/RecedingHorizonControl.py

+ 3 - 2
aman/sys/RecedingHorizonControl.py

@@ -73,7 +73,8 @@ class RecedingHorizonControl:
             plannedInbound.ReportTime = inbound.ReportTime
             plannedInbound.CurrentPosition = inbound.CurrentPosition
             # ingore fixed updates
-            if True == plannedInbound.FixedSequence or index < self.FreezedIndex:
+            if True == plannedInbound.FixedSequence or index <= self.FreezedIndex:
+                plannedInbound.FixedSequence = True
                 return
             plannedInbound.WTC = inbound.WTC
 
@@ -167,7 +168,7 @@ class RecedingHorizonControl:
         if 0 != offsetCorrection:
             for callsign in self.AssignedWindow:
                 self.AssignedWindow[callsign][0] -= offsetCorrection
-                if self.AssignedWindow[callsign][0] < self.FreezedIndex:
+                if self.AssignedWindow[callsign][0] <= self.FreezedIndex:
                     self.Windows[self.AssignedWindow[callsign][0]].inbound(callsign).FixedSequence = True
 
         # delete the non-updated aircrafts and increase the missed-counter for later runs