mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
Fix airspeed check in simulation
This commit is contained in:
@@ -1228,7 +1228,12 @@ Sensors::diff_pres_poll(struct sensor_combined_s &raw)
|
||||
|
||||
/* push data into validator */
|
||||
_airspeed_validator.put(_airspeed.timestamp, _diff_pres.differential_pressure_raw_pa, _diff_pres.error_count, 100);
|
||||
|
||||
#ifdef __PX4_POSIX
|
||||
_airspeed.confidence = 1.0f;
|
||||
#else
|
||||
_airspeed.confidence = _airspeed_validator.confidence(hrt_absolute_time());
|
||||
#endif
|
||||
|
||||
/* don't risk to feed negative airspeed into the system */
|
||||
_airspeed.indicated_airspeed_m_s = math::max(0.0f,
|
||||
|
||||
Reference in New Issue
Block a user