From 3ed093ba593601be8ab344d3d68633436c0f93d3 Mon Sep 17 00:00:00 2001 From: alessandro <3762382+potaito@users.noreply.github.com> Date: Fri, 4 May 2018 18:40:10 +0200 Subject: [PATCH] Add baro temperature to sensor voter observation (#9411) When determining the confidence of a barometer sensor, we should consider the temperature as well, alongside the pressure. Low-noise baros can show the same pressure reading for a second or two when not moving and in an indoor location. --- src/modules/sensors/voted_sensors_update.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/sensors/voted_sensors_update.cpp b/src/modules/sensors/voted_sensors_update.cpp index ba2fc8d333..d47a828fb5 100644 --- a/src/modules/sensors/voted_sensors_update.cpp +++ b/src/modules/sensors/voted_sensors_update.cpp @@ -831,7 +831,7 @@ void VotedSensorsUpdate::baro_poll(vehicle_air_data_s &airdata) _baro_device_id[uorb_index] = baro_report.device_id; got_update = true; - matrix::Vector3f vect(baro_report.pressure, 0.f, 0.f); + matrix::Vector3f vect(baro_report.pressure, baro_report.temperature, 0.f); _last_airdata[uorb_index].timestamp = baro_report.timestamp; _last_airdata[uorb_index].baro_temp_celcius = baro_report.temperature;