Add hellfire mid course guidance

This commit is contained in:
Brandon Danyluk 2021-05-01 21:42:49 -06:00
parent edc8250be2
commit b4e5a29119
4 changed files with 47 additions and 4 deletions

View File

@ -38,8 +38,8 @@ class CfgAmmo {
defaultSeekerLockMode = "LOAL";
seekerLockModes[] = { "LOAL", "LOBL" };
defaultNavigationType = "ZeroEffortMiss";
navigationTypes[] = { "ZeroEffortMiss" };
defaultNavigationType = "Direct";
navigationTypes[] = { "Direct", "ZeroEffortMiss" };
seekLastTargetPos = 1; // seek last target position [if seeker loses LOS of target, continue to last known pos]
seekerAngle = 70; // Angle in front of the missile which can be searched
@ -51,6 +51,19 @@ class CfgAmmo {
// Attack profile type selection
defaultAttackProfile = "hellfire";
attackProfiles[] = {"hellfire", "hellfire_hi", "hellfire_lo"};
class navigationStates {
class initial {
transitionCondition = QFUNC(midCourseTransition);
navigationType = "Direct";
};
class terminal {
transitionCondition = "";
navigationType = "ZeroEffortMiss";
};
// transitions from initial -> termimal
states[] = {"initial", "terminal"};
};
};
};
class ACE_Hellfire_AGM114N: ACE_Hellfire_AGM114K {

View File

@ -2,3 +2,4 @@ LOG("prep");
PREP(attackProfile);
PREP(getAttackProfileSettings);
PREP(setupVehicle);
PREP(midCourseTransition);

View File

@ -0,0 +1,29 @@
#include "script_component.hpp"
/*
* Author: Brandon (TCVM)
* Condition to switch to next navigation profile
*
* Arguments:
* Guidance Arg Array <ARRAY>
*
* Return Value:
* None
*
* Example:
* [] call ace_hellfire_fnc_midCourseTransition
*
* Public: No
*/
_args params ["_firedEH", "_launchParams", "_flightParams", "_seekerParams", "_stateParams", "_targetData", "_navigationStateData"];
_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", "_guidanceParameters"];
_seekerParams params ["_seekerAngle", "_seekerAccuracy", "_seekerMaxRange", "_seekerMinRange"];
_targetData params ["_targetDirection", "_attackProfileDirection", "_targetRange", "_targetVelocity", "_targetAcceleration"];
_attackProfileStateParams params ["_state"];
_state in [STAGE_ATTACK_TERMINAL, STAGE_ATTACK_CRUISE];

View File

@ -1,7 +1,7 @@
#include "script_component.hpp"
/*
* Author: Brandon (TCVM)
* Sets up IR state arrays (called from missileGuidance's onFired).
* Condition to switch to next navigation profile
*
* Arguments:
* Guidance Arg Array <ARRAY>
@ -10,7 +10,7 @@
* None
*
* Example:
* [] call ace_missileguidance_fnc_IR_onFired
* [] call ace_missileguidance_fnc_javelin_midCourseTransition
*
* Public: No
*/