# How to get Euler angles with respect to initial Euler angle

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 from this baseline values 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 don't know how to do this.

-

First, you cannot add or subtract Euler angles. They are not vectors. You need to convert the Euler angles to a representation that can be composed such as a rotation matrix or unit quaternion. If $R_b$ is the base line rotation matrix and $R_i$ is a given rotation matrix, then you can measure rotation w.r.t. the baseline using the following formula $R = R_b^{T}R_i$.
$$R = R_z R_y R_x.$$