AP_NavEKF2: prevent potential arithmetic error in declination fusion
This commit is contained in:
parent
722eb0d706
commit
de15928921
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user