mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
81e02a7336
* Everything * Fixed missing ; * Fix missing ; and double private * Fixed cannot isNull on number * Turn _temparture back to isNil * Fix error from merge
31 lines
817 B
Plaintext
31 lines
817 B
Plaintext
/*
|
|
* Author: Rosuto, Ruthberg
|
|
* Handles incoming data packets from the Vectronix Vector LRF
|
|
*
|
|
* Arguments:
|
|
* 0: Slope distance (Meters) <NUMBER>
|
|
* 1: Azimuth (Degrees) <NUMBER>
|
|
* 2: Inclination (Degrees) <NUMBER>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [1000, 45, 1] call ace_dagr_fnc_handleRangeFinderData
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
#define EMP_RF_ACC 5 // Rangefinder Accuracy
|
|
|
|
params ["_slopeDistance", "_azimuth", "_inclination"];
|
|
|
|
if (GVAR(vectorConnected)) then {
|
|
GVAR(LAZPOS) = (eyePos player) vectorAdd ([_slopeDistance, _azimuth, _inclination] call CBA_fnc_polar2vect);
|
|
GVAR(LAZDIST) = _slopeDistance * cos(_inclination);
|
|
GVAR(LAZDIST) = floor (GVAR(LAZDIST) / EMP_RF_ACC) * EMP_RF_ACC;
|
|
GVAR(LAZHEADING) = _azimuth;
|
|
GVAR(noVectorData) = false;
|
|
};
|