mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Plan multiple CAP rounds per turn.
On station time for CAP is only 30 minutes, so plan three cycles to give ~90 minutes of CAP coverage. Default starting budget has increased significantly to account for the greatly increased aircraft needs on turn 1. Fixes https://github.com/Khopa/dcs_liberation/issues/673
This commit is contained in:
@@ -243,6 +243,11 @@ class FlightPlan:
|
||||
else:
|
||||
return timedelta(minutes=5)
|
||||
|
||||
@property
|
||||
def mission_departure_time(self) -> timedelta:
|
||||
"""The time that the mission is complete and the flight RTBs."""
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class LoiterFlightPlan(FlightPlan):
|
||||
@@ -356,6 +361,10 @@ class FormationFlightPlan(LoiterFlightPlan):
|
||||
GroundSpeed.for_flight(self.flight, self.hold.alt)
|
||||
)
|
||||
|
||||
@property
|
||||
def mission_departure_time(self) -> timedelta:
|
||||
return self.split_time
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class PatrollingFlightPlan(FlightPlan):
|
||||
@@ -406,6 +415,10 @@ class PatrollingFlightPlan(FlightPlan):
|
||||
def tot_waypoint(self) -> Optional[FlightWaypoint]:
|
||||
return self.patrol_start
|
||||
|
||||
@property
|
||||
def mission_departure_time(self) -> timedelta:
|
||||
return self.patrol_end_time
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class BarCapFlightPlan(PatrollingFlightPlan):
|
||||
@@ -678,6 +691,9 @@ class SweepFlightPlan(LoiterFlightPlan):
|
||||
GroundSpeed.for_flight(self.flight, self.hold.alt)
|
||||
)
|
||||
|
||||
def mission_departure_time(self) -> timedelta:
|
||||
return self.sweep_end_time
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class CustomFlightPlan(FlightPlan):
|
||||
@@ -708,6 +724,10 @@ class CustomFlightPlan(FlightPlan):
|
||||
self, waypoint: FlightWaypoint) -> Optional[timedelta]:
|
||||
return None
|
||||
|
||||
@property
|
||||
def mission_departure_time(self) -> timedelta:
|
||||
return self.package.time_over_target
|
||||
|
||||
|
||||
class FlightPlanBuilder:
|
||||
"""Generates flight plans for flights."""
|
||||
|
||||
Reference in New Issue
Block a user