Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
EKF: Restore protection from extreme innovation values
Browse files Browse the repository at this point in the history
  • Loading branch information
priseborough committed Jan 21, 2021
1 parent efb78de commit b919f3d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions EKF/vel_pos_fusion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ bool Ekf::fuseHorizontalPosition(const Vector3f &innov, const Vector2f &innov_ga
const bool innov_check_pass = test_ratio(0) <= 1.0f;

if (innov_check_pass || inhibit_gate) {
if (inhibit_gate && test_ratio(0) > sq(100.0f / innov_gate(0))) {
// always protect against extreme values that could result in a NaN
return false;
}
if (!_fuse_hpos_as_odom) {
_time_last_hor_pos_fuse = _time_last_imu;

Expand Down

0 comments on commit b919f3d

Please sign in to comment.