2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2015-04-11 21:40:46 +00:00
|
|
|
/*
|
|
|
|
* Author: Ruthberg
|
|
|
|
* Calculates the range card output based on the current data set
|
|
|
|
*
|
|
|
|
* Arguments:
|
2017-06-08 13:31:51 +00:00
|
|
|
* None
|
2015-04-11 21:40:46 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
2017-06-08 13:31:51 +00:00
|
|
|
* None
|
2015-04-11 21:40:46 +00:00
|
|
|
*
|
|
|
|
* Example:
|
2016-07-20 04:15:18 +00:00
|
|
|
* call ace_atragmx_fnc_calculate_range_card
|
2015-04-11 21:40:46 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-04-06 13:51:59 +00:00
|
|
|
|
2016-12-01 09:23:03 +00:00
|
|
|
GVAR(rangeCardData) = [];
|
2015-04-06 13:51:59 +00:00
|
|
|
|
2016-09-04 14:44:22 +00:00
|
|
|
private _targetRange = GVAR(rangeCardEndRange);
|
2015-04-17 22:11:53 +00:00
|
|
|
if (GVAR(currentUnit) == 1) then {
|
|
|
|
_targetRange = _targetRange / 1.0936133;
|
|
|
|
};
|
2015-04-06 13:51:59 +00:00
|
|
|
|
2016-12-01 09:23:03 +00:00
|
|
|
private _solutionInput = +GVAR(targetSolutionInput);
|
|
|
|
_solutionInput set [ 8, round(_solutionInput select 4)];
|
|
|
|
_solutionInput set [13, _targetRange];
|
|
|
|
_solutionInput set [17, true];
|
2015-04-06 13:51:59 +00:00
|
|
|
|
2017-11-03 20:59:33 +00:00
|
|
|
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
|
|
|
private _c1 = [_targetRange] call FUNC(lookup_c1_ballistic_coefficient);
|
|
|
|
_solutionInput set [14, _c1];
|
|
|
|
};
|
|
|
|
|
2016-12-01 09:23:03 +00:00
|
|
|
private _result = _solutionInput call FUNC(calculate_solution);
|