# Pitch, roll, yaw rotations?

I have a random orientation in a room described by pitch, yaw, and roll angles.

When I do roll about $30$ degrees I need to update pitch, yaw and roll so that they can still describe my orientation afterwards. The same goes for yawing and pitching.

Questions:

• Is that possible with simple mathematics like $\sin$ and $\cos$ ?
• When I remember an orientation, can I rotate myself starting with pitch = 0, yaw = 0, roll = 0 back to that remembered orientation ?
• Is the order irrelevant for that rotation ?

(I'm not that good in maths and I'm also not sure how to tag my question)

## 1 Answer

1. You can use Euler's or Rodrigues' rotation formula if you want to use trigonometry. This video describes this topic very well - video here.
2. As far as I'm concerned, only rotation quaternions remembers their rotation. When using pitch/yaw/roll method, in order to go back to the rotation you have started with, you need to combine the last rotation step with a negative amount of previous rotation step angle, for each axis, and regress like this in rotation steps as many times as you have rotated an object. 2.a Yes, you should reverse the order of operations and reverse the direction of rotation. You can read about it here (for example).

And if I were you, I would tag this question with 'mathematics' and 'rotations'.