Patch from Alex Perry:
Ok, I found the problem. You're computing the dynamic pressure in "psf" and adding it to the static pressure in "inHg" to form the total pressure. The attached patch is the simple fix to the source. With that fix, failing the pitot while in cruise at 3k' will cause the airspeed to indicate beyond redline during climb ... well before 4k'. Thus, a pitot problem can be detected on any IFR altitude change. Similarly, failing the static (with working pitot) while cruising 4k' causes the airspeed to indicate beyond redline during a descent well before reaching 3k' (during which, of course, the ALT looks fine). Thus, a static failure can be detected before the aircraft breaks out of the pilot tolerance range and is blatantly conspicuous soon after.
This commit is contained in:
parent
470d233f0d
commit
e8db622ce1
2 changed files with 11 additions and 3 deletions
|
@ -54,13 +54,17 @@ AirspeedIndicator::unbind ()
|
|||
# define FPSTOKTS 0.592484
|
||||
#endif
|
||||
|
||||
#ifndef INHGTOPSF
|
||||
# define INHGTOPSF (2116.217/29.9212)
|
||||
#endif
|
||||
|
||||
void
|
||||
AirspeedIndicator::update (double dt)
|
||||
{
|
||||
if (_serviceable_node->getBoolValue()) {
|
||||
double pt = _total_pressure_node->getDoubleValue();
|
||||
double p = _static_pressure_node->getDoubleValue();
|
||||
double q = pt - p; // dynamic pressure
|
||||
double q = ( pt - p ) * INHGTOPSF; // dynamic pressure
|
||||
|
||||
// Now, reverse the equation
|
||||
double v_fps = sqrt((2 * q) / SEA_LEVEL_DENSITY_SLUGFT3);
|
||||
|
|
|
@ -37,16 +37,20 @@ PitotSystem::unbind ()
|
|||
{
|
||||
}
|
||||
|
||||
#ifndef INHGTOPSF
|
||||
# define INHGTOPSF (2116.217/29.9212)
|
||||
#endif
|
||||
|
||||
void
|
||||
PitotSystem::update (double dt)
|
||||
{
|
||||
if (_serviceable_node->getBoolValue()) {
|
||||
// The pitot tube sees the forward
|
||||
// velocity in the body axis.
|
||||
double p = _pressure_node->getDoubleValue();
|
||||
double p = _pressure_node->getDoubleValue(); // static
|
||||
double r = _density_node->getDoubleValue();
|
||||
double v = _velocity_node->getDoubleValue();
|
||||
double q = 0.5 * r * v * v; // dynamic pressure
|
||||
double q = 0.5 * r * v * v / INHGTOPSF; // dynamic
|
||||
_total_pressure_node->setDoubleValue(p + q);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue