mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Always use altitude in GroundSpeed.for_flight
This commit is contained in:
parent
7ea1569f22
commit
2b65d2f800
@ -3,7 +3,7 @@ from __future__ import annotations
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import TYPE_CHECKING
|
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:
|
if TYPE_CHECKING:
|
||||||
from .flight import Flight
|
from .flight import Flight
|
||||||
@ -31,7 +31,7 @@ class GroundSpeed:
|
|||||||
# might. be sufficient given the wiggle room. We can come up with
|
# might. be sufficient given the wiggle room. We can come up with
|
||||||
# another heuristic if needed.
|
# another heuristic if needed.
|
||||||
cruise_mach = max_speed.mach() * (0.7 if flight.is_helo else 0.85)
|
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.
|
# TODO: Most if not all of this should move into FlightPlan.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user