Sensors: Use temperature for airspeed validation to avoid false positives for high-performance airspeed sensors

This is required to enable new high-performance sensors which otherwise would provide incorrect readings.
This commit is contained in:
Lorenz Meier
2017-08-06 20:04:39 +02:00
parent 45f2a52a7d
commit 490f40bee1
+3 -1
View File
@@ -337,7 +337,9 @@ Sensors::diff_pres_poll(struct sensor_combined_s &raw)
_airspeed.timestamp = _diff_pres.timestamp;
/* push data into validator */
_airspeed_validator.put(_airspeed.timestamp, _diff_pres.differential_pressure_raw_pa, _diff_pres.error_count,
float airspeed_input[3] = { _diff_pres.differential_pressure_raw_pa, _diff_pres.temperature, 0.0f };
_airspeed_validator.put(_airspeed.timestamp, airspeed_input, _diff_pres.error_count,
ORB_PRIO_HIGH);
_airspeed.confidence = _airspeed_validator.confidence(hrt_absolute_time());