Does anyone know how the MPU6050 internally calculates the quaternion values? I followed all of the steps to attempt and replicate this math by integrating the gyro degrees per second readings over time to get Euler angles and then converting those Euler angles to quaternion values with the appropriate trig functions. My quaternion values do not match up with the quaternion the MPU6050 outputs and I could not find details on the chip’s internal math anywhere online. Thank you.
Asked
Active
Viewed 1,969 times
1 Answers
1
The MPU6050 uses an internal procesor (dmp) in combination whit closed source libraries and they're not documented, you can use their closed source library whit the dmp image or you can check the reverse engeniering of this particular sensor in https://www.i2cdevlib.com they implemented some of the functions of the dmp but not all of them, sadly all the magic is made in the dmp :(

Hector Manuel
- 111
- 3
-
and i forgot to mention the close source implementation has some files that you can read you can check the file Invensense/core/mlite/ml_math_func.c line 37 they use a lookup table for calculating sin(x), maybe that's why you can't get the same results – Hector Manuel Feb 24 '19 at 18:04
-
Thank you, Hector. I do not understand how to find the quaternion calculations in this reverse engineered content. However, it may be possible for my application to use the transformed acceleration values from the MPU6059’s internal DMP. My issue with that path is that the DMP can only output at a slow rate of 15+/-1ms. I’d like to increase to 2ms (500Hz) to achieve a usable resolution for our application. I am using the Rowberg library. If anyone knows how to make the MPU6050’s DMP output global acceleration data at 300-500Hz, please point me toward the relevant docs or API calls. Thank you! – GNG Feb 26 '19 at 07:56