41 Commits

Author SHA1 Message Date
Raffson
6c210c9d15
Fine-tuning stuff for 'SEAD Sweep' 2023-07-03 00:38:50 +02:00
Raffson
db038ecdea
Add SEAD Sweep flight plan
Reintroduce legacy SEAD Escort flight plan, but under a separate type because it didn't really escort the primary flight...
2023-07-02 16:53:55 +02:00
MetalStormGhost
6e37cadb84
Settings doctrine page + streamlining (#156)
* Added a separate Doctrine page in settings with the following new options:
- Minimum number of aircraft for autoplanner to plan OCA packages against
- Airbase threat range (nmi)
- TARCAP threat buffer distance (nmi)
- AEW&C threat buffer distance (nmi)
- Theater tanker threat buffer distance (nmi)

Implemented handling for the OPFOR autoplanner aggressiveness in objectivefinder.py vulnerable_control_points().

* * Added three new options in Settings:
- Autoplanner plans refueling flights for Strike packages
- Autoplanner plans refueling flights for OCA packages
- Autoplanner plans refueling flights for DEAD packages

Fixed a bug in faction.py where F-16Ds were not correctly removed from the faction when the F-16I/F-16D mod was not selected.

* Renamed Maximum frontline length -> Maximum frontline width.
2023-07-01 23:54:27 +02:00
Raffson
5818367f2e
Fine-tune SEAD search point 2023-06-17 21:28:33 +02:00
Raffson
c559d6e2be
Follow-up on flight TOT offset 2023-06-04 01:50:46 +02:00
Dan Albert
7a57bd3ee0
Save the TOT offset in the flight plan.
Prep work for exposing this to the UI.
2023-06-04 00:31:38 +02:00
Raffson
bbf8e69659
Split Anti-Ship from BAI 2023-06-03 19:04:37 +02:00
Raffson
198ff7d8a3
Allow deletion of certain types of waypoints
Resolves #60
NAV/REFUEL/DIVERT waypoints should have no effect on the timings.
2023-05-29 00:11:27 +02:00
Raffson
fad48ebaed
Improve AI SEAD capabilities 2023-04-15 20:44:57 +02:00
Raffson
cebcee8d32
Tweak STRIKE ingress tasks
Use carpet-bombing instead, combine all tasks to better support guided/unguided attacks
2023-03-12 14:47:35 +01:00
Raffson
843bb30b99
Improve (SEAD) Escort tasking
- Always use holding point when it's a formation attack FP
- More accurate index for SPLIT wpt in triggered action

cleanup
2023-03-05 23:44:30 +01:00
Raffson
a98c9ffe8d
When using 'isinstance', TYPE_CHECKING is NOT ENOUGH!!! 2023-02-02 21:33:54 +01:00
Raffson
e87621576d
Add CTLD zones to AOD campaign + version bump 2023-01-23 19:31:28 +01:00
Raffson
531625ff08
Designated CTLD zones for ControlPoints (AB/FOB/FARP)
Resolves #46
2023-01-21 00:24:42 +01:00
MetalStormGhost
48ba8ff255
Fixed a FrontLine import bug in flightplanbuilder.py (#72)
Restored the default patrol duration handling in PackageRefuelingFlightPlan. Desired tanker on-station time will now only apply to TheaterRefuelingFlightPlan.
2023-01-07 13:54:30 +01:00
MetalStormGhost
01ee24c8cf
Configurable tanker on-station time (#69) 2023-01-06 20:11:24 +01:00
Raffson
df642fe7a1
Set altitude for assault waypoint if Hercules 2023-01-02 18:58:45 +01:00
Raffson
c37c56c879
Air Assault for C-130 mod
Resolves #49
2022-12-27 21:51:14 +01:00
Raffson
568fd35ddc
Fix CAS' landing WPT 2022-12-03 16:31:03 +01:00
Raffson
ae561e5564
Remove 'initial' wpt from STRIKE 2022-12-02 21:37:08 +01:00
Dan Albert
f5ef509af6
Fix drop zone display for air assault.
Troops must be dropped inside this zone or they won't attack the target.
The zone needs to be drawn in the map so players don't break the flight
plan by accidentally moving the drop waypoint outside the DZ.

I've move the API for doing this out of `PatrollingFlightPlan` in favor
of a mixin so this is no longer presented as `engagement_distance` by
the flight plan. I don't love that it's still the `commit-boundary`
endpoint, but it's fine for now.

I don't know why mypy wasn't able to catch this. pycharm is also
struggling to understand this class.
2022-11-26 15:18:41 +01:00
Dan Albert
219b52fc12
Fix adding and removing waypoints in the UI.
This moves more of the logic out of the UI so mypy can actually spot
these mistakes more often.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2495.
2022-11-20 16:07:01 +01:00
Dan Albert
9a73a10a09
Remove refueling from sweep flights.
The timing for these doesn't work. Sweep RTBs at the same time the
package reaches its TOT. The tanker won't be on station until 1m30s
before the package reaches the refueling point.
2022-11-20 16:07:01 +01:00
Dan Albert
6ff3a34c14
Fix layout for TARCAP, Escort, and strike-like.
If there's a refuel point, nav from that, not from the patrol end/split.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1749.
2022-11-20 16:07:01 +01:00
Dan Albert
0499ded1b3
Clarify AirAssault flight plan method name.
`engagement_distance` is used elsewhere to mean commit distance, so this
looked like a bug when I stumbled across it. Rename it to be more
explicit.
2022-11-20 16:07:00 +01:00
RndName
b49562f4bc
Airlift & AirAssault updates from Liberation
Cleanup and reword refuel waypoints

- rename Stopover back to CargoStop
- precise some waypoint naming

Cleanup and refine airlift and airassault waypoints

- Drop Off and Pickup now correctly worded
- Helo waypoints now represent LandingZones for pickup and dropoff

Forbid planes from air assault.

Make air assault drop-off non-optional.

There is always a drop-off location for troops.

Add docs explaining what the assault area is.

Add error handling for cargo drop waypoints.

Document some airlift waypoint behavior.

Remove unnecessary refuel waypoint in airlifts.

Remove CTLD logic from Airlift flightplan for AI

Add Ingress Point to AirAssault FlightPlan

Add simulation halt at AirAssault ingress

Remove AirAssault completly from AutoPlanner

Remove unneeded LandRefuel from Airlift

Clarify cargo waypoints for AirLift and AirAssault
2022-11-20 16:06:59 +01:00
Raffson
004a99e080
Cleanup 2022-11-13 22:38:24 +01:00
Raffson
7e51061582
Formatting 2022-11-13 22:38:23 +01:00
Raffson
e71ff17a23
Fix mypy errors 2022-11-13 22:38:23 +01:00
Raffson
2270300177
Adjust flightplans for escorts 2022-11-13 22:38:23 +01:00
Dan Albert
aeed7fd42a
Clean up one frontline bounds user. 2022-09-25 14:53:29 +02:00
Dan Albert
a9f6e3a0c3
Rename frontline vector to bounds, add a class.
This isn't actually the data that callers usually want. Most of the
callers just want the bounds. The heading and length are trivially
computed from that. Add a class to contain the result so it's easier to
refactor.
2022-09-17 14:42:19 +02:00
MetalStormGhost
e1bf0ed47a
Added a new setting: "Maximum frontline length (km)"
It replaces the FRONTLINE_LENGTH constant, which was used previously. The default setting for the frontline length has been set to match the FRONTLINE_LENGTH value (80 km), but I feel the default should be a bit shorter. Discussion on the topic would be welcome.
2022-09-03 22:14:56 +02:00
Dan Albert
96a5a8e2ef
Move FlightPlan ownership from Flight to IBuilder.
The next step in splitting up the layout and scheduling phases. This
facilitates splitting flights into two classes where one has a full
flight plan, but one used in the earlier phases of planning has only a
layout. Layout-only flights won't need TOTs, which will make them much
easier to work with once we've migrated TOTs from timedeltas to
datetimes.

Layout-only flights of course aren't actually usable, but it lets us
avoid dealing with the current sim time until we're certain the Flight
will even survive planning.

I'm not actually sure if we'll be able to split the two phases any more,
but this ends up being a nice cleanup anyway.
2022-09-03 19:13:23 +02:00
Dan Albert
4eadce7563
Simplify flight startup time calls.
We can always estimate a startup time now. Remove the nullability from
the result, cleanup the callsites, and eliminate
TotEstimator.mission_start_time since it no longer does anything useful.
2022-09-03 19:13:22 +02:00
Dan Albert
07632e2705
Make TOT waypoints non-optional for flight plans.
Flights without a meaningful TOT make the code around startup time (and
other scheduling behaviors) unnecessarily complicated because they have
to handle unpredictable flight plans. We can simplify this by requiring
that all flight plans have a waypoint associated with their TOT. For
custom flight plans, we can just fall back to the takeoff waypoint. For
RTB flight plans (which are only synthetic flight plans injected for
aborted flights), we can use the abort point.

This also means that all flight plans now have, at the very least, a
departure waypoint. Deleting this waypoint is invalid even for custom
flights, so that's no a problem.
2022-09-03 19:13:21 +02:00
Raffson
48938fc529
Dan's massive refactor
Squashing 8 commits by DanAlbert:

- Track theater in ControlPoint.
Simplifies finding the owning theater of a control point. Not used yet.

- Clean some cruft out of FlightPlanBuilder.
- Clean up silly some exception handling.
- Move FlightPlan instantiation into the builder.
I'm working on moving the builder to be owned by the Flight, which will simplify callers that need to create (or recreate) flight plans for a flight.

- Simplify IBuilder constructor.
We have access to the theater via the flight's departure airbase now.

- Move FlightPlan creation into Flight.
For now this is just a callsite cleanup. Later, this will make it easier
to separate unscheduled and scheduled flights into different classes without complicating the layout/scheduling.

- Remove superfluous constructors.
- Remove unused Package field.
2022-08-24 19:25:30 +02:00
RndName
aa77cfe4b9 Add AirAssault and Airlift mission types with CTLD support
- Add the new airassault mission type and special flightplans for it
- Add the mission type to airbase and FOB
- Add Layout for the UH-1H
- Add mission type to capable squadrons
- Allow the auto planner to task air assault missions when preconditions are met
- Improve Airlift mission type and improve the flightplan (Stopover and Helo landing)
- Allow Slingload and spawnable crates for airlift
- Rework airsupport to a general missiondata class
- Added Carrier Information to mission data
- Allow to define CTLD specific capabilities in the unit yaml
- Allow inflight preload and fixed wing support for air assault
2022-06-09 22:45:29 +02:00
RndName
c437fa329c
Improve SEAD ingress tasking and target waypoint
* Fix suicide SEAD flights (diving to the SAM)

additional fix for #2152. This sets the Target Waypoint ALT to the Ingress ALT for non player flights. Player flights will have the target waypoint set to 0 AGL so that they can slave weapons or TGP to it.

* Add GroupAttack to SEAD so that they suppress more
2022-04-20 00:19:03 +02:00
Dan Albert
769fe12159 Split flight plan layout into a separate class.
During package planning we don't care about the details of the flight
plan, just the layout (to check if the layout is threatened and we need
escorts). Splitting these will allow us to reduce the amount of work
that must be done in each loop of the planning phase, potentially
caching attempted flight plans between loops.
2022-03-11 16:00:48 -08:00
Dan Albert
fa8c0d9660 Clean up flight plan code.
Split the oversized file into one per plan type. This also moves the
layout responsibility out of the oversized FlightPlanBuilder and into
each flight plan type file.
2022-03-09 02:15:07 -08:00