Difference between revisions of "DCS func LOtoLL"
From DCS World Wiki - Hoggitworld.com
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) |