-
Notifications
You must be signed in to change notification settings - Fork 14
Description
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