As seen in line 367 in lib.rs in function get_gyro():
gyro *= PI_180 * self.gyro_sensitivity;
the raw values are multiplied by the gyro sensitivity, while they should be divided by it, like in the corrected version:
gyro *= PI_180 / self.gyro_sensitivity;
I found this issue because I was reading -761 rad/s while the mpu6050 was laying still, which would be roughly 121 revolutions per second. That seemed a bit much for a measurement error to me.
TL;DR
Please change line 367 in lib.rs to
gyro *= PI_180 / self.gyro_sensitivity;.
As seen in line 367 in lib.rs in function get_gyro():
gyro *= PI_180 * self.gyro_sensitivity;
the raw values are multiplied by the gyro sensitivity, while they should be divided by it, like in the corrected version:gyro *= PI_180 / self.gyro_sensitivity;
I found this issue because I was reading -761 rad/s while the mpu6050 was laying still, which would be roughly 121 revolutions per second. That seemed a bit much for a measurement error to me.
TL;DR Please change line 367 in lib.rs to
gyro *= PI_180 / self.gyro_sensitivity;
.