aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Jansen <jnsn.johan@gmail.com>2015-04-17 11:18:02 +0200
committerLorenz Meier <lm@inf.ethz.ch>2015-04-18 17:23:19 +0200
commitb7a6f18ca6b72529021e6fe3d5bf741673756f70 (patch)
treeac58516dda56c82545f1d330ef1faf569ac87e73
parent2e824bbeea8787a3166ce47cad90e622a3678b25 (diff)
downloadpx4-firmware-b7a6f18ca6b72529021e6fe3d5bf741673756f70.tar.gz
px4-firmware-b7a6f18ca6b72529021e6fe3d5bf741673756f70.tar.bz2
px4-firmware-b7a6f18ca6b72529021e6fe3d5bf741673756f70.zip
AttPosEKF: Only fuse GPS velocity if they are valid
-rw-r--r--src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp2
1 files changed, 1 insertions, 1 deletions
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 33289dacb..4e1573d99 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