forked from Archive/PX4-Autopilot
Do not make minimum airspeed assumptions, as we can trust our digital sensor a bit. A blocked pitot also most likely will result in more than just 6.5 m/s airspeed and so the check is based on a bunch of weak assumptions
This commit is contained in:
parent
be6c0d2ece
commit
4a0c660088
|
@ -660,14 +660,13 @@ FixedwingAttitudeControl::task_main()
|
|||
|
||||
float airspeed;
|
||||
|
||||
/* if airspeed is smaller than min, the sensor is not giving good readings */
|
||||
if ((_airspeed.indicated_airspeed_m_s < 0.5f * _parameters.airspeed_min) ||
|
||||
!isfinite(_airspeed.indicated_airspeed_m_s) ||
|
||||
/* if airspeed is not updating, we assume the normal average speed */
|
||||
if (!isfinite(_airspeed.true_airspeed_m_s) ||
|
||||
hrt_elapsed_time(&_airspeed.timestamp) > 1e6) {
|
||||
airspeed = _parameters.airspeed_trim;
|
||||
|
||||
} else {
|
||||
airspeed = _airspeed.indicated_airspeed_m_s;
|
||||
airspeed = _airspeed.true_airspeed_m_s;
|
||||
}
|
||||
|
||||
float airspeed_scaling = _parameters.airspeed_trim / airspeed;
|
||||
|
|
Loading…
Reference in New Issue