4844 Commits

Author SHA1 Message Date
Raffson
c4be00d11b
Migrate to PySide6 2023-10-08 00:53:51 +02:00
Raffson
93b83f2bc8
Streamlining 2023-10-08 00:37:39 +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
e04f23bf15
Streamlining 2023-10-07 22:46:16 +02:00
Dan Albert
f11689f4cb
Allow flights to self-initialize.
This makes it possible to add new packages to a running sim.

https://github.com/dcs-liberation/dcs_liberation/issues/1680
2023-10-07 21:43:28 +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
Starfire13
625c4f2dfb
New version of Exercise Bright Star with carrier 2023-10-07 20:55:09 +02:00
Dan Albert
6a47e84699
Increase max distance for waypoint solver.
1000km isn't large enough in the case where there's an off-map spawn
that's a long way from the target, but still in range for aircraft like
the B-1. Double it, which for now is enough to fix the one pathological
case we know.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3156.
2023-10-07 20:55:09 +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
d205e66fe4
Don't flag negative starts for active flights.
If the flight has already passed its start up time, this isn't a
negative start.
2023-10-07 19:01:11 +02:00
Raffson
62a40db9ea
Streamlining 2023-10-07 18:53:42 +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
5ca344e87b
Show the real front line bounds on the map.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1067.
2023-10-07 18:35:17 +02:00
Raffson
03d8448def
Streamlining 2023-10-07 18:13:55 +02:00
Dan Albert
a2630fc75f
Add a real CAS ingress point.
Putting the ingress point directly on one end of the FLOT means that AI
flights won't start searching and engaging targets until they reach that
point. If the front line has advanced toward the flight's departure
airfield, it might overfly targets on its way to the IP.

Instead, place an IP for CAS the same way we place any other IP. The AI
will fly to that and start searching from there.

This also:

* Removes the midpoint waypoint, since it didn't serve any real purpose
* Names the FLOT boundary waypoints for what they actually are

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2231.
2023-10-07 18:00:07 +02:00
Raffson
c50dcaaafb
Streamlining 2023-10-07 18:00:07 +02:00
Dan Albert
3499ba5ffa
Mark the AI-only F-15E more clearly. 2023-10-07 17:24:40 +02:00
Dan Albert
f5f11ff3ac
Add display name property for unit types.
Unlike the variant ID, this can be changed without breaking save compat.
2023-10-07 17:24:17 +02:00
Dan Albert
0ec375ad89
Fix unit variants to actually allow variance.
This was always the intent, but apparently it wasn't implemented
correctly. All properties of the unit type can now be overridden per
variant.
2023-10-07 17:23:34 +02:00
Raffson
ee3bdf9fd7
Streamlining 2023-10-07 17:14:01 +02:00
Dan Albert
1760532168
Rename UnitType.name what it is: the variant ID.
This property affects safe compat because the ID is what gets preserved
in the save, but it's unfortunately also used as the display name, which
means changing the display name breaks save compat. It also prevents us
from changing display names without breaking faction definitions.

This is the first step in fixing that. The next is adding a separate
display_name property that can be updated without breaking either of
those.
2023-10-07 17:08:33 +02:00
Dan Albert
97ee6ba19f
Force dumping debug info on recreate.
We need a way to debug successful solvers that's still targeting to a
specific flight. This will do for now.
2023-10-07 17:07:57 +02:00
Dan Albert
d96f7a267c
Add test cases found by fuzzer. 2023-10-07 17:07:33 +02:00
Dan Albert
98f92f9ab2
Add fuzz testing for waypoint solvers.
This fuzz test generates random inputs for waypoint solvers to check if
they can find a solution. If they can't, the debug info for the solver
is dumped to the testcases directory. Another test loads those test
cases, creates a solver from them, and checks that a solution is found.
Obviously it won't be immediately, but it's a starting point for fixing
the bug and serves as a regression test afterward.
2023-10-07 17:07:33 +02:00
Dan Albert
8b04dd878d
Migrate IP placement to WaypointSolver. 2023-10-07 17:07:32 +02:00
Dan Albert
643dafd2c8
Build common interface for waypoint geometry constraints.
This is a replacement for the existing "zone geometry" classes that are
currently used for choosing locations for IP, hold, and join points.
The older approach required the author to define the methods for
choosing locations at a rather low level using shapely APIs to merge or
mask geometries. Debug UIs had to be defined manually which was a great
deal of work. Worse, those debug UIs were only useable for *successful*
waypoint placement. If there was a bug in the solver (which was pretty
much unavoidable during development or tuning), it wasn't possible to
use the debug UI.

This new system adds a (very simple) geometric constraint solver to
allow the author to describe the requirements for a waypoint at a high
level. Each waypoint type will define a waypoint solver that defines one
or more waypoint strategies which will be tried in order. For example,
the IP solver might have the following strategies:

1. Safe IP
2. Threat tolerant IP
3. Unsafe IP
4. Safe backtracking IP
5. Unsafe backtracking IP

We prefer those in the order defined, but the preferred strategies won't
always have a valid solution. When that happens, the next one is tried.

The strategies define the constraints for the waypoint location. For
example, the safe IP strategy could be defined as (in pseudo code):

* At least 5 NM away from the departure airfield
* Not farther from the departure airfield than the target is
* Within 10 NM and 45 NM of the target (doctrine dependent)
* Safe
* Within the permissible region, select the point nearest the departure
  airfield

When a solver fails to find a solution using any strategy, debug
information is automatically written in a GeoJSON format which can be
viewed on geojson.io.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3085.
2023-10-07 17:07:21 +02:00
Dan Albert
bf879a6141
Add __str__ for Distance. 2023-10-07 15:55:05 +02:00
Dan Albert
fa1caa86d6
Add name to Doctrine. 2023-10-07 15:55:04 +02:00
Dan Albert
181ac27299
Note the ARA Veinticinco de Mayo in the changelog. 2023-10-07 15:52:15 +02:00
Nosajthedevil
313d8f5065
Add support for ARA Veinticinco de Mayo.
Includes an Argentina 1982 faction for testing purposes, although it's
sparse because of a lack of assets in DCS.

Note that the carrier is mispelled as the Vienticinco in the game.

Includes prerequisite pydcs update.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3123.

yaml to json
2023-10-07 15:52:14 +02:00
Dan Albert
ee1fa78ecd
Add __str__ for Heading. 2023-10-07 15:49:21 +02:00
Raffson
60172d0e52
Streamlining 2023-10-07 15:23:29 +02:00
Starfire13
e514cb1397
Add Operation Noisy Cricket campaign. 2023-10-07 14:51:52 +02:00
Starfire13
c640a53190
Add BLU-107 to OCA/Runway loadout
I had originally opted for iron bombs for anti-runway as the AI sometimes miss with the Durandals because they release them from too high an altitude. But after using them for a while, I am finding they appear to do no worse than with iron bombs. So, might as well let them use the dedicated anti-runway weapon.
2023-10-07 14:51:52 +02:00
Dan Albert
6ef3bd5095
Stop gap fix for AI speed to nav points.
This isn't a great fix for the reason I mention in the comment, but it's
quick and actually is accurate since it looks like we don't actually
handle formation speeds correctly in most cases...

This is probably as "fixed" as this is going to get for now since most
of the flight planning code is in the process of being rewritten.

https://github.com/dcs-liberation/dcs_liberation/issues/3113
2023-10-07 14:43:19 +02:00
Dan Albert
47add7848f
Always re-enable loadout UI for member 0. 2023-10-07 14:42:51 +02:00
Dan Albert
0b7acbc94e
Fix synchronization of loadouts on change.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3111.
2023-10-07 14:42:51 +02:00
Raffson
04974c3c0b
Add Mirage F1 to Iran 2015
yaml to json
2023-10-07 14:37:15 +02:00
Dan Albert
014ae5faf5
Configure target points for F-15E S4+.
We don't need explicit configuration of initial points. The plane
automatically configures any steerpoint immediately before a target
point as an initial point.

Target offset points and aim points have not been implemented because I
can't find any information the describes their intent.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3088.
2023-10-07 14:34:30 +02:00
Dan Albert
e25aac774f
Handle TOT offsets for patrolling flight plans.
https://github.com/dcs-liberation/dcs_liberation/issues/3107
2023-10-07 14:33:04 +02:00
Dan Albert
c11b4149a0
Fix negative starts when changing TOT offsets. 2023-10-07 14:31:08 +02:00
Dan Albert
091d523516
Fix altering negative TOT offsets.
https://github.com/dcs-liberation/dcs_liberation/issues/3107
2023-10-07 14:31:04 +02:00
Dan Albert
2ab456b9c1
Add laser code support for the viper. 2023-10-07 14:14:34 +02:00
Dan Albert
bb36944a8a
Remove unused config data from laser code yamls. 2023-10-07 14:13:53 +02:00
Dan Albert
62e43f1169
Clarify that the assigned code is for the TGP. 2023-10-07 14:13:52 +02:00
Dan Albert
dc22e0a577
Hide properties that have better controls.
The weapon laser codes can be set more easily from the weapon laser code
combo box. Setting the properties explicitly here will just cause
conflicts and annoying UI bugs. Hide those properties from the UI.
2023-10-07 14:13:52 +02:00
Dan Albert
51f578b9e3
Add UI for selecting weapon laser codes.
This makes it possible to have the right laser code set for hot start
aircraft that (typically) do not allow changing laser codes when the
engine is on.
2023-10-07 14:13:51 +02:00
Dan Albert
2a8f34ea25
Do not draw empty property rows. 2023-10-07 14:13:51 +02:00