Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Getting Indicated Altitude

Featured Replies

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.

A:INDICATED ALTITUDE worked fine for me in the b307 pressurization code.Cheers,Glenn

In C-gauges I use ALT_FROM_BAROMETRIC_PRESSUREJim

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.

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.

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.

  • Commercial Member

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.

Ed Wilson

Mindstar Aviation
My Playland - I69

>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

  • Moderator

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

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

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

Gerry Howard

Here is one of my MANY C-coded altimeters.Notice how the change in Kohlsman has resulted in a change to the Indicated Altitudehttp://hometown.aol.co.uk/jimcooper1/Altimeter.JPGRegardsJim

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.

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.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.