• There seems to be an uptick in Political comments in recent months. Those of us who are long time members of the site know that Political and Religious content has been banned for years. Nothing has changed. Please leave all political and religious comments out of the forums.

    If you recently joined the forums you were not presented with this restriction in the terms of service. This was due to a conversion error when we went from vBulletin to Xenforo. We have updated our terms of service to reflect these corrections.

    Please note any post refering to a politician will be considered political even if it is intended to be humor. Our experience is these topics have a way of dividing the forums and causing deep resentment among members. It is a poison to the community. We appreciate compliance with the rules.

    The Staff of SOH

  • Server side Maintenance is done. We still have an update to the forum software to run but that one will have to wait for a better time.

Pitot-Static System

docjohnson

Charter Member
(Long Post - Apologies in advance) (Posted to FSDeveloper as well) I'm a new C++ gauge programmer and am stumped ( which bothers me since I have 19 years in software development, I've programmed in C/C++/Java/D/VB/Smalltalk...written and generated XML...er, back to the subject at hand). As the title says this question relates to a complete pitot static system for an aircraft cockpit project. To get the airspeed indicator connected to the pitot static system to work I need to get the static pressure and the pitot pressure to calculate dynamic pressure, which would give me the position of the airspeed indication (which I assumed would be CAS/IAS).


I found the static system variable its A: AMBIENT PRESSURE for the static pressure, but I can't find a "pitot pressure" Avar, I also tried looking for a ram air pressure variable, and other combinations, I have searched all the forums. Then I find that there is an A: DYNAMIC PRESSURE! Since I had assumed I had to calculate:


AMBIENT PRESSURE ( = static pressure in Millibars)


X


PITOT PRESSURE (Nonexistent in A:Vars as far as I can tell)


= DYNAMIC PRESSURE (Dynamic pressure in Pounds per square foot)


Then apparently I need to do something with the dynamic pressure to covert it into numbers for positioning the needles and drums on the instrument to display the air speed, I figured that's what a pitot static system was for (I'm not a pilot, but a back seater). I can read the A variables all day long, but what I can't seem to figure out is what variables and formula to take those do the calculations and output a airspeed to the various L:Vars for the needles and drums on the instrument itself.


A fellow sim programmer suggested taking AMBIENT PRESSURE and DYNAMIC pressure and calculating it to get airspeed to display with your indicator Lvar. This doesn't make sense when I read the aircraft -1 or -2 about the airspeed indicator. I also understand that at some point AOA and side slip angle would also have something to do with calculating a realistic airspeed indication.


Finally, I'm getting the feeling that there is a better way to go about doing this, but I just can't seem to see it.


Any help would be greatly appreciated.
 
I am not a programmer of any sort, but the basic point is that Total Pressure = Dynamic Pressure + Static Pressure

The pitot measures total pressure, the static ports measure static pressure. Subtracting static from total gives a dynamic pressure to drive the IAS indicator.

Unfortunately, their are "position" errors in the pitot and static ports that are caused by AOA, sideslip, port location, etc. Also internal gauge mechanism errors. These cause the difference between indicated and calibrated airspeed. In general, these errors are relatively small, however, and aircraft certification requires these errors to be presented in operating handbooks for aircrew use.

I was a Navy test pilot, and one test performed on military aircraft is called "altimeter depression with airspeed": this involves running a range at low altitude and different speeds in an instrumented ship, taking data to ascertain the altimeter error vs actual altitude above sea level as a result of static port position and AoA. IAS and altimeter errors can then be catalogued in this manner. This as a very arcane process, but important.

For flight simulator purposes, I personally would not worry about the difference in IAS/CAS - the standard atmosphere modeling in MSFS has some small problems in calculating true airspeed vs indicated airspeed - it is using a generalized rule rather than actual International Standard Atmosphere (IAS) data to calculate TAS from IAS anyway. This starts to show up above about 20,0000 ft MSL.

Hope this of some help --
 
Mike71,

Thanks, instead of trying to reproduce the pitot-static system, I'm seeing that I can just read the right A variable(s), load it into an L:Var(s) then introduce the instrument "errors" before feeding the adjusted airspeed values to the Airspeed Indicator in the VC model. In that same object doing that work I can also check pitot heat, ice conditions, etc.

Now off to find the errors, I'll look at the -1 to see if I can find that stuff.
 
Hello Doc,

I have been doing some gauge programming recently also but for Combat Flight Simulator 1.
One way to handle a little weirdness if it is consistent would be to take care of it by adjusting your nonlinearity table or by adjusting your callback function for the needle indicator to compensate, or am I not understanding the problem you are encountering?

- Ivan.
 
Back
Top