minimize the TTL to provide realistic TTLs
This commit is contained in:
		| @@ -184,13 +184,12 @@ class Node: | |||||||
|                 # calculate average speed gain |                 # calculate average speed gain | ||||||
|                 avgSpeed = trackmiles / (flightTime.total_seconds() / 3600.0) |                 avgSpeed = trackmiles / (flightTime.total_seconds() / 3600.0) | ||||||
|                 avgSpeedDecrease = avgSpeed * 0.80 |                 avgSpeedDecrease = avgSpeed * 0.80 | ||||||
|                 avgSpeedIncrease = avgSpeed * 1.05 |  | ||||||
|                 decreasedSpeedFlighttime = (trackmiles / avgSpeedDecrease) * 3600.0 # given in seconds |                 decreasedSpeedFlighttime = (trackmiles / avgSpeedDecrease) * 3600.0 # given in seconds | ||||||
|  |  | ||||||
|                 # calculate shortcut gain and add 15 miles for final and base turn |                 # calculate shortcut gain and add 15 miles for final and base turn | ||||||
|                 currentPosition = Waypoint(latitude = self.PredictedCoordinate[0], longitude = self.PredictedCoordinate[1]) |                 currentPosition = Waypoint(latitude = self.PredictedCoordinate[0], longitude = self.PredictedCoordinate[1]) | ||||||
|                 shortcutDistance = currentPosition.haversine(identifier.Runway.Start) + 15.0 |                 shortcutDistance = currentPosition.haversine(identifier.Runway.Start) + 25.0 | ||||||
|                 shortcutFlighttime = (shortcutDistance / avgSpeedIncrease) * 3600.0 |                 shortcutFlighttime = (shortcutDistance / avgSpeed) * 3600.0 | ||||||
|                 if shortcutFlighttime > flightTime.total_seconds(): |                 if shortcutFlighttime > flightTime.total_seconds(): | ||||||
|                     shortcutFlighttime = flightTime.total_seconds() |                     shortcutFlighttime = flightTime.total_seconds() | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user