Reply To: How to adjust rotation from sensor to body
Once the UM7 is mounted on your platform, orient it so that yaw = pitch = roll = 0. Note the non-zero angle outputs. For all subsequent measurements from the UM7, apply the inverse of that rotation to the UM7 outputs. This is most easily done with quaternions.
If the quaternion output of the UM7 is given by q_ib (meaning, the quaternion rotating from the inertial frame (i) to the body-frame (b)), and if the “misalignment” quaternion (the output of the UM7 when it is at angles (0,0,0)) is given by q_m, then the corrected attitude would be given by:
q = q_ib*q_m^*
where q_m^* is the conjugate of q_m, and the multiply shown is a quaternion product.