• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

[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'...