Conversation
|
Hello, |
|
I am applying the MPU6050 in a RC Car and I am the one who wish the Z angle not wrapping. However, I wonder if the value of Z will "overflow" well below the limit of float. Take arduino AVR as example, according to their documentation on float, while floating-point numbers can be as large as 3.4028235E+38 and as low as -3.4028235E+38, "The float data type has only 6-7 decimal digits of precision". If I am correct, that means resolution of Z will decrease to 1 degree if Z degree accumulates up to 1,000,000 (7 digits) and further decrease to 10 degree when Z degree accumulates up to 10,000,000 (i.e. over 27,777 full 360 degree turn). I don't see any reset Z angle function in the documentation. I wonder if this library has one or in fact I was wrong in my understanding. |
|
Hi. I was wondering if this library and angle example given also works with MPU9250. |
|
I think that instead of this, the fix given by @cemyasam2 on this post can be implemented in the src files |
Z angle needs to be wrapped, like the other angles, to +/- 180 degrees. If there's constant rotation along the Z axis, without wrap, the Z angle will go out of bounds and will reach ~ +/- 650 degrees.