mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix metis and HOT to use new scheme
This commit is contained in:
parent
bac6a0b6dd
commit
cf40622b52
@ -36,9 +36,8 @@ class CfgAmmo {
|
|||||||
maxControlRange = 1500;
|
maxControlRange = 1500;
|
||||||
|
|
||||||
class ace_missileguidance {
|
class ace_missileguidance {
|
||||||
minDeflection = 0;
|
pitchRate = 0;
|
||||||
maxDeflection = 0;
|
yawRate = 0;
|
||||||
incDeflection = 0;
|
|
||||||
|
|
||||||
canVanillaLock = 0;
|
canVanillaLock = 0;
|
||||||
|
|
||||||
@ -49,6 +48,9 @@ class CfgAmmo {
|
|||||||
defaultSeekerLockMode = "LOAL";
|
defaultSeekerLockMode = "LOAL";
|
||||||
seekerLockModes[] = { "LOAL", "LOBL" };
|
seekerLockModes[] = { "LOAL", "LOBL" };
|
||||||
|
|
||||||
|
defaultNavigationType = "LineOfSight";
|
||||||
|
navigationTypes[] = { "LineOfSight" };
|
||||||
|
|
||||||
seekLastTargetPos = 0;
|
seekLastTargetPos = 0;
|
||||||
seekerAngle = 30;
|
seekerAngle = 30;
|
||||||
seekerAccuracy = 1;
|
seekerAccuracy = 1;
|
||||||
|
@ -57,9 +57,8 @@ class CfgAmmo {
|
|||||||
class ace_missileguidance {
|
class ace_missileguidance {
|
||||||
enabled = 1;
|
enabled = 1;
|
||||||
|
|
||||||
minDeflection = 0; // Minium flap deflection for guidance
|
pitchRate = 15; // Minium flap deflection for guidance
|
||||||
maxDeflection = 0.0030; // Maximum flap deflection for guidance
|
yawRate = 15; // Maximum flap deflection for guidance
|
||||||
incDeflection = 0.0005; // The incrmeent in which deflection adjusts.
|
|
||||||
|
|
||||||
canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode
|
canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode
|
||||||
|
|
||||||
@ -70,6 +69,9 @@ class CfgAmmo {
|
|||||||
defaultSeekerLockMode = "LOAL";
|
defaultSeekerLockMode = "LOAL";
|
||||||
seekerLockModes[] = { "LOAL", "LOBL" };
|
seekerLockModes[] = { "LOAL", "LOBL" };
|
||||||
|
|
||||||
|
defaultNavigationType = "LineOfSight";
|
||||||
|
navigationTypes[] = { "LineOfSight" };
|
||||||
|
|
||||||
seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos]
|
seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos]
|
||||||
seekerAngle = 30; // Angle from the shooter's view that can track the missile
|
seekerAngle = 30; // Angle from the shooter's view that can track the missile
|
||||||
seekerAccuracy = 1; // seeker accuracy multiplier
|
seekerAccuracy = 1; // seeker accuracy multiplier
|
||||||
|
@ -10,9 +10,8 @@ class CfgAmmo {
|
|||||||
class ace_missileguidance {
|
class ace_missileguidance {
|
||||||
enabled = 1;
|
enabled = 1;
|
||||||
|
|
||||||
minDeflection = 0; // Minium flap deflection for guidance
|
pitchRate = 25; // Minium flap deflection for guidance
|
||||||
maxDeflection = 0.0027; // Maximum flap deflection for guidance
|
yawRate = 25; // Maximum flap deflection for guidance
|
||||||
incDeflection = 0.0005; // The incrmeent in which deflection adjusts.
|
|
||||||
|
|
||||||
canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode
|
canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode
|
||||||
|
|
||||||
@ -23,6 +22,9 @@ class CfgAmmo {
|
|||||||
defaultSeekerLockMode = "LOAL";
|
defaultSeekerLockMode = "LOAL";
|
||||||
seekerLockModes[] = { "LOAL", "LOBL" };
|
seekerLockModes[] = { "LOAL", "LOBL" };
|
||||||
|
|
||||||
|
defaultNavigationType = "LineOfSight";
|
||||||
|
navigationTypes[] = { "LineOfSight" };
|
||||||
|
|
||||||
seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos]
|
seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos]
|
||||||
seekerAngle = 15; // Angle from the shooter's view that can track the missile
|
seekerAngle = 15; // Angle from the shooter's view that can track the missile
|
||||||
seekerAccuracy = 1; // seeker accuracy multiplier
|
seekerAccuracy = 1; // seeker accuracy multiplier
|
||||||
@ -50,9 +52,8 @@ class CfgAmmo {
|
|||||||
class ace_missileguidance {
|
class ace_missileguidance {
|
||||||
enabled = 1;
|
enabled = 1;
|
||||||
|
|
||||||
minDeflection = 0; // Minium flap deflection for guidance
|
pitchRate = 25; // Minium flap deflection for guidance
|
||||||
maxDeflection = 0.0027; // Maximum flap deflection for guidance
|
yawRate = 25; // Maximum flap deflection for guidance
|
||||||
incDeflection = 0.0005; // The incrmeent in which deflection adjusts.
|
|
||||||
|
|
||||||
canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode
|
canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode
|
||||||
|
|
||||||
@ -63,6 +64,9 @@ class CfgAmmo {
|
|||||||
defaultSeekerLockMode = "LOAL";
|
defaultSeekerLockMode = "LOAL";
|
||||||
seekerLockModes[] = { "LOAL", "LOBL" };
|
seekerLockModes[] = { "LOAL", "LOBL" };
|
||||||
|
|
||||||
|
defaultNavigationType = "LineOfSight";
|
||||||
|
navigationTypes[] = { "LineOfSight" };
|
||||||
|
|
||||||
seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos]
|
seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos]
|
||||||
seekerAngle = 15; // Angle from the shooter's view that can track the missile
|
seekerAngle = 15; // Angle from the shooter's view that can track the missile
|
||||||
seekerAccuracy = 1; // seeker accuracy multiplier
|
seekerAccuracy = 1; // seeker accuracy multiplier
|
||||||
@ -70,7 +74,7 @@ class CfgAmmo {
|
|||||||
seekerMinRange = 80;
|
seekerMinRange = 80;
|
||||||
seekerMaxRange = 2000; // Range from the missile which the seeker can visually search
|
seekerMaxRange = 2000; // Range from the missile which the seeker can visually search
|
||||||
|
|
||||||
correctionDistance = 3; // distance from center of crosshair where missile slows down
|
correctionDistance = 6; // distance from center of crosshair where missile slows down
|
||||||
offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair.
|
offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair.
|
||||||
|
|
||||||
// Attack profile type selection
|
// Attack profile type selection
|
||||||
|
@ -24,7 +24,7 @@ params ["_args", "_pfID"];
|
|||||||
_args params ["_firedEH", "_launchParams", "_flightParams", "_seekerParams", "_stateParams"];
|
_args params ["_firedEH", "_launchParams", "_flightParams", "_seekerParams", "_stateParams"];
|
||||||
_firedEH params ["_shooter","","","","_ammo","","_projectile"];
|
_firedEH params ["_shooter","","","","_ammo","","_projectile"];
|
||||||
_launchParams params ["","_targetLaunchParams","","","","","_navigationType"];
|
_launchParams params ["","_targetLaunchParams","","","","","_navigationType"];
|
||||||
_stateParams params ["_lastRunTime", "_seekerStateParams", "_attackProfileStateParams", "_lastKnownPosState", "_navigationParameters"];
|
_stateParams params ["_lastRunTime", "_seekerStateParams", "_attackProfileStateParams", "_lastKnownPosState", "_navigationParameters", "_guidanceParameters"];
|
||||||
|
|
||||||
if (!alive _projectile || isNull _projectile || isNull _shooter) exitWith {
|
if (!alive _projectile || isNull _projectile || isNull _shooter) exitWith {
|
||||||
[_pfID] call CBA_fnc_removePerFrameHandler;
|
[_pfID] call CBA_fnc_removePerFrameHandler;
|
||||||
@ -55,8 +55,7 @@ if ((_pitchRate != 0 || {_yawRate != 0}) && {_profileAdjustedTargetPos isNotEqua
|
|||||||
|
|
||||||
// activate missile servos and change direction
|
// activate missile servos and change direction
|
||||||
if (!isGamePaused && accTime > 0) then {
|
if (!isGamePaused && accTime > 0) then {
|
||||||
_navigationParameters params ["", "_currentPitchYawRoll"];
|
_guidanceParameters params ["_yaw", "_roll", "_pitch"];
|
||||||
_currentPitchYawRoll params ["_yaw", "_roll", "_pitch"];
|
|
||||||
|
|
||||||
_commandedAcceleration = _projectile vectorWorldToModelVisual _commandedAcceleration;
|
_commandedAcceleration = _projectile vectorWorldToModelVisual _commandedAcceleration;
|
||||||
_commandedAcceleration params ["_yawChange", "", "_pitchChange"];
|
_commandedAcceleration params ["_yawChange", "", "_pitchChange"];
|
||||||
@ -90,10 +89,10 @@ if ((_pitchRate != 0 || {_yawRate != 0}) && {_profileAdjustedTargetPos isNotEqua
|
|||||||
[_projectile, _pitch, _yaw, 0] call FUNC(changeMissileDirection);
|
[_projectile, _pitch, _yaw, 0] call FUNC(changeMissileDirection);
|
||||||
_projectile setVelocityModelSpace [0, vectorMagnitude velocity _projectile, 0];
|
_projectile setVelocityModelSpace [0, vectorMagnitude velocity _projectile, 0];
|
||||||
|
|
||||||
_currentPitchYawRoll set [0, _yaw];
|
_guidanceParameters set [0, _yaw];
|
||||||
_currentPitchYawRoll set [2, _pitch];
|
_guidanceParameters set [2, _pitch];
|
||||||
|
|
||||||
_navigationParameters set [1, _currentPitchYawRoll];
|
_stateParams set [5, _guidanceParameters];
|
||||||
};
|
};
|
||||||
|
|
||||||
_stateParams set [4, _navigationParameters];
|
_stateParams set [4, _navigationParameters];
|
||||||
|
@ -19,4 +19,4 @@ _args params ["_firedEH"];
|
|||||||
_firedEH params ["","","","","","","_projectile"];
|
_firedEH params ["","","","","","","_projectile"];
|
||||||
|
|
||||||
private _lineOfSight = vectorNormalized (_profileAdjustedTargetPos vectorDiff getPosASLVisual _projectile);
|
private _lineOfSight = vectorNormalized (_profileAdjustedTargetPos vectorDiff getPosASLVisual _projectile);
|
||||||
_lineOfSight
|
_lineOfSight vectorMultiply 50
|
||||||
|
@ -18,7 +18,7 @@ params ["_args", "_timestep", "_seekerTargetPos", "_profileAdjustedTargetPos"];
|
|||||||
_args params ["_firedEH", "", "", "", "_stateParams"];
|
_args params ["_firedEH", "", "", "", "_stateParams"];
|
||||||
_firedEH params ["","","","","","","_projectile"];
|
_firedEH params ["","","","","","","_projectile"];
|
||||||
_stateParams params ["", "", "", "","_navigationParams"];
|
_stateParams params ["", "", "", "","_navigationParams"];
|
||||||
_navigationParams params ["_lastMissileFrame", "", "_navigationGain"];
|
_navigationParams params ["_lastMissileFrame", "_navigationGain"];
|
||||||
_lastMissileFrame params ["_lastTargetPosition", "_lastTargetVelocity", "_lastLineOfSight"];
|
_lastMissileFrame params ["_lastTargetPosition", "_lastTargetVelocity", "_lastLineOfSight"];
|
||||||
|
|
||||||
// Proportional navigation implemented via "Fundamentals of proportional navigation" by Stephen Murtaugh and Harry Criel
|
// Proportional navigation implemented via "Fundamentals of proportional navigation" by Stephen Murtaugh and Harry Criel
|
||||||
|
@ -118,6 +118,7 @@ if (isNumber (_config >> "pitchRate")) then {
|
|||||||
_bangBang = 1 == getNumber (_config >> "bangBangGuidance");
|
_bangBang = 1 == getNumber (_config >> "bangBangGuidance");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private _pitchYaw = (vectorDir _projectile) call CBA_fnc_vect2Polar;
|
||||||
TRACE_5("Beginning ACE guidance system",_target,_ammo,_seekerType,_attackProfile,_navigationType);
|
TRACE_5("Beginning ACE guidance system",_target,_ammo,_seekerType,_attackProfile,_navigationType);
|
||||||
private _args = [_this,
|
private _args = [_this,
|
||||||
[ _shooter,
|
[ _shooter,
|
||||||
@ -139,7 +140,7 @@ private _args = [_this,
|
|||||||
getNumber ( _config >> "seekerMaxRange" ),
|
getNumber ( _config >> "seekerMaxRange" ),
|
||||||
getNumber ( _config >> "seekerMinRange" )
|
getNumber ( _config >> "seekerMinRange" )
|
||||||
],
|
],
|
||||||
[ diag_tickTime, [], [], _lastKnownPosState, _navigationParameters]
|
[ diag_tickTime, [], [], _lastKnownPosState, _navigationParameters, [_pitchYaw select 1, 0, _pitchYaw select 2]]
|
||||||
];
|
];
|
||||||
|
|
||||||
private _onFiredFunc = getText (configFile >> QGVAR(SeekerTypes) >> _seekerType >> "onFired");
|
private _onFiredFunc = getText (configFile >> QGVAR(SeekerTypes) >> _seekerType >> "onFired");
|
||||||
|
@ -27,14 +27,12 @@ if (_navigationGain == 0) then {
|
|||||||
_navigationGain = 3;
|
_navigationGain = 3;
|
||||||
};
|
};
|
||||||
|
|
||||||
private _pitchYaw = (vectorDir _projectile) call CBA_fnc_vect2Polar;
|
|
||||||
_navigationParams = [
|
_navigationParams = [
|
||||||
[ // Last Missile Frame
|
[ // Last Missile Frame
|
||||||
[0, 0, 0], // Last target position array
|
[0, 0, 0], // Last target position array
|
||||||
[0, 0, 0], // Last target velocity
|
[0, 0, 0], // Last target velocity
|
||||||
[0, 0, 0] // Last line of sight
|
[0, 0, 0] // Last line of sight
|
||||||
],
|
],
|
||||||
[_pitchYaw select 1, 0, _pitchYaw select 2], // current yaw/roll/pitch
|
|
||||||
_navigationGain // navigation gain of missile. Set in the navigation onFired function
|
_navigationGain // navigation gain of missile. Set in the navigation onFired function
|
||||||
];
|
];
|
||||||
_stateParams set [4, _navigationParams];
|
_stateParams set [4, _navigationParams];
|
||||||
|
@ -15,7 +15,7 @@ Seeker Types:
|
|||||||
Laser - causes lots of weapon noise, causing bad guidance
|
Laser - causes lots of weapon noise, causing bad guidance
|
||||||
|
|
||||||
Navigation Types:
|
Navigation Types:
|
||||||
GBU-12 - LOS Guidance
|
GBU-12 - Simple ProNav Guidance
|
||||||
NLAW - LOS Guidance
|
NLAW - LOS Guidance
|
||||||
Dragon - LOS Guidance
|
Dragon - LOS Guidance
|
||||||
Metis - LOS Guidance
|
Metis - LOS Guidance
|
||||||
|
Loading…
Reference in New Issue
Block a user