Sign in to follow this  
Guest Skymed

Extracting info from Aircraft.cfg

Recommended Posts

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
Help AVSIM continue to serve you!
Please donate today!

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

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