Skip to content

Commit

Permalink
ekf2: delete unused gps error norm field
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar committed Jan 12, 2024
1 parent a38abdb commit 64f28c4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/modules/ekf2/EKF/ekf.h
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,6 @@ class Ekf final : public EstimatorInterface
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

Expand Down
4 changes: 0 additions & 4 deletions src/modules/ekf2/EKF/gps_checks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 64f28c4

Please sign in to comment.