Sign in to follow this  
Guest Patrick_Waugh

Getting Indicated Altitude

Recommended Posts

When programming an altimeter, do you guys usually calculate the indicated altitude using KOHLSMAN_SETTING_HG (or MB) and ALT_FROM_BAROMETRIC_PRESSURE, or do you just use the XML var INDICATED ALTITUDE.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Yes, but that gives you pressure altitude, not indicated altitude, which is the point of my question.Seems in C gauges we are forced to calculate indicated from pressure as there is no "indicated alt" var.

Share this post


Link to post
Share on other sites

At low altitudes -- when we need to worry about obstacle clearance, not just traffic separation -- pressure altitude is not good enough, because the pressure at any given true altitude varies with the weather. The solution is to use indicated altitude, which is based on pressure (which is convenient to measure), but with most of the weather-dependence factored out. To determine your indicated altitude, obtain a so-called altimeter setting from an appropriate nearby weather-reporting station, and dial it into the Kollsman window on your altimeter. Then the reading on the instrument will be the indicated altitude.

Share this post


Link to post
Share on other sites

You have missed the point of my post entirely, and this is perhaps because you have not yet coded an altimeter in C that works and adjusts when you change the pressure in the Kohlsman.As a pilot, I am well aware of the definitions and uses of the various types of altitudes. That was not the question.The altitude that C variable returns is not the indicated altitude, and does not vary with the Kohlsman setting.

Share this post


Link to post
Share on other sites

ALT_FROM_BAROMETRIC_PRESSURE should indicate altitude based on Kholsman setting.If it is not behaving that way for you, there is something wrong. I use that variable in all my C++ gauges and it indicates altitude based on the kohlsman value.

Share this post


Link to post
Share on other sites

>You have missed the point of my post entirely, and this is>perhaps because you have not yet coded an altimeter in C that>works and adjusts when you change the pressure in the>Kohlsman.Download the Simshed Nimrod, Tucano, Wessex you'll find that all the altimeters (coded in C) all do vary the reading as you change the Kohlsman. I've even built Altimeters that give Negative flags if you wind them past zeroI'm sorry that you're having trouble with your indicated altitude but there's no need to get cranky with someone who is trying to help..even if they do unintentionally misinterpret your problem.If you remember back a couple of days I did help you debug your ADF!!RegardsJim

Share this post


Link to post
Share on other sites

alt = ALT_FROM_BAROMETRIC_PRESSUREvar.var_value.n ;...works for me just fine as well! ;)

Share this post


Link to post
Share on other sites

Perhaps being President & Chief Operating Officer of Benchmark Avionics Corporation entitles him to be cranky?

Share this post


Link to post
Share on other sites

Interesting, because ALT_FROM_BAROMETRIC_PRESSURE, gives me the altitdue at 29.92, but when KOHLMANS_CARD_HG is adjusted, the altitude remains fixed (in FSX), unlike what I was expecting. Therefore, it would have appeared that one has to manually adjust the altitude returned by this variable based on the pressure setting.To avoid that, I just grabbed the XML var which worked straight away.Apparently it should have worked, and something else was amiss. I'll have to reinvestigate later.

Share this post


Link to post
Share on other sites

In FSX? Well, for some reason the altitude I was given from that var did not vary with the Kohlsman in FSX, but your clear answer this time, I will try it again later. It works now, so no reason to fix it.

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