Sequence of Euler (yaw/pitch/roll) rotations?

1.1k Views Asked by At

I'm an android programmer and I have a problem that it's base is in about Mathematics.So excuse me if it is very easy ,abstract or bad formatted.But I need a simple solution for my problem to convert it to an algorithm:
I have a right hand Cartesian coordinate system and a 3D vector in it,for example k that is (0,0,1).This system rotates several times,for example:

rotateX(roll with r0 degree);
rotateY(pitch with p0 degree);
rotateZ(yaw with y0 degree);
rotateX(roll with r1 degree);
rotateY(pitch with p1 degree);
rotateZ(yaw with y1 degree);
...

I have to find the angle between that vector and it's rotated result after above rotations.It was easy,if coordinate system was fixed,and this is my problem.When system rotate for r0 degrees around x-axis,it changes from xyz to XYZ and second rotation done around Y-axis(instead of y-axis) and so on for latest rotations.How I can get the angle between vector and the same vector in latest coordinate system?