This video shows how to use the gyroscope to estimate Euler angles.
Please check the website to get detailed insights about attitude estimation using IMU sensors:
https://www.steppeschool.com/courses/...
Rotation matrix and Euler angles:
• Video