Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missileguidance -- rewrite to use real-world guidance principles, general refactor #10019

Merged
merged 281 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
281 commits
Select commit Hold shift + click to select a range
34af87b
update todo with list of weapons
TheCandianVendingMachine Apr 13, 2021
789ae1c
Add AIM-120 with ARH. Change AHR to not always seek all targets
TheCandianVendingMachine Apr 13, 2021
187c6d3
Implement some generic modes of flight
TheCandianVendingMachine Apr 13, 2021
a93eb64
implement augmented proportional navigation
TheCandianVendingMachine Apr 13, 2021
1873467
Add zero-effort miss. Seeker now feeds data to navigation
TheCandianVendingMachine Apr 13, 2021
f96abc0
Fix bug with ZEM
TheCandianVendingMachine Apr 13, 2021
e9d474c
remove placeholder
TheCandianVendingMachine Apr 13, 2021
e1436d6
Change out missile types to reflect navigation scheme they use IRL
TheCandianVendingMachine Apr 13, 2021
d34201e
remove uneeded sets
TheCandianVendingMachine Apr 13, 2021
a2d2dd0
chane navigation profiles to go for attack direction instead of target
TheCandianVendingMachine Apr 14, 2021
af2b9a2
multiple changes
TheCandianVendingMachine Apr 14, 2021
555f0c8
SALH: only update seeker pos if it within small error
TheCandianVendingMachine Apr 14, 2021
e2c8ddf
IR seeker and AIM-9M
TheCandianVendingMachine Apr 14, 2021
c714fb5
small tweaks
TheCandianVendingMachine Apr 14, 2021
fe2fedd
more tweaks
TheCandianVendingMachine Apr 14, 2021
8d52a2e
todo: fix nlaw
TheCandianVendingMachine Apr 14, 2021
a485399
update todo
TheCandianVendingMachine Apr 14, 2021
d077528
implement course state machine
TheCandianVendingMachine Apr 14, 2021
8318b60
Improve radar simulation
TheCandianVendingMachine Apr 16, 2021
26dee9f
enable chaff decoy
TheCandianVendingMachine Apr 16, 2021
0848d74
add config entries
TheCandianVendingMachine Apr 16, 2021
abc5bab
Implement optical mavericks
TheCandianVendingMachine Apr 16, 2021
1b000d6
Allow for debug info to be displayed via variable
TheCandianVendingMachine Apr 16, 2021
8f03b5b
Change AIM-9 agility
TheCandianVendingMachine Apr 16, 2021
fe1e6d4
update dragon to not use new guidance
TheCandianVendingMachine Apr 17, 2021
265670c
Tweak flight parameters. Add R-77
TheCandianVendingMachine Apr 17, 2021
8b88142
Add AIM-120A
TheCandianVendingMachine Apr 17, 2021
d622e4d
add ASRAAM
TheCandianVendingMachine Apr 17, 2021
f942231
add R-73/4
TheCandianVendingMachine Apr 17, 2021
e7919da
Add all GBU-12s that exist for all planes
TheCandianVendingMachine Apr 17, 2021
23cd1ef
update todo
TheCandianVendingMachine Apr 17, 2021
b18508b
update todo for ground based weapons
TheCandianVendingMachine Apr 17, 2021
e1cdbb7
Add GPS selector dialog for GPS munitions
TheCandianVendingMachine Apr 18, 2021
3878c67
add TOO TGP
TheCandianVendingMachine Apr 19, 2021
44b7b87
Add SDB and JDAM
TheCandianVendingMachine Apr 19, 2021
1cb8408
update todo
TheCandianVendingMachine Apr 19, 2021
12bcb95
fix gimbal lock via rotating with quaternions
TheCandianVendingMachine Apr 20, 2021
438cb8b
tweak JDAM guidance
TheCandianVendingMachine Apr 20, 2021
aea24c6
Better attack angle calculation. Does not get exactly right, but work…
TheCandianVendingMachine Apr 20, 2021
9d26335
Fix SACLOS missiles
TheCandianVendingMachine Apr 21, 2021
19dcf00
Fix NLAW and PLOS
TheCandianVendingMachine Apr 21, 2021
afbb1f6
update todo
TheCandianVendingMachine Apr 21, 2021
ba2eb48
update todo
TheCandianVendingMachine Apr 21, 2021
6b3be24
Add Vikhr ATGM
TheCandianVendingMachine Apr 21, 2021
a91b3aa
Add long range SAMs
TheCandianVendingMachine Apr 21, 2021
cba9dcd
fix SAM animations
TheCandianVendingMachine Apr 21, 2021
675b07d
Add all ground based missiles. Tweak AIM-9 flare angle
TheCandianVendingMachine Apr 21, 2021
a057768
remove debugh print
TheCandianVendingMachine Apr 21, 2021
7398033
Fix Wiesel ATGM animation. Tweak SACLOS values
TheCandianVendingMachine Apr 21, 2021
6cfc075
Add action to get into jdam settings
TheCandianVendingMachine Apr 21, 2021
73b0598
fix all script components
TheCandianVendingMachine Apr 21, 2021
f5b3161
Add paremter to allow weathervaning
TheCandianVendingMachine May 2, 2021
197c1a7
Add new navigation profile. Tweak javelin mid-course guidance
TheCandianVendingMachine May 2, 2021
de05c68
Process all navigation onFired. Send the correct array to function
TheCandianVendingMachine May 2, 2021
edc8250
fix missing semicolons
TheCandianVendingMachine May 2, 2021
b4e5a29
Add hellfire mid course guidance
TheCandianVendingMachine May 2, 2021
356ff4c
Tweak hellfire attack profile
TheCandianVendingMachine May 2, 2021
f3bea7b
change how IR seeker performs
TheCandianVendingMachine May 2, 2021
89e64df
tabs -> spaces
TheCandianVendingMachine May 2, 2021
79bd76a
localise aim120
TheCandianVendingMachine May 2, 2021
f12e934
localise aim9
TheCandianVendingMachine May 2, 2021
988768a
localise gbu
TheCandianVendingMachine May 2, 2021
c0e623a
fix IR tracker losing lock immediately due to being blocked by launcher
TheCandianVendingMachine May 2, 2021
c67bc4d
localise manpad
TheCandianVendingMachine May 2, 2021
5edabba
actually localise manpad
TheCandianVendingMachine May 2, 2021
0d38505
localise maverick
TheCandianVendingMachine May 2, 2021
f45ee87
localise missile guidance
TheCandianVendingMachine May 2, 2021
0a28e3e
localise sam
TheCandianVendingMachine May 2, 2021
72297be
localise sdb
TheCandianVendingMachine May 2, 2021
7988469
localise vikhr
TheCandianVendingMachine May 2, 2021
80b2595
tabs -> spaces again
TheCandianVendingMachine May 2, 2021
20a3277
init commit 9m14
TheCandianVendingMachine May 6, 2021
d8fb608
update stringtables so they are in titlecase
TheCandianVendingMachine May 7, 2021
a0e193a
crash on load
TheCandianVendingMachine May 7, 2021
e76fde4
perplexed
TheCandianVendingMachine May 7, 2021
f4f3224
fix game crashing on load
TheCandianVendingMachine May 7, 2021
8b3e909
Add joystick model
TheCandianVendingMachine May 7, 2021
fc7b310
Add realistic 9m14 behaviour
TheCandianVendingMachine May 8, 2021
5315b11
add MCLOS guidance
TheCandianVendingMachine May 8, 2021
1756524
add the ability to see a light trail
TheCandianVendingMachine May 8, 2021
ef529d2
tweak HOT guidance params
TheCandianVendingMachine May 8, 2021
c71be65
tweak metis guidance params
TheCandianVendingMachine May 8, 2021
6165be0
tweak Vikhr guidance
TheCandianVendingMachine May 8, 2021
b82484b
add trail to vikhr
TheCandianVendingMachine May 8, 2021
980c3d0
Add Iron Dome interceptor API
TheCandianVendingMachine May 18, 2021
a25cf70
Optimise iron dome
TheCandianVendingMachine May 18, 2021
f825d6f
Only launch if we are above a threshold angle
TheCandianVendingMachine May 18, 2021
72ca725
add local event for mission makers
TheCandianVendingMachine May 18, 2021
e67aefc
change events to allow for any number of arguments
TheCandianVendingMachine May 18, 2021
36d7576
avoid making un-needed calls to the server
TheCandianVendingMachine May 18, 2021
f7bd523
Update doppler seeker to allow the tracking and killing of projectiles
TheCandianVendingMachine May 18, 2021
395b2b2
Avoid overshooting target
TheCandianVendingMachine May 18, 2021
790faf1
Add settings for various things
TheCandianVendingMachine May 19, 2021
22e5596
Add missile hiding for malyutka
TheCandianVendingMachine May 21, 2021
2694453
init commit of cruise missile
TheCandianVendingMachine May 23, 2021
c5972e6
Various - Add missing units/weapons to cfgPatches (#8175)
PabstMirror Mar 17, 2021
dd5bd46
Documentation - Add Mikero binarization note (#8172)
jonpas Mar 17, 2021
fac35d5
Bump is-svg from 4.2.1 to 4.3.1 in /docs/src (#8177)
dependabot[bot] Mar 20, 2021
d9261c4
Adjust "New issue" link to lead to template selection page (#8182)
bux Mar 24, 2021
a5d7a00
Update linguist settings (#8151)
veteran29 Apr 8, 2021
44ecfc8
Typo in usage example (#8201)
t-zilla Apr 8, 2021
4e3d3ce
Mk6 Mortar - Fix README.md typo (#8205)
jonpas Apr 9, 2021
560a1da
Overhaul CSW docs (#8206)
BaerMitUmlaut Apr 12, 2021
b181f1b
Medical - Add Alternative Survival Chance (#8192)
Apr 15, 2021
fdc3ab0
Fix make.py temp files cleanup (#8189)
Dystopian Apr 17, 2021
9d6843f
Fix Injured Sounds Not Playing At Altitudes Above 70 (#8212)
commy2 Apr 17, 2021
090aa5d
Particles - Fix macro (#8214)
Mike-MF Apr 19, 2021
517b576
Map - Fix stuck map compass size (add 0.1 zoom duration) (#8176)
R3voA3 Apr 20, 2021
fa870a3
Medical - Allow unconscious unit in Taru pods (#8168)
ampersand38 Apr 20, 2021
7c87997
Name Tags - Add ability to set custom rank icon (#8174)
Drift91 Apr 20, 2021
3b9f374
Tools - Add script to update HEMTT include folder (#8134)
PabstMirror Apr 20, 2021
e3a3e29
Tools - Add script to check sqf/config with sqfvm (#8137)
PabstMirror Apr 20, 2021
c7d4981
Medical - Add Vehicle Crashes setting (#8149)
LinkIsGrim Apr 20, 2021
026b949
Dragging - Add new dragging animations (#7950)
Malbryn Apr 20, 2021
d41c5bd
Dragging - Fix build issue (#8219)
Mike-MF Apr 20, 2021
011389c
Documentation - Remove DeTex requirement (#8220)
jonpas Apr 20, 2021
89fb57f
User Interface - Add setting for Development Build watermark (#8140)
Dystopian Apr 20, 2021
4678518
RHS USAF Compat - Nightforce NXS scopes updated (#8222)
Laid3acK Apr 21, 2021
a80a0b8
Interact Menu - Make List default (#8217)
jonpas Apr 21, 2021
f1338e6
Markers - Add scale slider (#8059)
frankplow Apr 21, 2021
d8bdde0
Initial push (#8225)
JoramD0 Apr 22, 2021
e2e747e
MicroDAGR - Add mode switching keybinds (#8216)
JoramD0 Apr 22, 2021
996bbd2
RHS ARF Compat - Fix RPK74M wrong ammo bug (#8223)
Dabako Apr 22, 2021
e6d337a
Extensions - Various Improvments (#8227)
PabstMirror Apr 22, 2021
cc0d8a5
Translations - Spanish (#8229)
regiregi22 Apr 26, 2021
825596b
Attach - Added attached/detaching events (#8193)
dedmen Apr 26, 2021
c425b35
Markers - Fix marker scale (#8233)
PabstMirror Apr 26, 2021
4726108
Cargo - paradrop fixes (#8203)
LupusTheCanine May 1, 2021
00eead4
Parachute - Add failure chance (#8226)
JoramD0 May 1, 2021
078a0b6
Bump lodash from 4.17.20 to 4.17.21 in /docs/src (#8244)
dependabot[bot] May 6, 2021
e6de643
Bump grunt from 1.0.4 to 1.3.0 in /docs/src (#8246)
dependabot[bot] May 7, 2021
173f86f
Bump hosted-git-info from 2.5.0 to 2.8.9 in /docs/src (#8247)
dependabot[bot] May 8, 2021
a715a5f
Markers - Fix JIP scale (#8248)
jonpas May 9, 2021
ede5c1d
Night Vision - Add color variants to all generations (#8209)
JoramD0 May 9, 2021
e082d75
Fix wrong shot size in birdshot strings (#8253)
Drofseh May 9, 2021
d3de5a9
Patachute - Add sound effect when cutting (#8239)
PabstMirror May 20, 2021
52116c7
Changes poisson disc to centered random. (#8257)
LorenLuke May 20, 2021
9122535
Fix tabs and manpad UBC
PabstMirror May 21, 2021
e5f791d
Merge branch 'master' into pr/8215
PabstMirror May 23, 2021
e3e3605
fix tabs in aim9
PabstMirror May 23, 2021
f89bf62
progress update: tercom now flies to acquisition basket
TheCandianVendingMachine May 23, 2021
597e188
Merge branch 'missileDynamics' of https://github.com/TheCandianVendin…
TheCandianVendingMachine May 23, 2021
e6fcd11
add TERCOM state defines
TheCandianVendingMachine May 25, 2021
7cf29ba
work on parsing heightmap
TheCandianVendingMachine Jun 1, 2021
79c6bf9
Change GBU navigation
TheCandianVendingMachine Jun 2, 2021
4308d33
remove testing constants
TheCandianVendingMachine Jun 7, 2021
8142bb0
remove TERCOM guidance
TheCandianVendingMachine Jun 12, 2021
038c82a
better JDAM simulation
TheCandianVendingMachine Jun 12, 2021
d8eb425
Better flare decoy calculation
TheCandianVendingMachine Jun 12, 2021
5acc277
Update 9m14_joystick.p3d
PabstMirror Jul 2, 2021
d50491f
Destroy projectile on all clients
TheCandianVendingMachine Jul 2, 2021
25b1b47
Merge branch 'missileDynamics' of https://github.com/TheCandianVendin…
TheCandianVendingMachine Jul 2, 2021
aff19ec
fix NLAW navigation profile
TheCandianVendingMachine Aug 2, 2021
7b7d79f
fix uninitialised values
TheCandianVendingMachine Aug 2, 2021
76c5c6e
make over-fly trajectory over-fly
TheCandianVendingMachine Aug 2, 2021
98e66d2
remove malyutka
TheCandianVendingMachine Aug 2, 2021
82c14a0
SACLOS tweaks
TheCandianVendingMachine Aug 2, 2021
9595640
Merge remote-tracking branch 'ACERemote/master' into missileDynamics
TheCandianVendingMachine Oct 16, 2021
120d16c
small changes
TheCandianVendingMachine Oct 16, 2021
0123216
fix bug in laser
TheCandianVendingMachine Oct 16, 2021
17e211e
Merge branch 'laserRevert' into missileDynamics
TheCandianVendingMachine Oct 16, 2021
9a2d631
make pronav use the correct units
TheCandianVendingMachine Oct 16, 2021
10c2019
change back
TheCandianVendingMachine Oct 16, 2021
34c7b57
add dev function to get ammo which has MG class data
TheCandianVendingMachine Oct 16, 2021
d8ebc35
improve lin navigation
TheCandianVendingMachine Oct 17, 2021
7f398a8
Merge branch 'master' into pr/8215
PabstMirror Oct 21, 2021
b40903b
Merge branch 'master' into pr/8215
PabstMirror Nov 13, 2021
a26e269
Minor style
PabstMirror Nov 13, 2021
f9ea835
add spike ATGM
TheCandianVendingMachine Dec 12, 2021
36f148d
Allow multiple cameras to exist at once. Fix script error
TheCandianVendingMachine Dec 12, 2021
c6c313a
fix bug with angles close to 0
TheCandianVendingMachine Dec 12, 2021
7d009d2
remove debug
TheCandianVendingMachine Dec 12, 2021
7460bb3
misc updates
TheCandianVendingMachine Dec 12, 2021
8da028b
Handle pre-tracking
TheCandianVendingMachine Dec 12, 2021
e91b8bc
Tweak target acquisition. Reset target after shooting
TheCandianVendingMachine Dec 13, 2021
becc9d2
Tweak how targets are acquired. Fix velocity calculation
TheCandianVendingMachine Dec 13, 2021
fd5b8a2
tweak navigation to allow for <200m shots
TheCandianVendingMachine Dec 14, 2021
7bb7b6f
enhance target designation
TheCandianVendingMachine Jan 2, 2022
d8554eb
Stringtable addition
TheCandianVendingMachine Jan 2, 2022
745a47f
Config changes
TheCandianVendingMachine Jan 2, 2022
5b4e29a
Merge branch 'missileDynamics' of github.com:TheCandianVendingMachine…
TheCandianVendingMachine Jan 2, 2022
9452de5
Merge branch 'master' of https://github.com/acemod/ACE3 into missileD…
TheCandianVendingMachine Jan 2, 2022
20ad628
more SACLOS tweaks
TheCandianVendingMachine Jan 2, 2022
e318e85
Some minor fixes
PabstMirror Jan 6, 2022
ad2842b
fix undefined array
TheCandianVendingMachine Jan 10, 2022
c2ef6b8
Merge branch 'missileDynamics' of github.com:TheCandianVendingMachine…
TheCandianVendingMachine Jan 10, 2022
97f3bb3
Only play sound when Spike is launcher. Change onFired to missileguid…
TheCandianVendingMachine Jan 14, 2022
56c85fc
Tweak IR seeker. Fix MCLOS fired from vehicles
TheCandianVendingMachine Feb 16, 2022
f9241fe
Remove debug sets
TheCandianVendingMachine Feb 16, 2022
71e01a2
Update all Line guidance missiles
TheCandianVendingMachine Apr 5, 2022
f79dde5
remove debug sets
TheCandianVendingMachine Apr 5, 2022
76bb679
Merge branch 'master' into pr/8215
PabstMirror Apr 16, 2022
67fe609
tweak javelin to make minimum ranges more realistic
TheCandianVendingMachine May 14, 2022
d944f09
Merge branch 'missileDynamics' of github.com:TheCandianVendingMachine…
TheCandianVendingMachine May 14, 2022
2041c88
Merge branch 'master' into pr/8215
PabstMirror May 24, 2022
f4152ec
cut spike
TheCandianVendingMachine Jun 3, 2022
e46cd2c
add better error messaging
TheCandianVendingMachine Jun 3, 2022
0b7c89a
better debug info
TheCandianVendingMachine Jun 3, 2022
0531abb
Rewrite documentation
TheCandianVendingMachine Jun 3, 2022
5a55d2d
Add ability to disable iron dome (disabled by default)
TheCandianVendingMachine Jun 3, 2022
bcd753f
Change name
TheCandianVendingMachine Jun 3, 2022
a79f987
fix typo
TheCandianVendingMachine Jun 3, 2022
743add1
Remove null projectiles from iron dome nonTrackingProjectiles
SzwedzikPL Jul 25, 2022
6aba4b0
Merge pull request #4 from SzwedzikPL/irondome-cleanupprojectiles
TheCandianVendingMachine Jul 25, 2022
3573aef
HEMTT v10 Compatibility
BrettMayson Nov 28, 2022
2fb1f00
Update addons/field_rations/CfgUIGrids.hpp
BrettMayson Dec 4, 2022
f4ea561
fix PabstMirror review
BrettMayson Dec 6, 2022
2f05c99
optionals
BrettMayson Dec 7, 2022
832b0c9
Merge remote-tracking branch 'brett/hemtt_v10'
TheCandianVendingMachine Jan 19, 2023
16dee0a
Merge branch 'master' into pr/8215
PabstMirror Jan 20, 2023
abef4fd
Merge branch 'master' into missileDynamics
TheCandianVendingMachine Jan 20, 2023
0957a33
Change configs to enclose strings for calculations
TheCandianVendingMachine Jan 21, 2023
01ac87d
Fix NLAW guidance that was causing massive overfly
TheCandianVendingMachine Jan 21, 2023
d1f5791
make tweaks for PLOS movement path
TheCandianVendingMachine Jan 21, 2023
3af5717
fix NLAW overfly
TheCandianVendingMachine Jan 31, 2023
28c166d
Merge branch 'master' into pr/8215
PabstMirror Feb 24, 2023
7727fee
Fix hemmit merge
PabstMirror Feb 24, 2023
2c0a720
Merge branch 'master' into pr/8215
PabstMirror Sep 9, 2023
6e6d24a
fix header
PabstMirror Sep 9, 2023
10065f7
Update fnc_seekerType_SACLOS.sqf
PabstMirror Sep 10, 2023
477bdd0
Merge branch 'master' into pr/8215
PabstMirror Oct 7, 2023
b5bae13
Update to new include paths
PabstMirror Oct 7, 2023
f45c56a
Update fnc_midCourseTransition.sqf
PabstMirror Oct 7, 2023
4197a6e
Merge branch 'master' into pr/8215
PabstMirror Jan 7, 2024
825f40b
initSettings.inc.sqf
PabstMirror Jan 7, 2024
b5d0ae6
Merge branch 'master' into pr/8215
PabstMirror Mar 28, 2024
6485898
Merge branch 'master' into pr/8215
PabstMirror Apr 12, 2024
8aab5c4
Merge branch 'master' into pr/8215
PabstMirror May 24, 2024
f75f3d3
Remove weapon additions
TheCandianVendingMachine May 27, 2024
cbcc642
revert old weapons, pt1
TheCandianVendingMachine May 27, 2024
074fc36
revert pt2
TheCandianVendingMachine May 27, 2024
909a028
readd javelin
TheCandianVendingMachine May 27, 2024
bb4ff28
split iron dome
TheCandianVendingMachine May 27, 2024
af5f7d3
cleanup laser
TheCandianVendingMachine May 27, 2024
1270d17
remove GPS files
TheCandianVendingMachine May 27, 2024
744cd45
remove gps definitions
TheCandianVendingMachine May 27, 2024
972ad68
remove IR
TheCandianVendingMachine May 28, 2024
46aa1ae
remove MCLOS
TheCandianVendingMachine May 28, 2024
87c819f
remove doppler
TheCandianVendingMachine May 28, 2024
9ebd8fd
final cleanup
TheCandianVendingMachine May 28, 2024
607cc8c
restore final final i promise
TheCandianVendingMachine May 28, 2024
bcb6ed7
cleanup arbitrary files
TheCandianVendingMachine May 28, 2024
02c1d79
small cleanup
PabstMirror May 30, 2024
54f7494
fix hemtt warnings
PabstMirror May 30, 2024
2e23f61
Merge branch 'master' into missile_guidance_rewrite
PabstMirror Jun 20, 2024
ed260fc
cleanup unused var
PabstMirror Jun 20, 2024
1819cad
fix preping some missing files (jdam/doppler)
PabstMirror Jun 22, 2024
c70cb4f
Merge branch 'master' into missile_guidance_rewrite
PabstMirror Jul 29, 2024
98f957e
move cam func
PabstMirror Jul 29, 2024
fcf817a
Merge branch 'master' into missile_guidance_rewrite
PabstMirror Aug 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 38 additions & 13 deletions addons/missileguidance/ACE_GuidanceConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,26 @@ class GVAR(AttackProfiles) {

functionName = QFUNC(attackProfile_LIN);
};
// empty classes for backwards compat
class MID: LIN {
};
class HI: LIN {
};
class DIR {
name = "";
visualName = "";
description = "";

functionName = QFUNC(attackProfile_DIR);
};
class MID {
name = "";
visualName = "";
description = "";

functionName = QFUNC(attackProfile_MID);
};
class HI {
class LOFT {
name = "";
visualName = "";
description = "";

functionName = QFUNC(attackProfile_HI);
functionName = QFUNC(attackProfile_LOFT);
};
class JAV_DIR {
class JAV_DIR {
name = "";
visualName = "";
description = "";
Expand Down Expand Up @@ -82,12 +80,39 @@ class GVAR(SeekerTypes) {
functionName = QFUNC(seekerType_SACLOS);
onFired = QFUNC(SACLOS_onFired);
};
class ARH {
class MillimeterWaveRadar {
name = "";
visualName = "";
description = "";

functionName = QFUNC(seekerType_ARH);
onFired = QFUNC(ahr_onFired);
functionName = QFUNC(seekerType_MWR);
onFired = QFUNC(mwr_onFired);
};
};

class GVAR(NavigationTypes) {
class Direct {
functionName = QFUNC(navigationType_direct);
onFired = "";
};
class Line {
functionName = QFUNC(navigationType_line);
onFired = QFUNC(line_onFired);
};
class LineOfSight {
functionName = QFUNC(navigationType_lineOfSight);
onFired = QFUNC(proNav_onFired);
};
class ProportionalNavigation {
functionName = QFUNC(navigationType_proNav);
onFired = QFUNC(proNav_onFired);
};
class AugmentedProportionalNavigation {
functionName = QFUNC(navigationType_augmentedProNav);
onFired = QFUNC(proNav_onFired);
};
class ZeroEffortMiss {
functionName = QFUNC(navigationType_zeroEffortMiss);
onFired = QFUNC(proNav_onFired);
};
};
26 changes: 22 additions & 4 deletions addons/missileguidance/XEH_PREP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ PREP(changeMissileDirection);
PREP(checkSeekerAngle);
PREP(checkLos);

PREP(dev_ProjectileCamera);

PREP(onFired);
PREP(onIncomingMissile);

Expand All @@ -16,28 +18,44 @@ PREP(doSeekerSearch);
PREP(doHandoff);
PREP(handleHandoff);

//re-enable after feature merge - PREP(shouldFilterRadarHit);

// Attack Profiles
PREP(attackProfile_AIR);
PREP(attackProfile_DIR);
PREP(attackProfile_HI);
PREP(attackProfile_LIN);
PREP(attackProfile_MID);
PREP(attackProfile_LOFT);
PREP(attackProfile_WIRE);
PREP(attackProfile_BEAM);
//re-enable after feature merge - PREP(attackProfile_JDAM);

// Javelin profiles
PREP(attackProfile_JAV_DIR);
PREP(attackProfile_JAV_TOP);

// Navigation Profiles
PREP(navigationType_zeroEffortMiss);
PREP(navigationType_augmentedProNav);
PREP(navigationType_proNav);
PREP(navigationType_lineOfSight);
PREP(navigationType_line);
PREP(navigationType_direct);

// Seeker search functions
PREP(seekerType_SALH);
PREP(seekerType_Optic);
PREP(seekerType_SACLOS);
PREP(seekerType_ARH);
//re-enable after feature merge - PREP(seekerType_Doppler);
PREP(seekerType_MWR);

// Attack Profiles OnFired
PREP(wire_onFired);

// Seeker OnFired
PREP(SACLOS_onFired);
PREP(ahr_onFired);
PREP(mwr_onFired);

// Navigation OnFired
PREP(proNav_onFired);
PREP(line_onFired);

6 changes: 2 additions & 4 deletions addons/missileguidance/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

[QGVAR(handoff), LINKFUNC(handleHandoff)] call CBA_fnc_addEventHandler;

["ACE3 Weapons", QGVAR(cycleFireMode), localize LSTRING(CycleFireMode),
{
["ACE3 Weapons", QGVAR(cycleFireMode), localize LSTRING(CycleFireMode), {
[] call FUNC(cycleAttackProfileKeyDown);
false
},
{
}, {
false
},
[15, [false, true, false]], false] call CBA_fnc_addKeybind; //Ctrl+Tab Key
11 changes: 11 additions & 0 deletions addons/missileguidance/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,15 @@ PREP_RECOMPILE_END;
// As weapons take config changes, there is little point in being able to disable guidance
if (isNil QGVAR(enabled)) then { GVAR(enabled) = 2; };

GVAR(debug_enableMissileCamera) = false;
GVAR(debug_drawGuidanceInfo) = false;

#ifdef DRAW_GUIDANCE_INFO
GVAR(debug_drawGuidanceInfo) = true;
#endif

#ifdef ENABLE_PROJECTILE_CAMERA
GVAR(debug_enableMissileCamera) = true;
#endif

ADDON = true;
26 changes: 26 additions & 0 deletions addons/missileguidance/dev/getAmmoProperties.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#include "..\script_component.hpp"

private _configs = configProperties [configFile >> "CfgAmmo", QUOTE((isClass _x) && { isClass (_x >> QUOTE(QUOTE(ADDON)))})];

private _seekerTypes = createHashMap;
private _navigationTypes = createHashMap;
private _attackProfiles = createHashMap;
{
private _seekerType = getText (_x >> QUOTE(ADDON) >> "defaultSeekerType");
private _navigationType = getText (_x >> QUOTE(ADDON) >> "defaultNavigationType");
private _attackProfile = getText (_x >> QUOTE(ADDON) >> "defaultAttackProfile");

private _seekers = _seekerTypes getOrDefault [_seekerType, []];
private _navigations = _navigationTypes getOrDefault [_navigationType, []];
private _attacks = _attackProfiles getOrDefault [_attackProfile, []];

_seekers pushBack configName _x;
_navigations pushBack configName _x;
_attacks pushBack configName _x;

_seekerTypes set [_seekerType, _seekers];
_navigationTypes set [_navigationType, _navigations];
_attackProfiles set [_attackProfile, _attacks];
} forEach _configs;

[_seekerTypes, _navigationTypes, _attackProfiles]
1 change: 0 additions & 1 deletion addons/missileguidance/functions/fnc_SACLOS_onFired.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ _seekerStateParams set [2, _animationSourceGun];
_seekerStateParams set [3, _usePilotCamera || { (_shooter isKindOf "Plane") && hasPilotCamera _shooter }];

if ((_shooter isKindOf "Plane") && !hasPilotCamera _shooter) then { WARNING("SACLOS fired from planes without pilot camera unsupported!"); };

29 changes: 12 additions & 17 deletions addons/missileguidance/functions/fnc_attackProfile_BEAM.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,26 @@
* Public: No
*/
params ["_seekerTargetPos", "_args", "_attackProfileStateParams"];
_args params ["_firedEH"];
_args params ["_firedEH", "", "", "", "", "_targetData"];
_firedEH params ["_shooter","","","","","","_projectile"];
_attackProfileStateParams params["_maxCorrectableDistance", "_wireCut", "_randomVector", "_crosshairOffset", "_seekerMaxRangeSqr", "_seekerMinRangeSqr", "_wireCutSource", "_distanceAheadOfMissile"];
_attackProfileStateParams params ["_maxCorrectableDistance", "_wireCut", "_lastInput", "_crosshairOffset", "_seekerMaxRangeSqr", "_seekerMinRangeSqr", "_wireCutSource", "_distanceAheadOfMissile"];

private _projectilePos = getPosASL _projectile;
private _shooterPos = getPosASL _shooter;

private _shooterDir = vectorNormalized(_seekerTargetPos vectorDiff _shooterPos);
private _distanceToProjectile = _shooterPos vectorDistanceSqr _projectilePos;

if (_distanceToProjectile > _seekerMaxRangeSqr || { _seekerTargetPos isEqualTo [0, 0, 0] } || { _distanceToProjectile < _seekerMinRangeSqr }) exitWith {
// return position 50m infront of projectile
_projectilePos vectorAdd (_projectile vectorModelToWorld [0, 50, 0])
if ((_distanceToProjectile > _seekerMaxRangeSqr) || { _wireCut }) exitWith {
// wire snap, random direction
if !(_wireCut) then {
_attackProfileStateParams set [1, true];
};
_lastInput
};

private _relativeCorrection = _projectile vectorWorldToModel (_projectilePos vectorDiff _seekerTargetPos);
_relativeCorrection = _relativeCorrection vectorDiff _crosshairOffset;
private _final = _seekerTargetPos vectorAdd _crosshairOffset;
_attackProfileStateParams set [2, _final];

private _magnitude = vectorMagnitude [_relativeCorrection select 0, 0, _relativeCorrection select 2];
private _fovImpulse = 1 min (_magnitude / _maxCorrectableDistance); // the simulated impulse for the missile being close to the center of the crosshair
_targetData set [0, _projectilePos vectorFromTo _final];

// Adjust the impulse due to near-zero values creating wobbly missiles?
private _correction = _fovImpulse;


_relativeCorrection = (vectorNormalized _relativeCorrection) vectorMultiply _correction;
private _returnPos = _projectilePos vectorDiff (_projectile vectorModelToWorld _relativeCorrection);
_returnPos vectorAdd (_shooterDir vectorMultiply _distanceAheadOfMissile)
_final
7 changes: 4 additions & 3 deletions addons/missileguidance/functions/fnc_attackProfile_DIR.sqf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "..\script_component.hpp"
/*
* Author: jaynus / nou
* Author: tcvm
* Attack profile: DIR
* TODO: falls back to Linear
* Returns target position with no modifications
*
* Arguments:
* 0: Seeker Target PosASL <ARRAY>
Expand All @@ -18,4 +18,5 @@
* Public: No
*/

_this call FUNC(attackProfile_LIN);
params ["_seekerTargetPos"];
_seekerTargetPos
21 changes: 0 additions & 21 deletions addons/missileguidance/functions/fnc_attackProfile_HI.sqf

This file was deleted.

34 changes: 19 additions & 15 deletions addons/missileguidance/functions/fnc_attackProfile_LIN.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
*/

params ["_seekerTargetPos", "_args"];
_args params ["_firedEH"];
_args params ["_firedEH", "_launchParams"];
_firedEH params ["_shooter","","","","","","_projectile"];
_launchParams params ["","_targetLaunchParams"];
_targetLaunchParams params ["", "", "_launchPos"];

if (_seekerTargetPos isEqualTo [0,0,0]) exitWith {_seekerTargetPos};

Expand All @@ -30,29 +32,31 @@ private _distanceToTarget = _projectilePos vectorDistance _seekerTargetPos;
private _distanceToShooter = _projectilePos vectorDistance _shooterPos;
private _distanceShooterToTarget = _shooterPos vectorDistance _seekerTargetPos;

private _ttgo = _distanceToTarget / (vectorMagnitude velocity _projectile);

TRACE_2("",_distanceToTarget,_distanceToShooter);

// Add height depending on distance for compensate
private _addHeight = [0,0,0];

// Always climb an arc on initial launch if we are close to the round
if ((((ASLtoAGL _projectilePos) select 2) < 5) && {_distanceToShooter < 15}) then {
_addHeight = _addHeight vectorAdd [0,0,_distanceToTarget];
TRACE_1("climb - near shooter",_addHeight);
private _2dDistance = (800 + (_projectilePos distance2D _launchPos)) / (_projectilePos distance2D _seekerTargetPos);

if (_2dDistance <= 1) then {
_addHeight = [0, 0, (_projectilePos#2) + 8];
} else {
// If we are below the target, increase the climbing arc
if (((_projectilePos select 2) < (_seekerTargetPos select 2)) && {_distanceToTarget > 100}) then {
_addHeight = _addHeight vectorAdd [0,0, ((_seekerTargetPos select 2) - (_projectilePos select 2))];
TRACE_1("climb - below target and far",_addHeight);
// Always climb an arc on initial launch if we are close to the round
if ((((ASLtoAGL _projectilePos) select 2) < 5) && {_distanceToShooter < 15}) then {
_addHeight = _addHeight vectorAdd [0,0,_distanceToTarget];
TRACE_1("climb - near shooter",_addHeight);
} else {
// If we are below the target, increase the climbing arc
if (((_projectilePos select 2) < (_seekerTargetPos select 2)) && {_distanceToTarget > 100}) then {
_addHeight = _addHeight vectorAdd [0,0, ((_seekerTargetPos select 2) - (_projectilePos select 2))];
TRACE_1("climb - below target and far",_addHeight);
};
};
};

// Projectile above target
if ((_projectilePos select 2) > (_seekerTargetPos select 2)) then {
TRACE_1("above - far",_addHeight);
_addHeight = _addHeight vectorAdd [0,0, _distanceToTarget / 50];
};

private _returnTargetPos = _seekerTargetPos vectorAdd _addHeight;

TRACE_2("Adjusted target position",_returnTargetPos,_addHeight);
Expand Down
53 changes: 53 additions & 0 deletions addons/missileguidance/functions/fnc_attackProfile_LOFT.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#include "..\script_component.hpp"
/*
* Author: jaynus / nou
* Attack profile: AIR
* TODO: falls back to Linear
*
* Arguments:
* 0: Seeker Target PosASL <ARRAY>
* 1: Guidance Arg Array <ARRAY>
* 2: Seeker State <ARRAY>
*
* Return Value:
* Missile Aim PosASL <ARRAY>
*
* Example:
* [[1,2,3], [], []] call ace_missileguidance_fnc_attackProfile_AIR;
*
* Public: No
*/

params ["_seekerTargetPos", "_args"];
_args params ["_firedEH", "_launchParams", "_flightParams", "_seekerParams", "_stateParams"];
_firedEH params ["_shooter","","","","_ammo","","_projectile"];
_launchParams params ["_shooter","_targetLaunchParams","_seekerType","_attackProfile","_lockMode","_laserInfo","_navigationType"];
_targetLaunchParams params ["_target", "_targetPos", "_launchPos", "_launchDir", "_launchTime"];
_flightParams params ["_pitchRate", "_yawRate", "_isBangBangGuidance"];
_stateParams params ["_lastRunTime", "_seekerStateParams", "_attackProfileStateParams", "_lastKnownPosState","_navigationParams"];
_seekerParams params ["_seekerAngle", "_seekerAccuracy", "_seekerMaxRange", "_seekerMinRange"];

if (_seekerTargetPos isEqualTo [0, 0, 0]) exitWith {
_seekerTargetPos
};

private _projectilePos = getPosASLVisual _projectile;
private _distanceToTarget2d = _projectilePos distance2d _seekerTargetPos;

private _closingRate = vectorMagnitude velocity _projectile;
private _timeToGo = (_projectilePos distance _seekerTargetPos) / _closingRate;

// we could do stuff like desired attack angle, but I'm not going that far today
private _los = vectorNormalized (_seekerTargetPos vectorDiff _projectilePos);

private _angleToTarget = acos ((vectorDir _projectile) vectorCos _los);
private _atMinRotationAngle = _angleToTarget >= (0.5 * _pitchRate * _timeToGo);

private _returnTargetPos = _seekerTargetPos;

if (!_atMinRotationAngle && _distanceToTarget2d >= 500 && _timeToGo >= 10) then {
// 10 degree pitch up
_returnTargetPos = _seekerTargetPos vectorAdd [0, 0, (_projectilePos distance _seekerTargetPos) * sin 10];
};

_returnTargetPos
Loading
Loading