1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[FSX] Question on how to get altitude of coordinates

Discussion in 'SimConnect' started by Hitch, 29/3/10.

  1. Hitch

    Hitch

    Joined:
    26/2/10
    Messages:
    6
    Country:
    switzerland
    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?
  2. scruffyduck

    scruffyduck Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    17/9/05
    Messages:
    24,140
    Country:
    wales
    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.
  3. Simon853

    Simon853

    Joined:
    15/1/07
    Messages:
    516
    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.)

    Si
  4. B21

    B21

    Joined:
    3/12/07
    Messages:
    149
    Country:
    unitedkingdom
    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'...

    B21

Share This Page