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

gyroOffset and AccellOffset not calculate in same way! (and more) : confuse #26

Open
manuprendlair opened this issue Jan 17, 2024 · 0 comments

Comments

@manuprendlair
Copy link

in:

void LSM9DS1Class::setAccelOffset(float x, float y, float z)
{ 
   accelOffset[0] = x /(accelUnit * accelSlope[0]);
   accelOffset[1] = y /(accelUnit * accelSlope[1]);
   accelOffset[2] = z /(accelUnit * accelSlope[2]);
}

you redefine offset from your calibration method by divide them with accellSlope, ok, BUT in all example you gave you always call calibration setting in this order:


IMU.setMagnetOffset(0, 0, 0);  //  uncalibrated
IMU.setMagnetSlope (1, 1, 1);  //  uncalibrated

So ... this mean that accelOffset are NEVER divide with the accelSlope from calibration !! (by default accelSlope is set to 1 ). This mmean that finally accelOffset = Offset from calibration / accelUnit !!!
This is my first interrogation ..

My second interrogation is for gyroOffset you use:

void LSM9DS1Class::setGyroOffset(float x, float y, float z) 
{ 
   gyroOffset[0] = x; 
   gyroOffset[1] = y;
   gyroOffset[2] = z;
}

So why to use different method for accell Offset and Gyro Offset ??
and finally you not apply your method because you call setMagnetOffset before setMagnetSlope ???
This is very confuse for me.
I try to read your explanation in the readme, but not really understood ( sorry )

Could you please clarify these points ?

Regards
Manu

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

1 participant