#include "..\script_component.hpp" /* * Author: LorenLuke * Adjusts a target point north and east, and recalculates a solution in air based on atmospheric conditions * * Arguments: * 0: Gun Position ASL * 1: Target Position ASL * 2: Adjustment to the East (negative is West); meters * 3: Adjustment to the North (negative is South); meters * 4: Adjustment vertically (negative is Down); meters * 5: Muzzle velocity; meters/second * 6: Air Friction; meters^-1 (m/s^2)/(m^2/s^2) * 7: High angle boolean (true is high angle) * 8: Temperature; degrees Celsius * 9: Atmospheric Density; kg/(meters^3) * 10: Direction of wind; degrees clockwise from north * 11: Speed of wind; meters/second * * Return Value: * Array of returns * 0: Angle of shot; Milliradians * 1: Angle adjust left or right; Milliradians * 2: Time of flight; seconds * * Example: * [getposASL vehicle player, targetPos, 20, 50, 0, 200, -0.0001, true, 15, 1.225, 225, 5] call ace_artilleryTables_fnc_adjustFire * * Public: No */ params ["_gunPos", "_targetPos", "_adjustEast", "_adjustNorth", "_adjustUp", "_muzzleVelocity", "_airFriction", ["_highAngle", true], ["_temperature", 15], ["_airDensity", 1.225], ["_windDir", 0], ["_windSpeed", 0]]; //DEFAULT_AIR_FRICTION == -0.00006 //MK6_82mm_AIR_FRICTION == -0.0001 private _resultPos = [_adjustEast + _targetPos select 0, _adjustNorth + _targetPos select 1, _adjustUp + _targetPos select 2]; private _returns = ["_gunPos", "_resultPos", "_muzzleVelocity", "_highAngle", "_airFriction", "_temperature", "_airDensity", "_windDir", "_windSpeed"] call FUNC(calculateSolution); _returns