From 94ff7522fc802ba978e8bc8982558c3ccd1571a5 Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Wed, 5 Mar 2014 18:52:42 +1100 Subject: [PATCH] AP_NavEKF : Fix bug in initial East mag field state variance --- libraries/AP_NavEKF/AP_NavEKF.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_NavEKF/AP_NavEKF.cpp b/libraries/AP_NavEKF/AP_NavEKF.cpp index c4cff9cca3..82ff01808d 100644 --- a/libraries/AP_NavEKF/AP_NavEKF.cpp +++ b/libraries/AP_NavEKF/AP_NavEKF.cpp @@ -2420,7 +2420,7 @@ void NavEKF::CovarianceInit(float roll, float pitch, float yaw) P[15][15] = P[14][14]; // NED magnetic field P[16][16] = sq(0.02f); - P[17][17] = P[16][15]; + P[17][17] = P[16][16]; P[18][18] = P[16][16]; // XYZ magnetic field P[19][19] = sq(0.02f);