mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix bug with ZEM
This commit is contained in:
parent
1873467deb
commit
f96abc0b89
@ -105,5 +105,6 @@ class GVAR(NavigationTypes) {
|
||||
};
|
||||
class ZeroEffortMiss {
|
||||
functionName = QFUNC(navigationType_zeroEffortMiss);
|
||||
onFired = QFUNC(proNav_onFired);
|
||||
};
|
||||
};
|
||||
|
@ -47,6 +47,10 @@ if ((_pitchRate != 0 || {_yawRate != 0}) && {_profileAdjustedTargetPos isNotEqua
|
||||
private _navigationFunction = getText (configFile >> QGVAR(NavigationTypes) >> _navigationType >> "functionName");
|
||||
private _commandedAcceleration = [_args, _timestep, _seekerTargetPos, _profileAdjustedTargetPos] call (missionNamespace getVariable _navigationFunction);
|
||||
|
||||
if (isNil "_commandedAcceleration") exitWith {
|
||||
ERROR_MSG("_commandedAcceleration is nil! Guidance cancelled");
|
||||
};
|
||||
|
||||
#ifdef DRAW_GUIDANCE_INFO
|
||||
private _projectilePosAGL = ASLToAGL _projectilePos;
|
||||
drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,0,1], _projectilePosAGL vectorAdd [0, 0, 1], 0.75, 0.75, 0, str _commandedAcceleration, 1, 0.025, "TahomaB"];
|
||||
|
@ -21,6 +21,8 @@ _stateParams params ["", "", "", "","_navigationParams"];
|
||||
_navigationParams params ["", "_navigationGain"];
|
||||
_targetData params ["_targetDirection", "_targetRange", "_targetVelocity", "_targetAcceleration"];
|
||||
|
||||
_navigationGain = 3;
|
||||
|
||||
private _vectorToTarget = _targetDirection vectorMultiply _targetRange;
|
||||
private _closingVelocity = _targetVelocity vectorDiff velocity _projectile;
|
||||
private _timeToGo = _targetRange / vectorMagnitude _closingVelocity;
|
||||
|
@ -122,7 +122,7 @@ if !(isNull _target) then {
|
||||
_targetData set [3, 0]; // todo: acceleration
|
||||
};
|
||||
|
||||
_targetData set [0, _projectile vectorFromTo _expectedTargetPos];
|
||||
_targetData set [0, (getPosASLVisual _projectile) vectorFromTo _expectedTargetPos];
|
||||
|
||||
_seekerStateParams set [3, _expectedTargetPos];
|
||||
_launchParams set [0, _target];
|
||||
|
Loading…
Reference in New Issue
Block a user