From 64f28c4c076f8bead474b19c18c3a9a6dbcaccbf Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Thu, 11 Jan 2024 12:54:17 -0500 Subject: [PATCH] ekf2: delete unused gps error norm field --- src/modules/ekf2/EKF/ekf.h | 1 - src/modules/ekf2/EKF/gps_checks.cpp | 4 ---- 2 files changed, 5 deletions(-) diff --git a/src/modules/ekf2/EKF/ekf.h b/src/modules/ekf2/EKF/ekf.h index 77bd2a1237..5fd528b594 100644 --- a/src/modules/ekf2/EKF/ekf.h +++ b/src/modules/ekf2/EKF/ekf.h @@ -648,7 +648,6 @@ private: float _gps_velD_diff_filt{0.0f}; ///< GPS filtered Down velocity (m/sec) uint64_t _last_gps_fail_us{0}; ///< last system time in usec that the GPS failed it's checks uint64_t _last_gps_pass_us{0}; ///< last system time in usec that the GPS passed it's checks - float _gps_error_norm{1.0f}; ///< normalised gps error uint32_t _min_gps_health_time_us{10000000}; ///< GPS is marked as healthy only after this amount of time bool _gps_checks_passed{false}; ///> true when all active GPS checks have passed diff --git a/src/modules/ekf2/EKF/gps_checks.cpp b/src/modules/ekf2/EKF/gps_checks.cpp index d4414f8a51..71018df1c7 100644 --- a/src/modules/ekf2/EKF/gps_checks.cpp +++ b/src/modules/ekf2/EKF/gps_checks.cpp @@ -155,10 +155,6 @@ bool Ekf::runGnssChecks(const gnssSample &gps) // Check the reported speed accuracy _gps_check_fail_status.flags.sacc = (gps.sacc > _params.req_sacc); - // check if GPS quality is degraded - _gps_error_norm = fmaxf((gps.hacc / _params.req_hacc), (gps.vacc / _params.req_vacc)); - _gps_error_norm = fmaxf(_gps_error_norm, (gps.sacc / _params.req_sacc)); - // Calculate time lapsed since last update, limit to prevent numerical errors and calculate a lowpass filter coefficient constexpr float filt_time_const = 10.0f; const float dt = math::constrain(float(int64_t(gps.time_us) - int64_t(_gps_pos_prev.getProjectionReferenceTimestamp())) * 1e-6f, 0.001f, filt_time_const);