SACLOS tweaks

This commit is contained in:
Brandon Danyluk 2021-08-02 17:32:35 -06:00
parent 98e66d20ab
commit 82c14a0ae2
6 changed files with 9 additions and 14 deletions

View File

@ -74,8 +74,8 @@ class CfgAmmo {
defaultNavigationType = "Line";
navigationTypes[] = { "Line" };
lineGainP = 5;
lineGainD = 5;
lineGainP = 15;
lineGainD = 15;
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

View File

@ -28,7 +28,7 @@ class CfgAmmo {
navigationTypes[] = { "Line" };
lineGainP = 10;
lineGainD = 15;
lineGainD = 10;
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

View File

@ -42,12 +42,7 @@ if ((_distanceToProjectile > _seekerMaxRangeSqr) || { _wireCut }) exitWith {
};
if (_seekerTargetPos isEqualTo [0, 0, 0] || { _distanceToProjectile < _seekerMinRangeSqr }) exitWith {
// cut wire if its caught on terrain
/*if (lineIntersectsSurfaces [getPosASL _shooter, _projectilePos, _shooter] isNotEqualTo []) then {
_attackProfileStateParams set [1, true];
};*/
// return position 50m infront of projectile and a bit up to get out of the way of the ground
_projectilePos vectorAdd (_projectile vectorModelToWorld [0, 50, 3])
_projectilePos vectorAdd (_projectile vectorModelToWorld [0, 5, 5])
};
_seekerTargetPos vectorAdd _crosshairOffset

View File

@ -43,9 +43,9 @@ private _accelerationX = _pX + _dX;
private _accelerationY = _pY + _dY;
private _commandedAcceleration = [
_accelerationX,
_accelerationX * _yawRate,
0,
_accelerationY
_accelerationY * _pitchRate
];
_navigationParams set [3, _errorX];

View File

@ -61,7 +61,7 @@ if ((_testDotProduct < (cos _seekerAngle)) || {_testIntersections isNotEqualTo [
private _returnPos = _shooterPos vectorAdd (_lookDirection vectorMultiply _distanceToProj);
_targetData set [0, _lookDirection];
_targetData set [2, _returnPos distance getPosASLVisual _projectile];
_targetData set [2, _returnPos vectorDistance getPosASLVisual _projectile];
_returnPos

View File

@ -28,8 +28,8 @@ class CfgAmmo {
navigationTypes[] = { "Line" };
lineGainP = 25;
lineGainD = 22;
correctionDistance = 30;
lineGainD = 20;
correctionDistance = 2;
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