Skip to content

Commit

Permalink
ekf2: remove fake fusion condition in validity status
Browse files Browse the repository at this point in the history
Fake pos/height fusion only starts when inertial dead reckoning time is
exceeded and is not considered as an aiding sensor anyway. The dead
reckoning flag is then enough to know if the position/velocity is valid.
  • Loading branch information
bresch committed Aug 2, 2024
1 parent 85d8d6b commit 18433a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/modules/ekf2/EKF/ekf.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,17 +294,17 @@ class Ekf final : public EstimatorInterface

bool isLocalHorizontalPositionValid() const
{
return (!_horizontal_deadreckon_time_exceeded && !_control_status.flags.fake_pos);
return !_horizontal_deadreckon_time_exceeded;
}

bool isLocalVerticalPositionValid() const
{
return !_vertical_position_deadreckon_time_exceeded && !_control_status.flags.fake_hgt;
return !_vertical_position_deadreckon_time_exceeded;
}

bool isLocalVerticalVelocityValid() const
{
return !_vertical_velocity_deadreckon_time_exceeded && !_control_status.flags.fake_hgt;
return !_vertical_velocity_deadreckon_time_exceeded;
}

bool isYawFinalAlignComplete() const
Expand Down
1 change: 0 additions & 1 deletion src/modules/ekf2/EKF/ekf_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,6 @@ void Ekf::updateHorizontalDeadReckoningstatus()

if (inertial_dead_reckoning) {
if (isTimedOut(_time_last_horizontal_aiding, (uint64_t)_params.valid_timeout_max)) {
// deadreckon time exceeded
if (!_horizontal_deadreckon_time_exceeded) {
ECL_WARN("horizontal dead reckon time exceeded");
_horizontal_deadreckon_time_exceeded = true;
Expand Down

0 comments on commit 18433a1

Please sign in to comment.