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

Full range with MPU #23

Open
Pawlowski123 opened this issue Jun 13, 2019 · 2 comments
Open

Full range with MPU #23

Pawlowski123 opened this issue Jun 13, 2019 · 2 comments

Comments

@Pawlowski123
Copy link

Hi guys,

First time I'm interacting at GitHub so sorry for any mistake.

I read the PDF that the lib is based and understood that it's not possible to use it for a 360 degrees range. I'm intrigued beucase I'm using MPU6050 with some trigonometry (atan2) and complementary filter and I'm able to use it for the full range and the Z-axis as well (of course, the closer to perpendicularity to the floor, worst or cant get the result).

Is there a way to use this library in that way? It really helped me.

@mindThomas
Copy link
Member

This is due to the inherent singularity that is present when using Euler angles, e.g. Roll angle.
If you would like to get full 360 degree singularity-free estimates around all axis, one way to do so would be with Quaternions. I would recommend you to take a look at the Madgwick filter (https://x-io.co.uk/open-source-imu-and-ahrs-algorithms/) which is available for the MPU6050 as well here: https://github.com/kriswiner/MPU6050
Another option, if you just need 360 degree estimates for a single axis, would be to do proper wrapping and unwrapping. In that case you should still be able to do it with your current complimentary filter implementation.

@Pawlowski123
Copy link
Author

I'll try the Madgwick filter lib and post here as feedback. Thanks!

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