mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 06:03:35 +08:00
Improve robustness to bad and lost airspeed data (#11846)
This commit is contained in:
@@ -472,7 +472,8 @@ float FixedwingAttitudeControl::get_airspeed_and_update_scaling()
|
||||
{
|
||||
_airspeed_sub.update();
|
||||
const bool airspeed_valid = PX4_ISFINITE(_airspeed_sub.get().indicated_airspeed_m_s)
|
||||
&& (hrt_elapsed_time(&_airspeed_sub.get().timestamp) < 1_s);
|
||||
&& (hrt_elapsed_time(&_airspeed_sub.get().timestamp) < 1_s)
|
||||
&& !_vehicle_status.aspd_use_inhibit;
|
||||
|
||||
if (!airspeed_valid) {
|
||||
perf_count(_nonfinite_input_perf);
|
||||
|
||||
Reference in New Issue
Block a user