Moved discussion on AP from Community Aircraft Mods Megathread

Try it. Remove the Transponder from your plane and see if the autopilot works. I’m sure it will.

Are we having fun yet ?? When you get it working, please let me know.

It’s obviously all far to complex for me to understand :upside_down_face:

I am sure you will figure it all out … (like I have)

1 Like

But, but, I like that the “B” key resets the altitude for the autopilot! :wink:

And I fixed the Transponder since you pointed out the issue and it was killing me, so… now I’m happy :slight_smile:

GOOD… We are both happy – lets move on …

1 Like

I just came across this thread again, and I know you wanted to put it to bed. The A320 autopilot simply references the PFD altitude for the autopilot. No more, no less. Hopefully that has the same result as what you’ve been discussing above.
The neo transponder should be transmitting the pressure altitude (with baro correction if on QNH instead of STD). Even some of the later ceos (with winglet already) did not do that and require 1013/29.92 to be set before pulling STD.
Just for clarity. No idea what the sim or mod is doing in its latest form.

Anyone know which of the TBM Improvement mods are best, there is one on nexus, an abandoned one of GH and a revived version of guifarias31’s TBM also on GH.

Much appreciated thanks!

More important than what altitude sim variable the autopilot vs transponder are using is that it looks like the MSFS calculation of pressure altitude is just flat out incorrect. And it also doesn’t correct the actual geometric height for temperature variation from ISA.

Pressure altitude is simply the altitude you would be at for the ambient pressure when using the ISA relationship of pressure to height. For example, if the ambient pressure where the airplane is is 696.8 hPa, then you are at a pressure altitude of 10,000 feet. This is true regardless of what pressure may be at sea level. With a baro setting of 1013.25 (or 29.92) set, the airplane’s altimeter will show the pressure altitude. So, flight levels are essentially pressure altitudes, that is, FL 330 is a pressure altitude of 33,000 feet.

How is this represented in MSFS? Well, here’s an example with the A320. Set clear weather, ISA conditions, take off and climb to FL250 on autopilot. From the simvars or dev mode speed debug window, note that the ambient pressure is 376 hPa. Further note that this agrees with the ICAO standard atmosphere table. Now, go into the weather settings and change the sea level pressure from 1013.25 to 995.75 hPa (or actually anything different than 1013.25).

This causes a change to the pressure at the altitude the airplane is currently flying, so it has to climb or descend back to FL250. However, with 995.75 hPa set as the sea level pressure, the ambient pressure at the altitude the airplane’s autopilot settles on is 367 hPa, not 376 hPa. At an ambient pressure of 367, the corresponding pressure altitude is 25,554 ft, not 25, 000 ft.

Another way to look at it might be that for some reason, MSFS shows the wrong ambient pressure value when sea level pressure is not standard. If the airplane is at a pressure altitude of 25,000 feet, as noted above, the ambient pressure is 376 hPa. If I assume the ambient pressure is actually 376, then the airplane altitude would be 24,519 ft when the sea level pressure is 995.75. And MSFS shows it as 24,448, which is at least close. On the other hand, I calculate 25,073 feet above mean sea level using the 995.75 sea level pressure. I tend to think that MSFS incorrectly uses the actual sea level pressure rather than the standard atmosphere sea level pressure in computing pressure altitude.

You’re saying exactly what I said.

whatever altitude you are at, if you set the altimeter to 29.92 inHg, the indicated altitude in the Altimeter should equal the altitude displayed on the Transponder. If you hit the B key, that will automatically set the kohlsman window to the current ambient pressure in the area where you are flying and show you’re actual altitude above sea level (not the ground). Thing is, it also affects the altitude displayed by the default Transponder, the altitude in the Transponder equals the indicated altitude in the altimeter set to current ambient sea level pressure. That’s wrong. It does that because the default transponders are set to show the indicated altitude, not pressure altitude. So once you go above 18K ft, it’s really wrong and there’s no way to reset it.

I rewrote the transponder to use pressure altitude, which is constant everywhere to read altitude as if the ambient sea level pressure is 29.92 inHg. (It didn’t take much, just a change to the variable it reads barometric pressure from).

The autopilot altitude reading is also fixed to use the indicated (ambient sea level pressure) altitude. So when you hit the B key, the altitude it flies to is the current ambient pressure altitude for where you are flying and will equal the altitude in the Altimeter. I like it that way, Geoff doesn’t, he wants to use the gauge as if it were the real one, which typically is not slaved to the Kohlsman value in the altimeter. Most autopilots you have to set the ambient pressure value separately from the altimeter (not all, some are slaved to the altimeter for ease of use). The KAP140 allows you to change the ambient pressure value in the altimeter, but, using the B key defeats this setting. Semantics.

Anyway, I guess I’ll submit the bug regarding the Transponders tonight. I have to say, though, I understand why they might have written it this way. Most people aren’t aware that the Transponder is slaved to pressure altitude, so, when ambient sea level pressure doesn’t equal 29.92, it will display a different altitude than the altimeter if they have their Kohlsman value set to current pressure, and I’m sure they were afraid people would get confused and say it’s not working right because it would display a different altitude than the altimeter. The B key, however, doesn’t understand that you are supposed to set you Kohlsman to 29.92, so it screws everything up and the autopilot will be wrong unless you reset the ambient pressure in the gauge to 29.92.

1 Like

Okay, if you say so. Flying the A320, I wouldn’t even know what the transponder altitude is. But, regardless, one can examine the simvars for pressure altitude, plane altitude, and indicated altitude, among others. Regardless of what the transponder, altimeter, or FCU altitude windows are supposed to show, the simvar for pressure altitude is wrong. I don’t care whether someone uses the B key or a gauge or whatever, the simvar for pressure altitude does not show the pressure altitude. So, if you’re going to use pressure altitude for anything, you’re going to have to roll your own.

Did you check the simvar for “Pressure Altitude” and calculate for yourself the correct value it should have been?

I only checked it against the Altimeter by setting the Altimeter Kohlsman to 29.92 and the Transponder, which was displaying the value for “Pressure Altitude”, showed the correct value no matter what I set the ambient Barometric pressure to. I did this several times, checking indicated altitude, then changing the barometric pressure, resetting the Altimeter to that value to make sure indicated altitude remained the same, and then changed the Altimeter to check the pressure value against the modded Transponder displaying the Pressure altitude. I also watched how the KAP140 autopilot was affected by these changes and setting its base barometric pressure.

So you’re able to track the values of Simvars in Dev mode? I’ll look into doing that tomorrow and do some of my own calculations to check it.

Basically, there are 3 “Indicated Altitude” values stored. The Altimeter works with Indicated Altitude:1. The KAP140 works with Indicated Altitude:2, and the default Transponders all work with Indicated Altitude:3. When you change the Kohlsman in the Altimeter, the gauge updates the Barometric Pressure used to calculate Indicated Altitude:1, but leaves Indicated Altitude:2 and Indicated Altitude:3 alone, they aren’t updated. Hitting the B key changes all three Indicated Altitude registers to use the current barometric pressure to calculate Indicated Altitude where the plane is but Pressure Altitude is unaffected, and equal to the altitude displayed if you change the Kohlsmann to 29.92 inHg. Granted, I did these tests below 10,000 ft. I don’t know what happens above 18,000 ft.

If the B key is hit to change the barometric pressure in all three registers at the start of flight, then it would make sense that when you change the Barometric pressure in the Altimeter to 29.92 above 18,000 ft that the Autopilot would fly to wrong altitude unless you changed the Barometric pressure value in the Autopilot to 29.92, because otherwise it would be using ambient sea level pressure value. As Geoff has been saying, the Autopilot is messed up a bit how it works, it really should be working, as you say, with the pressure altitude and then calculate internally the actual altitude from the gauge’s set barometric pressure value, not relying on the Indicated Altitude registers which might not match across the 3 registers. The KAP140 does have a mode where you can set its base Barometric pressure.

I’ll admit the code in the KAP140 looks a little screwy how it manages altitude and uses barometric pressure and switches between English and metric units it displays.

Yes, I checked the simvar for various altitudes - pressure altitude, indicated altitude, plane alt above ground, ground altitude, and radio height. You can either use simvar watcher installed in the SDK/samples folder to access them as well as the ambient and sea level pressures. I didn’t know there are actually 3 different indicated altitude values! There’s only the 1 simvar for it as far as I know.

I did calculate the correct value for the pressure altitude, though you don’t really even need to do that. The easiest way I know to see the problem is to climb to an altitude (any altitude should do - I just happened to pick 25,000 feet) with the MSFS weather set to clear (which will also use the standard pressure at sea level). Make sure your airplane’s baro is set to 29.92. Check the ambient pressure level and verify that it either matches your calculation or a standard atmosphere table.

Then change the sea level pressure in the MSFS weather. That should change the whole atmosphere around you and will change your altimeter reading. Climb or descend back to 25,000 feet. Then check the ambient pressure again. It should be the same as before since a pressure altitude has one pressure associated with it. Note that it is not the same, so you are not at a 25,000 foot pressure altitude even though the simvar and the airplane’s altimeter will tell you you are.

Another thing I found out is that MSFS does not account for temperature in its determination of how high you are above the ground. At cold temperatures, pilots have to be careful even when they have QNH set because altimeters do not account for temperature. In warmer than ISA temps, the airplane will have additional terrain clearance, but at lower than ISA temps the airplane will be closer to the ground due to the density change. MSFS does not include this effect in determining height above ground level.

Really?!!! Btw the correct table is as below. The official one uses big increments of 10 degrees in temperature, I made a more precise one which is not an interpolation, its using the actual formula!

Oh my god you are right! Just flown an approach at -50C and indicated altitude was matching the radio altitude! Here, approach flown with -50 degrees at SL. Baro minima is 330 ft (200 ft DH), absolutely no difference between +45C or - 50C :expressionless:.

-50C

+45 C

Yeah I was drawn into this, haven’t even seen the title of the thread until now :joy:.

1 Like

Well, maybe someone can come up with a mod to fix the deviation somehow.

kind of looking your way

:stuck_out_tongue:

I think you are finally finding out for yourself, what I have been trying to tell you for the past 3 weeks … lol

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.