Find elevation at latitude/ longitude

Is there any way to use the SDK to find the elevation of the ground at a given latitude/ longitude? The documentation has reference to “ground altitude” which is the elevation of the surface below the plane. I would like to be able to query this data without flying to the location.

1 Like

I don‘t know the answer, but if you do not want to change the user‘s aircraft position then maybe you could spawn an „AI aircraft“ at the desired location and check its „ground altitude“ value (assuming that this sim var is also available for AI aircrafts)? A bit hacky… but oh well :man_shrugging:t3: Might be worth a try.

1 Like

I used the ‘AI probe’ technique to sample the terrain around the user aircraft (for calculating ‘ridge-lift’). It’s FSX code (2008?), and there’s some other stuff in the app you won’t be interested in, but I’ve put the code (Modules/sim_probe/sim_probe.cpp) here:

2 Likes

Thanks a lot. I’ll take out the relevant code and see how I get on.