From 9dbd2d3ebab5d712e0ff194c43a42d8cc099d765 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 31 Dec 2020 08:40:24 +1100 Subject: [PATCH] AP_AHRS: expose active EKF type for logging --- libraries/AP_AHRS/AP_AHRS.h | 3 +++ libraries/AP_AHRS/AP_AHRS_NavEKF.h | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/libraries/AP_AHRS/AP_AHRS.h b/libraries/AP_AHRS/AP_AHRS.h index bce6e9b5f4..6a6cb3a4d9 100644 --- a/libraries/AP_AHRS/AP_AHRS.h +++ b/libraries/AP_AHRS/AP_AHRS.h @@ -604,6 +604,9 @@ public: return _rsem; } + // active EKF type for logging + virtual uint8_t get_active_EKF_type(void) const { return 0; } + // for holding parameters static const struct AP_Param::GroupInfo var_info[]; diff --git a/libraries/AP_AHRS/AP_AHRS_NavEKF.h b/libraries/AP_AHRS/AP_AHRS_NavEKF.h index 8d93e0a790..cee713a53e 100644 --- a/libraries/AP_AHRS/AP_AHRS_NavEKF.h +++ b/libraries/AP_AHRS/AP_AHRS_NavEKF.h @@ -317,6 +317,11 @@ public: // set and save the ALT_M_NSE parameter value void set_alt_measurement_noise(float noise) override; + // active EKF type for logging + uint8_t get_active_EKF_type(void) const override { + return uint8_t(active_EKF_type()); + } + // these are only out here so vehicles can reference them for parameters #if HAL_NAVEKF2_AVAILABLE NavEKF2 EKF2;