diff --git a/libraries/AP_NavEKF2/AP_NavEKF2_MagFusion.cpp b/libraries/AP_NavEKF2/AP_NavEKF2_MagFusion.cpp index 9e6acfa967..340aae16bb 100644 --- a/libraries/AP_NavEKF2/AP_NavEKF2_MagFusion.cpp +++ b/libraries/AP_NavEKF2/AP_NavEKF2_MagFusion.cpp @@ -1040,7 +1040,7 @@ void NavEKF2_core::FuseDeclination(float declErr) float t12 = 1.0f/t11; float H_MAG[24]; - Vector28 Kfusion; + Vector28 Kfusion {}; H_MAG[16] = -magE*t5; H_MAG[17] = magN*t5; diff --git a/libraries/AP_NavEKF2/AP_NavEKF2_OptFlowFusion.cpp b/libraries/AP_NavEKF2/AP_NavEKF2_OptFlowFusion.cpp index a02b6fa50c..d41751b5ea 100644 --- a/libraries/AP_NavEKF2/AP_NavEKF2_OptFlowFusion.cpp +++ b/libraries/AP_NavEKF2/AP_NavEKF2_OptFlowFusion.cpp @@ -285,7 +285,7 @@ void NavEKF2_core::FuseOptFlow() Vector3f relVelSensor; Vector14 SH_LOS; Vector2 losPred; - Vector28 Kfusion; + Vector28 Kfusion {}; // Copy required states to local variable names float q0 = stateStruct.quat[0];