forked from Archive/PX4-Autopilot
Fix airspeed check in simulation
This commit is contained in:
parent
4b6d0ef0a6
commit
eb11c91733
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue