Closed mushroomRetainer closed 5 years ago
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.
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.