BIS fnc posDegToWorld: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\{\{ *codecomment *\| *\/\/ *([^ ]+) *\}\} " to "{{cc|$1}}")
m (revert + fix)
Tag: Undo
Line 1: Line 1:
{{RV|type=function
{{RV|type=function


| TKOH
|game1= TKOH


|1.00
|version1= 1.00


|gr1 = Map and Markers
|gr1= Map and Markers


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


| [longitude, latitude'', world''] call [[BIS_fnc_posDegToWorld]]
|s1= [longitude, latitude'', world''] call [[BIS_fnc_posDegToWorld]]


|p1= longitude: [[Number]]
|p1= longitude: [[Number]]
Line 19: Line 25:
|p3= world: [[String]] - (Optional, default [[worldName]])
|p3= world: [[String]] - (Optional, default [[worldName]])


| [[Array]] of [[Number|Numbers]] - format [easting, northing, zone]
|r1= [[Array]] of [[Number|Numbers]] - format [easting, northing, zone]
   
   
|x1= <code>[47.63959,-122.127249] [[call]] [[BIS_fnc_posDegToWorld]];</code>
|x1= <code>[47.63959,-122.127249] [[call]] [[BIS_fnc_posDegToWorld]];</code>


| [[BIS_fnc_posDegToUTM]], [[BIS_fnc_posUTMToDeg]]
|seealso= [[BIS_fnc_posDegToUTM]], [[BIS_fnc_posUTMToDeg]]
}}
}}


[[Category:Functions|{{uc:posDegToWorld}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:posDegToWorld}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:posDegToWorld}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:posDegToWorld}}]]

Revision as of 18:53, 29 January 2021

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_posDegToUTMBIS_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