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

problems with headings #20

Open
Nocentinia opened this issue Apr 12, 2023 · 1 comment
Open

problems with headings #20

Nocentinia opened this issue Apr 12, 2023 · 1 comment
Labels
type: imperfection Perceived defect in any part of project

Comments

@Nocentinia
Copy link

Good morning,
I'm using the MKR IMU mounted on a boat, with the aim of studying various motion behaviors.
I noticed that heading read by Euler Angles is very wrong, even 180° so it is extremely unusable as it is.
Is there any way to fix the situation? maybe changing how to use the sensor?
I'm desperate, please help me :( .
thanks in advance for your support

@per1234 per1234 added the type: imperfection Perceived defect in any part of project label Apr 13, 2023
@AnalyticEquestrian
Copy link

AnalyticEquestrian commented Oct 11, 2024

I'm pretty late to this question, but I came here with a similar issue, which is not an imperfection in all fairness. When your Euler angles are off by 180 degrees and/or erratically jumping around at a certain orientation, you're probably experiencing gimbal lock. As noted here, quaternions provide the way out. I ran into this myself and created a fork of the MKRIMU lib with quaternion support (#29) based on the Adafruit lib, which did the trick for me.

Note that the BNO055 gives you a right-handed quaternion, converting this to your application's coordinate system can be every bit as maddening as gimbal lock. I'm sure smarter people are able to reason out how to map your axes, but eventually I gave up and just brute-force tried all options for mapping the xyz components and their signs, until one mapping worked halfway through.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

3 participants