21 Commits

Author SHA1 Message Date
Raffson
0edcd31367
Fix desync wrt off-map flights 2024-01-28 19:20:34 +01:00
Raffson
dad5e7c146
Fix TOT-offset issues 2024-01-28 17:39:46 +01:00
Raffson
7d347eee94
Fix traveltime & offsets 2023-10-15 13:32:11 +02:00
Dan Albert
a2e98f485c
Remove bingo estimates from FlightPlan.
This doesn't need to be a part of FlightPlan, and it's easier to test if
it isn't. Move it out and add the tests.

It's pretty misleading to allow this in the core of the flight plan code
anything. This is an extremely unreliable estimate for most aircraft so
it should be more clearly just for briefing purposes.
2023-10-07 23:08:25 +02:00
Raffson
ea726bbf06
Streamlining 2023-10-07 21:43:27 +02:00
Dan Albert
59673e7911
Convert TOTs to datetime.
https://github.com/dcs-liberation/dcs_liberation/issues/1680
2023-10-07 21:09:25 +02:00
Dan Albert
14d3e743d4
Remove useless TravelTime class.
This is only called for real in one spot. The other callers should have
been deferring to the one real caller.
2023-10-07 20:55:08 +02:00
Dan Albert
dcaee350cf
Remove dead code. 2023-10-07 19:11:40 +02:00
Dan Albert
75498fe061
Differentiate total time and travel time.
There's an ugly special case in flight simulation to handle hold points
because we don't differentiate between the total time between two
waypoints (which can include delays from actions like holding) and
travel time. Split those up and remove the special case.
2023-10-07 18:42:59 +02:00
Dan Albert
f89ac52bf3
Clean up remaining Flight.from_cp users.
The preferred API for this has been `Flight.departure` for a while.
2023-10-01 19:26:20 +02:00
Raffson
66d741d0b3
Allow user to add navigation waypoints where possible 2023-08-27 21:11:10 +02:00
Raffson
789806637c
Improve escort logic for helicopters
Babysteps #88
2023-08-15 21:50:20 +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
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
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
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
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