mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 23:13:28 +00:00
23 lines
745 B
Plaintext
23 lines
745 B
Plaintext
params["_latitude", "_longitude", "_altitude"];
|
|
|
|
_playerPosition = [_latitude, _longitude, _altitude];
|
|
|
|
_playerLatitude = _playerPosition select 0;
|
|
_playerLongitude = _playerPosition select 1;
|
|
|
|
_playerMaxLongitude = 12800;
|
|
_playerMaxLatitude = 12800;
|
|
|
|
_MapMaxLatitude = 20.827781;
|
|
_MapMinLatitude = 20.516731;
|
|
|
|
_MapMaxLongitude = 38.863442;
|
|
_MapMinLongitude = 38.549869;
|
|
|
|
_LongitudeDifference = _MapMaxLongitude - _MapMinLongitude;
|
|
_LatitudeDifference = _MapMaxLatitude - _MapMinLatitude;
|
|
|
|
_RealLongitude = (_playerLongitude / _playerMaxLongitude) * _LongitudeDifference + _MapMinLongitude;
|
|
_RealLatitude = (_playerLatitude / _playerMaxLatitude) * _LatitudeDifference + _MapMinLatitude;
|
|
|
|
[_RealLongitude, _RealLatitude, _playerPosition select 2] |