mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
ATragMX - Simplified Coriolis calculation (#4716)
This commit is contained in:
parent
23ff6252cf
commit
dff577d5d1
@ -97,19 +97,12 @@ if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) t
|
||||
_bc = parseNumber(("ace_advanced_ballistics" callExtension format["atmosphericCorrection:%1:%2:%3:%4:%5", _bc, _temperature, _barometricPressure, _relativeHumidity, _atmosphereModel]));
|
||||
};
|
||||
|
||||
private ["_speedTotal", "_stepsTotal", "_speedAverage"];
|
||||
_speedTotal = 0;
|
||||
_stepsTotal = 0;
|
||||
_speedAverage = 0;
|
||||
|
||||
private ["_eoetvoesMultiplier"];
|
||||
_eoetvoesMultiplier = 0;
|
||||
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
||||
_eoetvoesMultiplier = 2 * (0.0000729 * _muzzleVelocity / -9.80665) * cos(_latitude) * sin(_directionOfFire);
|
||||
};
|
||||
|
||||
_TOF = 0;
|
||||
|
||||
_bulletPos set [0, 0];
|
||||
_bulletPos set [1, 0];
|
||||
_bulletPos set [2, -(_boreHeight / 100)];
|
||||
@ -121,10 +114,6 @@ _bulletVelocity set [2, Sin(_scopeBaseAngle) * _muzzleVelocity];
|
||||
while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do {
|
||||
_bulletSpeed = vectorMagnitude _bulletVelocity;
|
||||
|
||||
_speedTotal = _speedTotal + _bulletSpeed;
|
||||
_stepsTotal = _stepsTotal + 1;
|
||||
_speedAverage = (_speedTotal / _stepsTotal);
|
||||
|
||||
_trueVelocity = _bulletVelocity vectorDiff _wind1;
|
||||
_trueSpeed = vectorMagnitude _trueVelocity;
|
||||
|
||||
@ -162,7 +151,7 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do {
|
||||
|
||||
if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (_bulletPos select 1) > 0) then {
|
||||
// Coriolis
|
||||
_horizontalDeflection = 0.0000729 * ((_bulletPos select 1) ^ 2) * sin(_latitude) / _speedAverage;
|
||||
_horizontalDeflection = 0.0000729 * (_bulletPos select 1) * _TOF * sin(_latitude);
|
||||
_horizontalCoriolis = - atan(_horizontalDeflection / (_bulletPos select 1));
|
||||
_windage1 = _windage1 + _horizontalCoriolis;
|
||||
_windage2 = _windage2 + _horizontalCoriolis;
|
||||
@ -198,7 +187,7 @@ _kineticEnergy = _kineticEnergy * 0.737562149;
|
||||
|
||||
if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (_bulletPos select 1) > 0) then {
|
||||
// Coriolis
|
||||
_horizontalDeflection = 0.0000729 * ((_bulletPos select 1) ^ 2) * sin(_latitude) / _speedAverage;
|
||||
_horizontalDeflection = 0.0000729 * (_bulletPos select 1) * _TOF * sin(_latitude);
|
||||
_horizontalCoriolis = - atan(_horizontalDeflection / (_bulletPos select 1));
|
||||
_windage1 = _windage1 + _horizontalCoriolis;
|
||||
_windage2 = _windage2 + _horizontalCoriolis;
|
||||
|
Loading…
Reference in New Issue
Block a user