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

Understanding FusionMatrix gyroscopeMisalignment #65

Closed
LazaroFilm opened this issue Jan 30, 2023 · 2 comments
Closed

Understanding FusionMatrix gyroscopeMisalignment #65

LazaroFilm opened this issue Jan 30, 2023 · 2 comments

Comments

@LazaroFilm
Copy link

LazaroFilm commented Jan 30, 2023

When I rotate my sensor around the Z axis (on a turntable), I get the below graphs which shows some wobble in the roll and pitch with .gain to set to 0.0f to ignore accel input.
I think I understand this "wobble" is due to a gyro axis misalignment. I'm trying to understand how the FusionMatrix works, but I'm not quite sure of the method to get the values needed for it. I understand each values is a multiplier to add some of the other axis input in another one, but I don't know how to tell which value and by how much... I've found this article but it hasn't quite helped me that much.

Matrix initial

and zoomed in version to focus on pitch and roll, recorded here are two full rotation so 720deg rotation it was turned by hand on a solid center axle, hence the roughness of the curve. I'm also aware of the gyro drift. I recorded this example right after powering up the IMU, it had not stabilized yet:

Matrix initial zoomed in

@xioTechnologies
Copy link
Owner

We do not have any tutorials or examples for the calculating a misalignment matrix. The article you linked looks like a good place to start.

On a separate note, I suggest you use the gyroscope offset correct algorithm as demonstrated on line 24 and line 51. Adding these two lines of code will correct for the drift apparent in your plots.

@herbertvuijk
Copy link

herbertvuijk commented Feb 24, 2023

This guy made a calibration that is very similar to the misalignment matrix used by the xio Fusion algo. It's for an accelerometer though, but I guess the principles are the same.

By the way I found out by testing that you indeed have to do like a 6-orthogonal calibration for the accelerometer as offsets and gains are different in every position. A gyroscope though, seems to have the same offsets regardless of orientation. So I guess you don't really need a misalignment gyromatrix. Instead you can just substract a constant value that you have measured.

Here an example of a calibration matrix (offset, gain, angles):

https://github.com/BasicAirData/Clinometer/blob/master/app/src/main/java/eu/basicairdata/clinometer/CalibrationActivity.java

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

3 participants