Jump to content
Sign in to follow this  
Guest Skymed

Extracting info from Aircraft.cfg

Recommended Posts

Guest Skymed

Hi GangI want to extract the "static_cg_height" height from the aircraft.cfg file to input into a RADALT gauge for choppers. I want the RADALT to read zero when the chopper is on the ground, and right now I have to subtract the static height from the radalt height to make it zero. This can be a real pain when dealing with multiple aircraft.%((P:Units of measure, enum) 2 == if{ (A:Radio height, meters) 1.8 - } els{ (A:Radio height, feet) 4.3 - })%!3d!{dpl=RAD}Is there a way just to extract the info I need and input it into the gauge?Steve

Share this post


Link to post
Share on other sites
Guest _ak

I think is much easyer to do in C

Share this post


Link to post
Share on other sites

I don't know how to extract a data from an aircraft file (except using FSUIPC to get the aircraft.cfg file location), but I have another solution for you. As I develop my gauges in C, I know how to do it in C but not in XML. Here is my solution:When the aircraft is on ground (you can know this with the variable AIRCRAFT_ON_GROUND), its radio altitude is 0, so you can read the RADIO_HEIGHT value, and store it in a variable which represents the CG height. After that, you just have to retract this value to the radio altitude read by RADIO_HEIGHT, and you will have the real radio altitude.Hope it helps...Eric

Share this post


Link to post
Share on other sites
Guest Skymed

Eric,Excellent tipThanksSteve

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...