You can use the Kalman filter or the Madgwick filter to estimate the Euler angle. Euler angles are roll, pitch and yaw. It's very intuitive and easy to understand. You can view like this. Get Compass ...