AP_NavEKF2: prevent potential arithmetic error in declination fusion

This commit is contained in:
Paul Riseborough 2016-05-24 11:56:52 +10:00 committed by Andrew Tridgell
parent 722eb0d706
commit de15928921

View File

@ -900,6 +900,9 @@ void NavEKF2_core::FuseDeclination()
float t10 = t9-t14;
float t15 = t23*t10;
float t11 = R_DECL+t8-t15; // innovation variance
if (t11 < R_DECL) {
return;
}
float t12 = 1.0f/t11;
float H_MAG[24];