So I am using the GY-521/MPU6050 for a project, and currently I read the Roll, Pitch, and Yaw using the acceleration to calculate it. But... I want to use the values from the Gyroscope than the accelerometer to read the Roll, Pitch, and Yaw.
Could anyone let me know how to do that?
You can get three orientation angles from the gyroscope by integrating the offset-corrected (calibrated) rotation rates with respect to time.
But without the accelerometer, there is no absolute reference for 3D orientation, so the angles will drift over time and quickly become meaningless.
1 Like
ah ok. Are there any tutorials or code that you know of that I could use that do this?
Code to do the integration with or without the accelerometer contribution, using the Mahony fusion filter, can be found here .
The gyro must be calibrated for the code to work properly (default operation, hold the gyro still until the offsets are printed).
I don't know of any tutorials, as this is quite an advanced topic.
system
Closed
June 20, 2023, 9:25pm
5
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.