AP_NavEKF2: move KH array inside for the remaining user

Not used by AP_NavEKF3.
This commit is contained in:
Thomas Watson
2026-01-13 10:53:50 +11:00
committed by Andrew Tridgell
parent 2704894be6
commit 1f3a06dd49
2 changed files with 7 additions and 0 deletions
+5
View File
@@ -30,6 +30,8 @@ extern const AP_HAL::HAL& hal;
*/
#define ENABLE_EKF_TIMING 0
NavEKF2_core::Matrix24 NavEKF2_core::KH;
// constructor
NavEKF2_core::NavEKF2_core(NavEKF2 *_frontend) :
dal(AP::dal()),
@@ -543,6 +545,9 @@ void NavEKF2_core::UpdateFilter(bool predict)
#endif
fill_scratch_variables();
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
fill_nanf(&KH[0][0], sizeof(KH)/sizeof(ftype)); // see fill_scratch_variables()
#endif
// TODO - in-flight restart method
+2
View File
@@ -788,6 +788,8 @@ private:
static const uint32_t FLOW_BUFFER_LENGTH = 15;
static const uint32_t EXTNAV_BUFFER_LENGTH = 15;
static Matrix24 KH; // intermediate result used for covariance updates
// Variables
bool statesInitialised; // boolean true when filter states have been initialised
bool magHealth; // boolean true if magnetometer has passed innovation consistency check