0
$\begingroup$

I'm working with MPU-6050 sensor with Raspberry Pi 4. I can read acceleration and gyroscope raw data from the sensor. However I want to get yaw, pitch and roll angles from these data. I tried to search for something like DMP which is used in the Arduino library but I did not find anything.

$\endgroup$

1 Answer 1

0
$\begingroup$

According to https://www.youtube.com/watch?v=uTFBW-Mm4b0 you must integrate the velocity $\omega$ to get the angle position $\theta$. The velocity is obtained from the gyroscope.

Discrete integration can be made in few ways, one of them is $$ \theta[i+1] = \theta[i] + \omega \cdot \, dt. $$

So for yaw, pitch and roll angles you should calculate $$ \theta_{yaw}[i+1] = \theta_y[i] + \omega_y[i] \cdot \, dt \\ \phi_{pitch}[i+1] = \theta_y[i] + \omega_x[i] \cdot \, dt \\ \rho_{roll}[i+1] = \theta_y[i] + \omega_z[i] \cdot \, dt $$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.