Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a sensor which gives me Euler angles (roll,pitch,yaw). There is a baseline value of Euler angle (assume it is 5,10,15) at the beginning.I want to calibrate this baseline values from all subsequent value. How can I get those values? Is it just subtract 5,10,15 from all values? Or is there any rotational matrix for doing so? As an example if any time the value is 5,10,15 then it should show 0,0,0 and on the same way show other angle values with respect to the baseline values. I dont know how to do this.

share|cite|improve this question

migrated from Mar 5 '13 at 13:25

This question came from our site for professional and enthusiast programmers.

Euler angles, of which there are several sets, are not roll, pitch, and yaw. The crucial issue is that rotations do not commute unless they are infinitesimal. So having rotated $5^\circ$ in roll, if your next rotation is $10^\circ$ in pitch, do you use the body pitch axis or the external $x$ axis for that rotation? In my application, when we measure pitch we report the angle between body $+x$ and the reference coordinate $+x$. When we reorient we always do that in body coordinates, wherever the body is at the start. We are careful to specify the order, and multiple choices are available.

You can certainly compose a rotation matrix for your favorite process and to take that as a baseline multiply all subsequent matrices by its inverse. That will get you a consistent result. You can then find a reorientation to take you back to the baseline, but it will not be unique.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.