mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 05:33:34 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user