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

Gyro fails to calibrate #10

Closed
mushroomRetainer opened this issue Jun 21, 2017 · 1 comment
Closed

Gyro fails to calibrate #10

mushroomRetainer opened this issue Jun 21, 2017 · 1 comment

Comments

@mushroomRetainer
Copy link

Using this firmware, it seems the gyro introduces a significant drift into the roll, pitch, and yaw measurements (about 1 degree/second). I found that this can be fixed by changing this section of the code:

if (ENABLE_GYRO_CALIBRATION)
{
// Gyro calibration re-calibrates the gyro after a set amount
// of no motion detected
dmpFeatureMask |= DMP_FEATURE_SEND_CAL_GYRO;
}

and replacing it with the following:

if (ENABLE_GYRO_CALIBRATION)
{
// Gyro calibration re-calibrates the gyro after a set amount
// of no motion detected
dmpFeatureMask |= DMP_FEATURE_GYRO_CAL; //added this line
dmpFeatureMask |= DMP_FEATURE_SEND_CAL_GYRO;
}

This way the gyro calibrates after 8 seconds of no movement from the accelerometer. I can't think of a situation in which you wouldn't want this feature turned on.

santaimpersonator added a commit that referenced this issue Mar 14, 2019
*dmp_enable_feature* (**DMP_FEATURE_GYRO_CAL**) needs to be called in conjunction with **DMP_FEATURE_SEND_CAL_GYRO**
See: https://github.com/sparkfun/9DOF_Razor_IMU/blob/master/Libraries/Arduino/src/util/inv_mpu_dmp_motion_driver.c#L1090

Brought up by in this issue: #10
Tested to work.
@santaimpersonator
Copy link
Contributor

Oops, looks like we might have missed that. Thanks for the heads up.

You are correct as mention here:
https://github.com/sparkfun/9DOF_Razor_IMU/blob/master/Libraries/Arduino/src/util/inv_mpu_dmp_motion_driver.c#L1090

I have updated the firmware code in the repository to reflect this. I will update the hookup guide as well.

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