February 25, 200719 yr 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.
February 25, 200719 yr A:INDICATED ALTITUDE worked fine for me in the b307 pressurization code.Cheers,Glenn
February 26, 200719 yr 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.
February 26, 200719 yr 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.
February 26, 200719 yr 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.
February 26, 200719 yr 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 AviationMy Playland - I69
February 26, 200719 yr >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
February 26, 200719 yr 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
February 26, 200719 yr Perhaps being President & Chief Operating Officer of Benchmark Avionics Corporation entitles him to be cranky? Gerry Howard
February 26, 200719 yr 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
February 26, 200719 yr 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.
February 26, 200719 yr 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