1991 Commits

Author SHA1 Message Date
Raffson
7d314f8ee4
Lock waypoint speed if ETA is 0 & avoid negative ETAs 2023-10-21 21:27:41 +02:00
zhexu14
10aee31c7d
address issue 3175 by introducing special divide by zero handling 2023-10-21 21:27:41 +02:00
Raffson
be634ab961
Revert "Update to Python3.11"
This reverts commit d6ba45a42be3717370748fa56484ebef69f4bf52.
2023-10-15 20:53:03 +02:00
Raffson
d6ba45a42b
Update to Python3.11 2023-10-15 19:53:24 +02:00
Raffson
7d347eee94
Fix traveltime & offsets 2023-10-15 13:32:11 +02:00
Raffson
bcdf2ad887
Fix wrong logic wrt hold WPT & air-assault 2023-10-15 12:57:28 +02:00
Raffson
22900407dd
Format time for WPTs on map 2023-10-15 12:55:55 +02:00
Raffson
63e2c30e44
Fix SEAD Sweep not available at campaign start 2023-10-15 12:23:18 +02:00
Raffson
02ae5d9ad7
Remove faulty beacon in migrator 2023-10-14 20:11:08 +02:00
Raffson
7a3c9a707f
Fix external views not allowing F5 view 2023-10-14 16:02:39 +02:00
Raffson
06f51573e1
Fix kneeboard notes bug 2023-10-14 15:17:52 +02:00
Raffson
c9ed0352b7
Fix kneeboard bug preventing mission generation 2023-10-08 14:23:12 +02:00
Raffson
c4be00d11b
Migrate to PySide6 2023-10-08 00:53:51 +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
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
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
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
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
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
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
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
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
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
bb36944a8a
Remove unused config data from laser code yamls. 2023-10-07 14:13:53 +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
a366aebbb2
Add laser code config parsing and prop generation. 2023-10-07 14:11:09 +02:00
Raffson
1ce8d9c2b7
Cleanup after cherry-pick 2023-10-07 14:08:53 +02:00
Dan Albert
177f357492
Pre-allocate laser codes for FLOTs and flights. 2023-10-07 14:06:12 +02:00
Dan Albert
723e191f10
Create a checked, releasable type for laser codes.
The release behavior isn't used yet, but I'm working on pre-allocating
laser codes for front lines and flights to make it easier for players to
pick the laser codes for their weapons.
2023-10-07 14:03:36 +02:00
Raffson
cb6bffe3ec
Split procurement settings for blue & red
Resolves #208
2023-10-07 13:53:29 +02:00