Add new navigation profile. Tweak javelin mid-course guidance

This commit is contained in:
Brandon Danyluk 2021-05-01 20:34:41 -06:00
parent f5b316176c
commit 197c1a7cae
6 changed files with 33 additions and 5 deletions

View File

@ -123,6 +123,10 @@ class GVAR(SeekerTypes) {
};
class GVAR(NavigationTypes) {
class Direct {
functionName = QFUNC(navigationType_direct);
onFired = "";
};
class Line {
functionName = QFUNC(navigationType_line);
onFired = QFUNC(line_onFired);

View File

@ -85,8 +85,8 @@ class CfgAmmo {
defaultSeekerLockMode = "LOBL";
seekerLockModes[] = { "LOBL" };
defaultNavigationType = "LineOfSight";
navigationTypes[] = { "LineOfSight", "ZeroEffortMiss" };
defaultNavigationType = "Direct";
navigationTypes[] = { "Direct", "ZeroEffortMiss" };
navigationGain = 3;
@ -106,7 +106,7 @@ class CfgAmmo {
class navigationStates {
class initial {
transitionCondition = QFUNC(javelin_midCourseTransition);
navigationType = "LineOfSight";
navigationType = "Direct";
};
class terminal {
transitionCondition = "";

View File

@ -37,6 +37,7 @@ PREP(navigationType_augmentedProNav);
PREP(navigationType_proNav);
PREP(navigationType_lineOfSight);
PREP(navigationType_line);
PREP(navigationType_direct);
// Seeker search functions
PREP(seekerType_SALH);

View File

@ -23,5 +23,6 @@ _stateParams params ["_lastRunTime", "_seekerStateParams", "_attackProfileStateP
_seekerParams params ["_seekerAngle", "_seekerAccuracy", "_seekerMaxRange", "_seekerMinRange"];
_targetData params ["_targetDirection", "_attackProfileDirection", "_targetRange", "_targetVelocity", "_targetAcceleration"];
_targetRange <= 500
_attackProfileStateParams params ["_state"];
_state isEqualTo STAGE_TERMINAL

View File

@ -0,0 +1,22 @@
#include "script_component.hpp"
/*
* Author: Brandon (TCVM)
* Points directly toward attack profile positon
*
* Arguments:
* Guidance Arg Array <ARRAY>
*
* Return Value:
* Commanded acceleration normal to LOS in world space <ARRAY>
*
* Example:
* [] call ace_missileguidance_fnc_navigationType_direct
*
* Public: No
*/
params ["_args", "", "", "_profileAdjustedTargetPos"];
_args params ["_firedEH"];
_firedEH params ["","","","","","","_projectile"];
_profileAdjustedTargetPos vectorDiff getPosASLVisual _projectile

View File

@ -45,5 +45,5 @@ if (accTime > 0) then {
_navigationParams set [0, [_attackProfileDirection]];
};
_commandedAcceleration
_targetDirection