diff --git a/game/ato/traveltime.py b/game/ato/traveltime.py index f71cd9dd..a56943ca 100644 --- a/game/ato/traveltime.py +++ b/game/ato/traveltime.py @@ -18,6 +18,9 @@ class GroundSpeed: # on fuel, but mission speed will be fast enough to keep the flight # safer. + if flight.squadron.aircraft.cruise_speed is not None: + return mach(flight.squadron.aircraft.cruise_speed.mach(), altitude) + # DCS's max speed is in kph at 0 MSL. max_speed = flight.unit_type.max_speed if max_speed > SPEED_OF_SOUND_AT_SEA_LEVEL: diff --git a/game/dcs/aircrafttype.py b/game/dcs/aircrafttype.py index 09a0f228..ff34d0de 100644 --- a/game/dcs/aircrafttype.py +++ b/game/dcs/aircrafttype.py @@ -182,6 +182,9 @@ class AircraftType(UnitType[Type[FlyingType]]): #: planner will consider this aircraft usable for a mission. max_mission_range: Distance + #: Speed used for TOT calculations + cruise_speed: Optional[Speed] + fuel_consumption: Optional[FuelConsumption] default_livery: Optional[str] @@ -495,6 +498,9 @@ class AircraftType(UnitType[Type[FlyingType]]): patrol_altitude=patrol_config.altitude, patrol_speed=patrol_config.speed, max_mission_range=mission_range, + cruise_speed=knots(data["cruise_speed_kt_indicated"]) + if "cruise_speed_kt_indicated" in data + else None, fuel_consumption=fuel_consumption, default_livery=data.get("default_livery"), intra_flight_radio=radio_config.intra_flight, diff --git a/resources/units/aircraft/AH-64D_BLK_II.yaml b/resources/units/aircraft/AH-64D_BLK_II.yaml index 4f84a175..15f87b71 100644 --- a/resources/units/aircraft/AH-64D_BLK_II.yaml +++ b/resources/units/aircraft/AH-64D_BLK_II.yaml @@ -19,6 +19,7 @@ manufacturer: Boeing origin: USA price: 20 role: Attack +cruise_speed_kt_indicated: 120 variants: AH-64D Apache Longbow: {} radios: