Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EKF2: fusion always succeeds, do not return boolean #23699

Merged
merged 1 commit into from
Sep 24, 2024
Merged

Conversation

bresch
Copy link
Member

@bresch bresch commented Sep 20, 2024

merge after #23577

Solved Problem

fuseDirectStateMeasurement and measurementUpdate are always returning true so we have a ton of unnecessary code to handle the return false case.

Solution

Change those functions to void and always assume that the fusion worked (because it always do).

Changelog Entry

For release notes:

-
New parameter: -
Documentation: -

Test coverage

unit tests

@dagar
Copy link
Member

dagar commented Sep 23, 2024

The only question I have is if we'd ever want to have additional checks (even optionally). Otherwise if you're sure, less is definitely better.

Base automatically changed from pr-ekf2_ev_refactoring to main September 24, 2024 12:09
@bresch bresch marked this pull request as ready for review September 24, 2024 12:32
@bresch
Copy link
Member Author

bresch commented Sep 24, 2024

The only question I have is if we'd ever want to have additional checks (even optionally). Otherwise if you're sure, less is definitely better.

Currently I don't see why we would need to add any additional check at this stage. I haven't seen any issue so far with that Joseph update.

_time_last_heading_fuse = _time_delayed_us;
aid_src.time_last_fuse = _time_delayed_us;
}
_fault_status.flags.bad_hdg = false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of these fault_status flags won't need to be set again, in most cases they're set/cleared earlier with the innovation variance check.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should review how those flags are set and used. While doing this change I realized that their use is not consistent across aid sources.

@dagar dagar merged commit 35efe44 into main Sep 24, 2024
55 checks passed
@dagar dagar deleted the pr-ekf2-fused-no-fail branch September 24, 2024 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants