comment "turntotarget/dinger@thechainofcommand.com";
private ["_myunit", "_azimuth", "_elevation", "_pos", "_posx", "_posy", "_posz", "_range", "_xelement", "_yelement", "_zelement"];
_myunit = _this select 0;
_azimuth = _this select 1;
_elevation = _this select 2;
_pos = getpos _myunit;
_posx = _pos select 0;
_posy = _pos select 1;
_posz = (_pos select 2)+1;
_zelement = _posz + (1000 * (sin _elevation));
_range = 1000 * (cos _elevation);
_xelement = _posx + (_range * (sin _azimuth));
_yelement = _posy + (_range * (cos _azimuth));
_zelement = _zelement - ([_myunit, _azimuth, _range] call CoCfIFelevation);
_myunit dowatch [_xelement, _yelement, _zelement];
comment "elevation/dinger@thechainofcommand.com";
private [{_subject}, {_direction}, {_range}, {_distance}, {_elevation}];
_subject = _this select 0;
_direction = _this select 1;
_range = _this select 2;
COCIFWidgetA setpos [(getpos _subject select 0)+ (_range * (sin _direction)), (getpos _subject select 1)+ (_range * (cos _direction)), 0];
_distance = _subject distance COCIFWidgetA;
COCIFWidgetA setpos [getpos COCIFWidgetA select 0, getpos COCIFWidgetA select 1, sqrt ((_distance ^2)-(_range^2))];
_elevation = (acos (_range/_distance))*((({COCIFWidgetA distance _subject > _distance} count [0])*2)-1);
if (format ["%1", _elevation] == {-1.#IND}) then {_elevation = 0};
_elevation