BIS fnc posDegToWorld: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (revert + fix) Tag: Undo |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{RV|type=function | {{RV|type=function | ||
|game1= | |game1= tkoh | ||
|version1= 1.00 | |||
| | |game2= arma3 | ||
|version2= 0.50 | |||
|gr1= Map and Markers | |gr1= Map and Markers | ||
Line 9: | Line 11: | ||
|descr= 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: | ||
< | <syntaxhighlight lang="cpp"> | ||
mapSize | // Required for scripting | ||
mapZone | mapSize = 61440; // Can differ from mapArea size, as ingame world can be resized | ||
mapArea[] | mapZone = 10; // UTM zone | ||
-122.754367782585,47.3272454065969, | mapArea[] = { // lon/lat coordinates (not in UTM to assure .kml precision) | ||
-121.930117859276,47.8753494907418 | -122.754367782585,47.3272454065969, // Bottom Left | ||
};</ | -121.930117859276,47.8753494907418 // Top Right | ||
}; | |||
</syntaxhighlight> | |||
|s1= [longitude, latitude | |s1= [longitude, latitude, world] call [[BIS_fnc_posDegToWorld]] | ||
|p1= longitude: [[Number]] | |p1= longitude: [[Number]] | ||
Line 25: | Line 29: | ||
|p3= world: [[String]] - (Optional, default [[worldName]]) | |p3= world: [[String]] - (Optional, default [[worldName]]) | ||
|r1= [[Array]] of [[Number | |r1= [[Array]] of [[Number]]s - format [easting, northing, zone] | ||
|x1= < | |x1= <sqf>[47.63959,-122.127249] call BIS_fnc_posDegToWorld;</sqf> | ||
|seealso= [[BIS_fnc_posDegToUTM]] | |seealso= [[BIS_fnc_posDegToUTM]] [[BIS_fnc_posUTMToDeg]] | ||
}} | }} | ||
Latest revision as of 17:23, 13 July 2022
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:
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