AP_NavEKF2: apply height innovation floor only when barometer is in use

This commit is contained in:
Jonathan Challinger 2017-03-24 10:32:25 -07:00 committed by Tom Pittenger
parent b32b552d1e
commit c53125f3b5

View File

@ -605,7 +605,7 @@ void NavEKF2_core::FuseVelPosNED()
const float gndMaxBaroErr = 4.0f;
const float gndBaroInnovFloor = -0.5f;
if(getTouchdownExpected()) {
if(getTouchdownExpected() && activeHgtSource == HGT_SOURCE_BARO) {
// when a touchdown is expected, floor the barometer innovation at gndBaroInnovFloor
// constrain the correction between 0 and gndBaroInnovFloor+gndMaxBaroErr
// this function looks like this: