I'm trying to get the device rotation. I have MPU9250. So far, using the sensor's accelerometer, I've successfully calculated the device's rotation state in degrees. However, the accelerometer sensor uses Gforce in its calculations and therefore when the device is moving, so do the values on all axis.
What I'm trying to achieve here is the exact device rotation (in degrees preferably) in all states. Meaning, when the device is accelerating or slowing down, I'll get the same rotation degrees as in its still state.
The final result should help me detect a slope (the device is a mobility scooter FYI).