c172p-team / c172p

A high detailed version of the Cessna 172P aircraft for FlightGear
GNU General Public License v2.0
80 stars 43 forks source link

Pitot cover should "break" pitot system, not ASI. #723

Closed tigert closed 8 years ago

tigert commented 8 years ago

Hey, nice new stuff again! :)

I noticed you added the pitot cover and correctly having an effect on the airspeed indicator when you forget to remove the cover. However I found two issues when testing this:

I am a bit confused in how our indicated-airspeed.xml plays into this, as I am not very familiar how all this comes together. But it might be that jsbsim and / or flightgear model pitot failures already?

HHS81 commented 8 years ago

@tigert

...<property>fdm/jsbsim/velocities/vias-kts</property>

Interesting, didn't thought about this. Since I'm responsible for, I see now that taking the airspeed value from the FDM's velocity variable wasn't good. Indeed maybe better taking instruments/airspeed-indicator/.... for having the indicated-airspeed correction.

Can you tell me, what will really happen when the pitot system is iced/ blocked? Somewhere I read that it will show false values, but not simply nothing?

onox commented 8 years ago

Uhhh... @HHS81 you came with the idea to use Systems/indicated-airspeed.xml? :smile:

I see now that taking the airspeed value from the FDM's velocity variable wasn't good. Indeed maybe better taking instruments/airspeed-indicator/.... for having the indicated-airspeed correction.

You mean to treat it as KCAS? We currently use velocities/vc-kts as the source.

The worse issue seems to be that the airspeed indicator always works no matter what.

If /sim/model/c172p/securing/pitot-cover-visible is true, then velocities/vias-kts should be 0.0.

onox commented 8 years ago

@HHS81 You think we should use /instrumentation/airspeed-indicator/indicated-speed-kt instead of velocities/vc-kts? The former property does seem to react to /systems/pitot/serviceable (speed decreases while you climb if pitot failed and vice versa)

HHS81 commented 8 years ago

you came with the idea to use Systems/indicated-airspeed.xml?

Sorry, but the POH clearly states that the ASI shows uncorrected airspeeds. So my idea is and was correct, I simply didn't thought that the source I choosed doesn't depend on the pitot-system.

You mean to treat it as KCAS? We currently use velocities/vc-kts as the source.

Which is the source of this issue.

instead it should be instrumentation/airspeed-indicator/true-speed-kt as the source for uncorrected indicated-airspeed. When piot fails, true-speed-kt will fail and with that indicated-aispeed as well.

onox commented 8 years ago

In Systems/indicated-airspeed.xml we determine KIAS based on KCAS, so why use KTAS to determine KIAS?

onox commented 8 years ago

The idea of using Systems/indicated-airspeed.xml was because indicated-speed-kt should be KIAS, but acted as KCAS. So we added our own table to convert to KIAS, but in the process we started using the KCAS from JSBSim, instead of indicated-speed-kt.

So we should use indicated-speed-kt (which is rather a calibrated-speed-kt), not true-speed-kt?

HHS81 commented 8 years ago

@onox: No, no, no!!

the ASI on cessnas will never show the real indicated-airspeeds. They will always show errors. This errors are due the position of the pitot. But FlightGear assumes that the pitot is a perfect pitot and shows real values without errors. Which is not realistic.

So the table changes the correct-IAS from FlightGear back to uncorrect IAS from reallife. Just the source I used was not correct, because it does not depend on pitot-system and can't fail.

So source should be: instrumentation/airspeed-indicator/true-speed-kt

Clear?

onox commented 8 years ago

correct-IAS = KCAS and uncorrect IAS = KIAS? Or am I misunderstanding KIAS and KCAS?

onox commented 8 years ago

Also the POH uses KCAS in their tables, so I still don't understand why you want to use KTAS :worried:

HHS81 commented 8 years ago

sigh

You making me mad. Yes, KTAS would be wrong. Sorry.

The table shows KCAS- calibrated or also called corrected airspeed. We are using JSBSim vc-kts. C stands for calibrated/ corrected. But this jsbsim values doesn't depend on the pitot. That's the problem

onox commented 8 years ago

But this jsbsim values doesn't depend on the pitot.

I know that.

So you agree we should be using a KCAS from FG that reacts to failure of the pitot system?

HHS81 commented 8 years ago

So you agree we should be using a KCAS from FG that reacts to failure of the pitot system?

If there is a KCAS that depends on pitot/static systems , yes.

onox commented 8 years ago

There is: /instrumentation/airspeed-indicator/indicated-speed-kt

  1. It reacts to /systems/pitot/serviceable
  2. It assumes a perfect pitot, no error. Thus it is practically a KCAS
HHS81 commented 8 years ago

It assumes a perfect pitot, no error. Thus it is practically a KCAS

I would say yes.

onox commented 8 years ago

Okay, then I'll create a branch with a fix. :smiley:

HHS81 commented 8 years ago

@onox you have to insert <property>/instrumentation/airspeed-indicator/indicated-speed-kt</property> between <system name="indicated-airspeed"> and <channel name="indicated airspeed">in the file, otherwise you will get an error message. `

onox commented 8 years ago

:+1:

HHS81 commented 8 years ago

hmmm.... there is a mismatch between vc-kts and /instrumentation/airspeed-indicator/indicated-speed-kt. So actually /instrumentation/airspeed-indicator/indicated-speed-kt seems to show some error. But it is small.... hmmmm

onox commented 8 years ago

That might be fixable in Systems/systems.xml.

onox commented 8 years ago

I've pushed bug-723. We still could try to make sure that the very small error in indicated-speed-kt becomes 0.

onox commented 8 years ago

The airspeed indicator seem to apply a low pass filter in ./src/Instrumentation/airspeed_indicator.cxx.

I'll recompile FG with filtered_speed = current_speed_kt and see if that would fix it.

Edit: does not seem to matter.

tigert commented 8 years ago

The airspeed instrument shows IAS - indicated airspeed (well, that's why it is called "indicated" airspeed, as that's what is shown by the "airspeed indicator" gauge).

TAS is true airspeed that is calculated (corrected) from the IAS by taking your altitude and temperature (basically pressure altitude) into account. The airspeed gauge has no idea about these. Some instruments have a TAS correcting ring that you can set manually by setting your density altitude and it has a second dial where you can then read your true airspeed (TAS). This is significant because the higher you go, the faster you cruise, even though your airspeed indicator shows the same indicated speed.

The xml lookup table that @HHS81 meant likely is a "error mapper" that creates the pitot tube inaccuracies caused by flaps (pitot is at a different angle at different flap settings, so the airspeed error is not constant)

This explains the system and various errors and terms about the pitot-static-system: http://www.allstar.fiu.edu/aero/PSSI.htm - interesting stuff for reading.

The above and this explains what happens when the pitot tube is blocked: https://en.wikipedia.org/wiki/Pitot-static_system#Blocked_pitot_tube

A blocked pitot tube will cause the airspeed indicator to register an increase in airspeed when the aircraft climbs, even though actual airspeed is constant. This is caused by the pressure in the pitot system remaining constant when the atmospheric pressure (and static pressure) are decreasing. In reverse, the airspeed indicator will show a decrease in airspeed when the aircraft descends.

Basically the way an airspeed indicator works is that it takes the static air pressure (a hole on the side of the fuselage usually) and the pitot tube pressure (air pushed to the tube due to the aircraft moving forward) and compares the difference, like two people blowing into both ends of glass tube trying to push a ball in the middle. Block either end and you see what happens.

We could check how the SenecaII does this, and how well this is modelled in FG.

onox commented 8 years ago

A blocked pitot tube will cause the airspeed indicator to register an increase in airspeed when the aircraft climbs, even though actual airspeed is constant. This is caused by the pressure in the pitot system remaining constant when the atmospheric pressure (and static pressure) are decreasing. In reverse, the airspeed indicator will show a decrease in airspeed when the aircraft descends.

Checkout bug-723 and you will see that it exactly works like that :smile: