My problem is identical to this unanswered question.
I have an IMU mounted on an object at an angle offset with that object's pitch and roll axes. When I get pitch and roll measurements from the IMU, how can I translate them to the pitch and roll values experienced by the object?
In the reference image, the black P and R axes are the axes of the object, the red p and r axes are the IMU's axes, and angle theta is known. So for example, if that angle is 45 degrees and the object is pitched forward, the IMU will measure values for both roll and pitch. How can I translate these measurements so they reflect the pitch-only orientation of the object?