From b73131cdbc81fb3706134a1c99005814fa2a4146 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 3 Jan 2021 13:54:39 +1100 Subject: [PATCH] AP_AHRS: review fixes --- libraries/AP_AHRS/AP_AHRS.h | 4 ++-- libraries/AP_AHRS/AP_AHRS_NavEKF.cpp | 6 +++--- libraries/AP_AHRS/AP_AHRS_NavEKF.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libraries/AP_AHRS/AP_AHRS.h b/libraries/AP_AHRS/AP_AHRS.h index 6a6cb3a4d9..79d70f498b 100644 --- a/libraries/AP_AHRS/AP_AHRS.h +++ b/libraries/AP_AHRS/AP_AHRS.h @@ -604,8 +604,8 @@ public: return _rsem; } - // active EKF type for logging - virtual uint8_t get_active_EKF_type(void) const { return 0; } + // active AHRS type for logging + virtual uint8_t get_active_AHRS_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.cpp b/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp index b1c3a2a65f..8d209c60b5 100644 --- a/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp +++ b/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp @@ -1161,10 +1161,10 @@ bool AP_AHRS_NavEKF::get_relative_position_NED_origin(Vector3f &vec) const #endif #if HAL_EXTERNAL_AHRS_ENABLED case EKFType::EXTERNAL: { - auto &serahrs = AP::externalAHRS(); + auto &extahrs = AP::externalAHRS(); Location loc, orgn; - if (serahrs.get_origin(orgn) && - serahrs.get_location(loc)) { + if (extahrs.get_origin(orgn) && + extahrs.get_location(loc)) { const Vector2f diff2d = orgn.get_distance_NE(loc); vec = Vector3f(diff2d.x, diff2d.y, -(loc.alt - orgn.alt)*0.01); diff --git a/libraries/AP_AHRS/AP_AHRS_NavEKF.h b/libraries/AP_AHRS/AP_AHRS_NavEKF.h index a818096450..ea9e411408 100644 --- a/libraries/AP_AHRS/AP_AHRS_NavEKF.h +++ b/libraries/AP_AHRS/AP_AHRS_NavEKF.h @@ -318,7 +318,7 @@ public: void set_alt_measurement_noise(float noise) override; // active EKF type for logging - uint8_t get_active_EKF_type(void) const override { + uint8_t get_active_AHRS_type(void) const override { return uint8_t(active_EKF_type()); }