From 2b65d2f8001b66374bbd603b8bb416cbd9b1963a Mon Sep 17 00:00:00 2001 From: Raffson Date: Sun, 21 Jul 2024 21:39:24 +0200 Subject: [PATCH] Always use altitude in GroundSpeed.for_flight --- game/ato/traveltime.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game/ato/traveltime.py b/game/ato/traveltime.py index 118ddda4..d3784d74 100644 --- a/game/ato/traveltime.py +++ b/game/ato/traveltime.py @@ -3,7 +3,7 @@ from __future__ import annotations from datetime import datetime from typing import TYPE_CHECKING -from game.utils import Distance, SPEED_OF_SOUND_AT_SEA_LEVEL, Speed, mach, meters +from game.utils import Distance, SPEED_OF_SOUND_AT_SEA_LEVEL, Speed, mach if TYPE_CHECKING: from .flight import Flight @@ -31,7 +31,7 @@ class GroundSpeed: # might. be sufficient given the wiggle room. We can come up with # another heuristic if needed. cruise_mach = max_speed.mach() * (0.7 if flight.is_helo else 0.85) - return mach(cruise_mach, altitude if not flight.is_helo else meters(0)) + return mach(cruise_mach, altitude) # TODO: Most if not all of this should move into FlightPlan.