EKF2 GPS blending: reset relative position offsets if blending not feasible

Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
This commit is contained in:
CarlOlsson
2020-03-04 16:46:20 +01:00
committed by Mathieu Bresciani
parent 2b087a92c2
commit a10a228092
+5
View File
@@ -973,6 +973,11 @@ void Ekf2::Run()
// Only use selected receiver data if it has been updated
_gps_new_output_data = (gps1_updated && _gps_select_index == 0) ||
(gps2_updated && _gps_select_index == 1);
// Reset relative position offsets to zero
_NE_pos_offset_m[0].zero();
_NE_pos_offset_m[1].zero();
_hgt_offset_mm[0] = _hgt_offset_mm[1] = 0.0f;
}
if (_gps_new_output_data) {