From 36b3cbc36542ca3783f8c354da5aa0c6248172fe Mon Sep 17 00:00:00 2001 From: priseborough Date: Wed, 2 Apr 2014 17:11:18 +1100 Subject: [PATCH] AP_NavEKF : Relax aliasing check limits This reduces the chance of noisy data inhibiting GPS glitch protection --- libraries/AP_NavEKF/AP_NavEKF.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_NavEKF/AP_NavEKF.cpp b/libraries/AP_NavEKF/AP_NavEKF.cpp index d982cbeb6e..55fd81f72a 100644 --- a/libraries/AP_NavEKF/AP_NavEKF.cpp +++ b/libraries/AP_NavEKF/AP_NavEKF.cpp @@ -1608,8 +1608,8 @@ void NavEKF::FuseVelPosNED() // calculate innovations for height and vertical GPS vel measurements float hgtErr = statesAtVelTime[9] - observation[5]; float velDErr = statesAtVelTime[6] - observation[2]; - // check if they are the same sign and both more than 2-sigma out of bounds - if ((hgtErr*velDErr > 0.0f) && (sq(hgtErr) > 4.0f * (P[9][9] + R_OBS[5])) && (sq(velDErr) > 4.0f * (P[6][6] + R_OBS[2]))) { + // check if they are the same sign and both more than 3-sigma out of bounds + if ((hgtErr*velDErr > 0.0f) && (sq(hgtErr) > 9.0f * (P[9][9] + R_OBS[5])) && (sq(velDErr) > 9.0f * (P[6][6] + R_OBS[2]))) { badIMUdata = true; } else { badIMUdata = false;