[FSX] Question on how to get altitude of coordinates

We are writing a program that is placing some different objects (like buildings, antennas...). We are also placing power lines, but for the cables pitching we need to know the altitudes from the power lines (e.g. if two power lines have different altitudes, we need to calculate the pitching from their distance and their height).
So is there any chance to read altitudes from specific coordinates. If yes, do you need simconnect for this or is that information stored somewhere in a kind of database?


Staff member
FSDevConf team
Resource contributor
TCalcX will do this. Also SimConnect (or FSUIPC 4 which uses SimConnect) can read altitude at a given location. These tend to use the location of the user aircraft or similar in FS. However you can also use the connection to set the location. For example ADE has a move aircraft here function that sets the coordinates for the user aircraft in FS and then reads back information such as AMSL and AGL.
To do this in the past, I created a dummy SimObject called "sensor". I then place that at a given co-ord and ground-lock it before requesting the altitude above MSL via SimConnect. (Incrementally moving a SimObject from one point to another and comparing altitudes along the way is the only way I've found so far of determining line-of-sight truth.)

sim_probe moves an AI object around and reads it ground elevation, with a link to a version of the C++ code at the bottom of the page here

Originally I set the AI object on the ground and read its altitude but found it more efficient to leave the object at 30,000 feet and simply read its 'ground elevation'...