Implemented the dual wind speed feature

This commit is contained in:
ulteq
2015-04-18 15:08:54 +02:00
parent 4449c99eba
commit 422e175f09
14 changed files with 115 additions and 57 deletions

View File

@ -60,10 +60,11 @@ if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])
};
};
private ["_latitude", "_directionOfFire", "_windSpeed", "_windDirection", "_inclinationAngle", "_targetSpeed", "_targetRange"];
private ["_latitude", "_directionOfFire", "_windSpeed1", "_windSpeed2", "_windDirection", "_inclinationAngle", "_targetSpeed", "_targetRange"];
_latitude = GVAR(latitude) select GVAR(currentTarget);
_directionOfFire = GVAR(directionOfFire) select GVAR(currentTarget);
_windSpeed = GVAR(windSpeed1) select GVAR(currentTarget);
_windSpeed1 = GVAR(windSpeed1) select GVAR(currentTarget);
_windSpeed2 = GVAR(windSpeed2) select GVAR(currentTarget);
_windDirection = GVAR(windDirection) select GVAR(currentTarget);
_inclinationAngle = GVAR(inclinationAngle) select GVAR(currentTarget);
_targetSpeed = GVAR(targetSpeed) select GVAR(currentTarget);
@ -71,10 +72,11 @@ _targetRange = GVAR(targetRange) select GVAR(currentTarget);
private ["_result"];
_result = [_scopeBaseAngle, _bulletMass, _boreHeight, _airFriction, _muzzleVelocity, _temperature, _barometricPressure, _relativeHumidity, 1000,
_windSpeed, _windDirection, _inclinationAngle, _targetSpeed, _targetRange, _bc, _dragModel, _atmosphereModel, false, _stabilityFactor, _twistDirection, _latitude] call FUNC(calculate_solution);
[_windSpeed1, _windSpeed2], _windDirection, _inclinationAngle, _targetSpeed, _targetRange, _bc, _dragModel, _atmosphereModel, false, _stabilityFactor, _twistDirection, _latitude] call FUNC(calculate_solution);
GVAR(elevationOutput) set [GVAR(currentTarget), _result select 0];
GVAR(windageOutput) set [GVAR(currentTarget), _result select 1];
GVAR(windage1Output) set [GVAR(currentTarget), (_result select 1) select 0];
GVAR(windage2Output) set [GVAR(currentTarget), (_result select 1) select 1];
GVAR(leadOutput) set [GVAR(currentTarget), _result select 2];
GVAR(tofOutput) set [GVAR(currentTarget), _result select 3];
GVAR(velocityOutput) set [GVAR(currentTarget), _result select 4];