Difference between revisions of "DCS func LOtoLL"

From DCS World Wiki - Hoggitworld.com
 
(One intermediate revision by the same user not shown)
Line 43: Line 43:
  
 
|examples= The following would be used to output the lat and lon of a unit named bob.  
 
|examples= The following would be used to output the lat and lon of a unit named bob.  
     local curPoint = Unit.getByName('bob')
+
     local curPoint = Unit.getByName('bob'):getPoint()
 
     local lat, lon, alt = coord.LOtoLL(curPoint)
 
     local lat, lon, alt = coord.LOtoLL(curPoint)
 
     trigger.action.outText('Bob is at the raw coordinates of \nLatitude: ' .. lat .. ' \nLongitude: ' .. lon .. '\nAltitude: ' .. alt, 20)
 
     trigger.action.outText('Bob is at the raw coordinates of \nLatitude: ' .. lat .. ' \nLongitude: ' .. lon .. '\nAltitude: ' .. alt, 20)
Line 51: Line 51:
 
}}
 
}}
 
[[Category:Singleton Functions|LOtoLL]]
 
[[Category:Singleton Functions|LOtoLL]]
 +
[[Category:Game Patch 1.2.0|LOtoLL]]

Latest revision as of 01:11, 3 October 2022

Scripting Root

Envrioment: Mission Scripting
Function: LOtoLL Added with: 1.2.0
Member Of: coord
Syntax: latitude, longitude, altitude coord.LOtoLL(table vec3 )
Description: Returns multiple values of a given vec3 point in latitude, longitude, and altitude


Return Value: latitude, longitude, altitude
Return Example: Returned from printing the lat and lon values to a log file.
   41.4795673
  -82.681172
Examples: The following would be used to output the lat and lon of a unit named bob.
   local curPoint = Unit.getByName('bob'):getPoint()
   local lat, lon, alt = coord.LOtoLL(curPoint)
   trigger.action.outText('Bob is at the raw coordinates of \nLatitude: ' .. lat .. ' \nLongitude: ' .. lon .. '\nAltitude: ' .. alt, 20)
Related Functions: Coord Functions: LLtoLO, LOtoLL, LLtoMGRS, MGRStoLL
Notes: