My situation:
- I am able to communicate over i2c with my MPU6050 IMU
- I can get accelerometer and gyro data
- I can compute the sensor's orientation using my accelerometer
Issue:
- when trying to compute the sensor's orientation using my gyroscope my values seem to be totally incorrect. I am computing the orientation using a complementary filter.
This is the code I use https://paste.ubuntu.com/p/vZmbnc23gj/
This is the computed orientation, when the sensor is lying on a table: https:https://paste.ubuntu.com/p/W7DzVKR9c7/ Those measurements are totally incorrect, because when moving the senor randomly around its axis it never goes above 1.8. (even when I do an 180 degree turn)
Could somebody give me some hints or explanation on why my results are incorrect and drifting so much?