mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 19:53:29 +00:00
23 lines
747 B
Plaintext
23 lines
747 B
Plaintext
params["_latitude", "_longitude", "_altitude"];
|
|
|
|
_playerPosition = [_latitude, _longitude, _altitude];
|
|
|
|
_playerLatitude = _playerPosition select 0;
|
|
_playerLongitude = _playerPosition select 1;
|
|
|
|
_playerMaxLongitude = 8192;
|
|
_playerMaxLatitude = 8192;
|
|
|
|
_MapMaxLatitude = 37.266306;
|
|
_MapMinLatitude = 37.189233;
|
|
|
|
_MapMaxLongitude = -115.771889;
|
|
_MapMinLongitude = -115.863786;
|
|
|
|
_LongitudeDifference = _MapMaxLongitude - _MapMinLongitude;
|
|
_LatitudeDifference = _MapMaxLatitude - _MapMinLatitude;
|
|
|
|
_RealLongitude = (_playerLongitude / _playerMaxLongitude) * _LongitudeDifference + _MapMinLongitude;
|
|
_RealLatitude = (_playerLatitude / _playerMaxLatitude) * _LatitudeDifference + _MapMinLatitude;
|
|
|
|
[_RealLongitude, _RealLatitude, _playerPosition select 2] |