# Finding the total rotation about an arbitrary axis

I have a rigid body which is fixed in a x,y,z system and is free to rotate. The z vector is parallel to gravity. x and y are arbitrary and perpendicular to z.

The moving coordinate system is x',y',z' (fixed to the rigid body) and I know the Euler angles of each of these coordinates, call them θ, φ, ψ respectively. In my rotating coordinate system, (x',y',z') I am always able to locate the gravity vector, although it is changing as the body rotates.

I want to find the total rotation about the z axis, (the vector which points directly to the ground) as one angle for any rotation that occurs about this moving coordinate system.

I'm not sure how to do this though... Does anyone know the right way to go about this?

• You want to convert Euler angles from body frame to world frame. Generate the 3×3 rotation matrix from the body frame angles. Then convert back to the different set of Euler angles where yaw is defined about a fixed z axis. – ja72 Jul 11 at 1:53