BIS fnc posDegToWorld: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
m (Some wiki formatting)
 
(23 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Function|= Comments
{{RV|type=function
____________________________________________________________________________________________


| TKOH |= Game name
|game1= tkoh
|version1= 1.00


|1.00|= Game version
|game2= arma3
____________________________________________________________________________________________
|version2= 0.50


| Convert latitude/longtitude coordinates into game world position.
|gr1= Map and Markers


World config has to contain following settings to convert the position correctly.
|descr= Convert latitude/longtitude coordinates into game world position.<br>
// Required for scripting
World config '''must''' contain following settings to convert the position correctly:
mapSize <nowiki>=</nowiki> 61440; {{codecomment|//--- Can differ from mapArea size, as ingame world can be resized}}
<syntaxhighlight lang="cpp">
mapZone <nowiki>=</nowiki> 10; {{codecomment|//--- UTM zone}}
// Required for scripting
mapArea[] <nowiki>=</nowiki> { {{codecomment|//--- lon/lat coordinates (not in UTM to assure .kml precision)}}
mapSize = 61440; // Can differ from mapArea size, as ingame world can be resized
-122.754367782585,47.3272454065969, {{codecomment|//--- Bottom Left}}
mapZone = 10; // UTM zone
-121.930117859276,47.8753494907418 {{codecomment|//--- Top Right}}
mapArea[] = { // lon/lat coordinates (not in UTM to assure .kml precision)
};
-122.754367782585,47.3272454065969, // Bottom Left
|= Description
-121.930117859276,47.8753494907418 // Top Right
____________________________________________________________________________________________
};
</syntaxhighlight>


| [latitude,longtitude] call BIS_fnc_posDegToWorld; |= Syntax
|s1= [longitude, latitude, world] call [[BIS_fnc_posDegToWorld]]


|p1= latitude: [[Number]] |= Parameter 1
|p1= longitude: [[Number]]


|p2= longtitude - [[Number]] |= Parameter 2
|p2= latitude: [[Number]]


| [[Array]] - [northing,easting,zone] |= Return value
|p3= world: [[String]] - (Optional, default [[worldName]])
____________________________________________________________________________________________
 
|x1= <code>[47.63959,-122.127249] call BIS_fnc_posDegToWorld;</code> |= Example 1
____________________________________________________________________________________________


| |= See also
|r1= [[Array]] of [[Number]]s - format [easting, northing, zone]


|x1= <sqf>[47.63959,-122.127249] call BIS_fnc_posDegToWorld;</sqf>
|seealso= [[BIS_fnc_posDegToUTM]] [[BIS_fnc_posUTMToDeg]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Take_On_Helicopters:_Functions|posDegToWorld]]
[[Category:Function Group: Map|posDegToWorld]]

Latest revision as of 18:23, 13 July 2022

Hover & click on the images for description

Description

Description:
Convert latitude/longtitude coordinates into game world position.
World config must contain following settings to convert the position correctly:
// Required for scripting
mapSize = 61440;	// Can differ from mapArea size, as ingame world can be resized
mapZone = 10;		// UTM zone
mapArea[] = {		// lon/lat coordinates (not in UTM to assure .kml precision)
	-122.754367782585,47.3272454065969,	// Bottom Left
	-121.930117859276,47.8753494907418	// Top Right
};
Execution:
call
Groups:
Map and Markers

Syntax

Syntax:
[longitude, latitude, world] call BIS_fnc_posDegToWorld
Parameters:
longitude: Number
latitude: Number
world: String - (Optional, default worldName)
Return Value:
Array of Numbers - format [easting, northing, zone]

Examples

Example 1:
[47.63959,-122.127249] call BIS_fnc_posDegToWorld;

Additional Information

See also:
BIS_fnc_posDegToUTM BIS_fnc_posUTMToDeg

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note