AttPosEKF: Only fuse GPS velocity if they are valid

This commit is contained in:
Johan Jansen
2015-04-18 17:23:19 +02:00
committed by Lorenz Meier
parent 2e824bbeea
commit b7a6f18ca6
@@ -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