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: constant position aiding #23571

Merged
merged 2 commits into from
Aug 23, 2024
Merged

EKF2: constant position aiding #23571

merged 2 commits into from
Aug 23, 2024

Conversation

bresch
Copy link
Member

@bresch bresch commented Aug 19, 2024

Solved Problem

When on a catapult, the vehicle might need to throttle up before triggering the catapult. This makes the "at rest" flag false (and this is correct) and the ekf goes into inertial dead-reckoning if no other aiding source is active.

Solution

Since we know that the vehicle doesn't move while on a catapult, tell the ekf that that the vehicle stays at a constant position. The EKF can then start a "valid" fake position fusion. Then, if a valid fake position is fused and that we expect to have airspeed fusion in air, the local position can remain valid too.

Changelog Entry

For release notes:


New parameter: -
Documentation: -

Test coverage

unit test

@bresch bresch added the EKF2 label Aug 19, 2024
@bresch bresch requested review from dagar and haumarco August 19, 2024 15:53
@bresch bresch self-assigned this Aug 19, 2024
This is similar to fake pos but is only used when the ekf has an
external information telling it that the vehicle is not changing
position. This information can then be used to keep a valid local
position even when the vehicle isn't exactly at rest.
@bresch bresch force-pushed the pr-ekf2-constant-pos branch from ce6c849 to 9053388 Compare August 20, 2024 06:36
@haumarco
Copy link
Contributor

Do we need constant_pos and vehicle_at_rest?
Why dont we include the constant_pos condition in the land detector and make at_rest also dependent on the launch_detection_state?

@bresch
Copy link
Member Author

bresch commented Aug 20, 2024

Why dont we include the constant_pos condition in the land detector and make at_rest also dependent on the launch_detection_state?

Because when the vehicle is armed and throttling up on a catapult it's not exactly at rest; it shakes and fusing the zero gyro updates or zero velocity updates could be harmful

Do we need constant_pos and vehicle_at_rest?

"At rest" means that the vehicle is not moving at all, not rotating, nothing. "constant pos" is a bit more relaxed, it just means that the vehicle stays in the same location; it's not an issue if moved by a couple of cm or rotated.

@dagar
Copy link
Member

dagar commented Aug 20, 2024

Overall looks good, but why do we need both valid_fake_pos and constant_pos? To be honest valid_fake_pos sounds like an oxymoron.

@bresch
Copy link
Member Author

bresch commented Aug 23, 2024

Overall looks good, but why do we need both valid_fake_pos and constant_pos? To be honest valid_fake_pos sounds like a oxymoron.

constant_pos is an input status while valid_fake_pos is when the fusion is active. I called it valid_fake_pos because it's using all the functions of fake_pos and the same aid_src message. I agree that the name sounds a bit weird but maybe the best option would be to change the name "fake pos" to something else (constant position?).

@bresch
Copy link
Member Author

bresch commented Aug 23, 2024

I'll merge it as it works nicely in practice but we can still discuss about the name and I'll be happy to change it.

@bresch bresch merged commit 1a0f97e into main Aug 23, 2024
55 checks passed
@bresch bresch deleted the pr-ekf2-constant-pos branch August 23, 2024 09:17
@dagar
Copy link
Member

dagar commented Aug 23, 2024

Yes renaming to "constant position" (and "constant height") sounds much clearer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants