소스 검색

do not double optimize the speed until IAF two times

Sven Czarnian 3 년 전
부모
커밋
9f6c9f1ff8
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      aman/types/Inbound.py

+ 1 - 3
aman/types/Inbound.py

@@ -31,10 +31,8 @@ class Inbound:
         flightTime, flightTimeUntilIaf, trackmiles = self.secondsUntilTouchdown(weatherModel)
 
         # calculate the maximum time to gain (assumption: 10% speed increase by acceleration and shortcuts)
-        avgSpeed = self.Report.distanceToIAF / (float(flightTimeUntilIaf.seconds) / 3600.0)
-        self.MaximumTimeToGain = flightTimeUntilIaf - timedelta(minutes = (self.Report.distanceToIAF / (avgSpeed * 1.1)) * 60)
         avgSpeed = trackmiles / (float(flightTime.seconds) / 3600.0)
-        self.MaximumTimeToGain += flightTime - timedelta(minutes = (trackmiles / (avgSpeed * 1.1)) * 60)
+        self.MaximumTimeToGain = flightTime - timedelta(minutes = (trackmiles / (avgSpeed * 1.1)) * 60)
 
         # calculate the different arrival times
         self.InitialArrivalTime = self.ReportTime + flightTime