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

Magnetometer in Complementary filter really optional? #78

Open
KomaGR opened this issue Jul 7, 2022 · 1 comment
Open

Magnetometer in Complementary filter really optional? #78

KomaGR opened this issue Jul 7, 2022 · 1 comment

Comments

@KomaGR
Copy link

KomaGR commented Jul 7, 2022

The table in the documentation seems to suggest that the magnetometer is optional for using the complementary filter but I'm having trouble getting it to work that way.

Even looking through the code, it seems to me that the update function of the complementary filter calls am_estimation to get the acc-mag heading estimate (as far as I understand). Then ecompass will raise a ValueError if mag measurement is not there.

Am I missing something?

@Mayitzin
Copy link
Owner

Mayitzin commented Aug 2, 2022

You're right. It wasn't optional in its Implementation, although it could.

I changed with commit 0368775 so that it is now really optional. And you can use it as it was described.

However, now I'm further changing it, because the comparison in the filter is happening linearly between quaternions, which is a big NO, because it loses a lot of accuracy. Basically a LERP.

A new implementation using Euler Angles is on the works, and I hope to get it as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants