From b7a6f18ca6b72529021e6fe3d5bf741673756f70 Mon Sep 17 00:00:00 2001 From: Johan Jansen Date: Fri, 17 Apr 2015 11:18:02 +0200 Subject: [PATCH] AttPosEKF: Only fuse GPS velocity if they are valid --- .../ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp b/src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp index 33289dacb0..4e1573d99a 100644 --- a/src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp +++ b/src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp @@ -937,7 +937,7 @@ void AttitudePositionEstimatorEKF::updateSensorFusion(const bool fuseGPS, const // Convert GPS measurements to Pos NE, hgt and Vel NED // set fusion flags - _ekf->fuseVelData = true; + _ekf->fuseVelData = _gps.vel_ned_valid; _ekf->fusePosData = true; // recall states stored at time of measurement after adjusting for delays