prestonflying Posted March 24, 2023 Posted March 24, 2023 Working on a project, and trying to get lat lon of the camera via lua exports. I found `LoGetCameraPosition()` and that is good; however, it exports position as meters relative to an origin lat/lon. Is there a simple and clean way to get camera positoin in lat lon without offsetting from a starting point and adding meters then converting back to lat/long (especially since DCS is a flat world and most calculations use WSG84 when adding meters to a GPS location) Thanks in advance
prestonflying Posted March 24, 2023 Author Posted March 24, 2023 Update: Found the answer if anyone ever needs it: local camPos = LoGetCameraPosition() local position = camPos["p"] local x = position["x"] local z = position["z"] local coords = LoLoCoordinatesToGeoCoordinates(x,z); log.write("exportTest", log.INFO, coords["latitude"].." "..coords["longitude"])
Recommended Posts