Missileguidance -- rewrite to use real-world guidance principles, general refactor
Updated PR, based on #8215
Overview
When merged this pull request will:
- Add real navigation profiles to all missiles. Uses something called "proportional navigation" - a control theory that suggests that as long as your line of sight angle isn't changing you are guaranteed to be on a collision course (See this video for a demonstration within World in Conflict). This automatically leads targets and allows for insane accuracy. This picture shows a javelin attacking an incorrectly scripted target (
getPosinstead ofcenterOfMass) which was moving at 100kmh at a distance of 2km at a firing angle of 90 degrees
Navigation types:
- Direct Line of Sight
- Proportional Navigation
- Augmented Proportional Navigation (takes into account target acceleration)
- Zero-Effort Miss (separate form of proportional navigation that allows for a more efficient intercept)
Changes flight model of weapons to utilise in-engine calculations of velocity. This avoids issues where the missile will lose all of its energy and hang in the air. This also allows for "bang-bang" guidance weapons, such as the GBU-12.
Merge Strategy
In the linked project, all components labelled as “Necessary” must be merged at the same time; otherwise there will be broken components. “Supplementary” items are features which add new missiles to fully cover all vanilla systems, but otherwise are not breaking. “Nice to have” are features which were developed off of this branch, but are basically their own independent PR.
Misc
To-Do
- [x] Localisation
- [x] Documentation
- [X] Add NLAW navigation type
- [X] Add SACLOS/Beam guided navigation type
- [x] Add Hellfire mid-course guidance logic
- [x] Tweak Javelin mid-course guidance logic
- [x] Fix RPT spam through IR seeker when close to target
- [X] Create UX for selecting GPS attack profile/mission (Between PP and TOO, and between PP missions)
- [X] Add ground based missiles (see todo.txt)
- [x] Multiplayer testing
- [x] Multiplayer tweaking
- [x] Convert all tabs to spaces (text editor reset settings apparently)
- [X] Add videos of this system in action
Videos: https://youtu.be/5MrPyqcZc0I https://youtu.be/WF9K1GitV00 https://youtu.be/xXSJLwrJW1A https://youtu.be/E9O9M5OcxdU https://youtu.be/_v6BdAw-MA0