mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 15:43:29 +00:00
Added Cucui map support for ARMATAK
This commit is contained in:
23
addons/main/functions/map/fn_convert_to_cucui.sqf
Normal file
23
addons/main/functions/map/fn_convert_to_cucui.sqf
Normal file
@@ -0,0 +1,23 @@
|
||||
params["_latitude", "_longitude", "_altitude"];
|
||||
|
||||
_playerPosition = [_latitude, _longitude, _altitude];
|
||||
|
||||
_playerLatitude = _playerPosition select 0;
|
||||
_playerLongitude = _playerPosition select 1;
|
||||
|
||||
_playerMaxLongitude = 19456;
|
||||
_playerMaxLatitude = 19456;
|
||||
|
||||
_MapMaxLatitude = -66.762250;
|
||||
_MapMinLatitude = -66.937028;
|
||||
|
||||
_MapMaxLongitude = 1.273167;
|
||||
_MapMinLongitude = 1.098444;
|
||||
|
||||
_LongitudeDifference = _MapMaxLongitude - _MapMinLongitude;
|
||||
_LatitudeDifference = _MapMaxLatitude - _MapMinLatitude;
|
||||
|
||||
_RealLongitude = (_playerLongitude / _playerMaxLongitude) * _LongitudeDifference + _MapMinLongitude;
|
||||
_RealLatitude = (_playerLatitude / _playerMaxLatitude) * _LatitudeDifference + _MapMinLatitude;
|
||||
|
||||
[_RealLongitude, _RealLatitude, _playerPosition select 2]
|
||||
Reference in New Issue
Block a user