Closed kramer65 closed 7 years ago
This is the formula you can use to get around this issue pitch = atan2(x, sqrt(y y) + (z z)); roll = atan2(y, sqrt(x x) + (z z)); pitch = 180.0 / PI; roll = 180.0 / PI;
Which are the units for roll and pitch values? I guess they're in degrees...
When I run the code from python-BerryIMU-gryo-accel-compass/berryIMU.py and tilt the BerryIMU 90 degrees to the right I would expect Y to be around 0, but instead it goes to about 100.
I asked a question about this behaviour on robotics.stackexchange, and the answer I got was that the problem was "estimating angles in regions of instability" in which they suggest to "modify unstable equations".
Can you confirm that this is the problem I'm having? Furthermore, I'm kinda lost in the maths they present, but do you have a suggestion how to incorporate this in your code?