Explorar o código

minimize the TTL to provide realistic TTLs

Sven Czarnian %!s(int64=3) %!d(string=hai) anos
pai
achega
52aefd0966
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  1. 2 3
      aman/sys/aco/Node.py

+ 2 - 3
aman/sys/aco/Node.py

@@ -184,13 +184,12 @@ class Node:
                 # calculate average speed gain
                 avgSpeed = trackmiles / (flightTime.total_seconds() / 3600.0)
                 avgSpeedDecrease = avgSpeed * 0.80
-                avgSpeedIncrease = avgSpeed * 1.05
                 decreasedSpeedFlighttime = (trackmiles / avgSpeedDecrease) * 3600.0 # given in seconds
 
                 # calculate shortcut gain and add 15 miles for final and base turn
                 currentPosition = Waypoint(latitude = self.PredictedCoordinate[0], longitude = self.PredictedCoordinate[1])
-                shortcutDistance = currentPosition.haversine(identifier.Runway.Start) + 15.0
-                shortcutFlighttime = (shortcutDistance / avgSpeedIncrease) * 3600.0
+                shortcutDistance = currentPosition.haversine(identifier.Runway.Start) + 25.0
+                shortcutFlighttime = (shortcutDistance / avgSpeed) * 3600.0
                 if shortcutFlighttime > flightTime.total_seconds():
                     shortcutFlighttime = flightTime.total_seconds()