So I have a classical mechanics problem where I have worked out the azimuthal and altitude angle for a vector, I then want to apply rotational matrices so that the vector is realigned with the z axis only. i.e. I want to turn a spherical co-ordinate (r, $\theta$,$\phi$) into Euler rotations
To do this I think I need to do
\begin{alignat}{1} R_z(\phi) &= \begin{bmatrix} \cos \phi & -\sin \phi & 0 \\[3pt] \sin \phi & \cos \phi & 0\\[3pt] 0 & 0 & 1\\ \end{bmatrix}\\[6pt] then\\ R_y(\theta) &= \begin{bmatrix} \cos \theta & 0 & \sin \theta \\[3pt] 0 & 1 & 0 \\[3pt] -\sin \theta & 0 & \cos \theta \\ \end{bmatrix} \\[6pt] then\\ R(\psi) &= \begin{bmatrix} 1 & 0 & 0 \\ 0 & \cos \psi & -\sin \psi \\[3pt] 0 & \sin \psi & \cos \psi \\[3pt] \end{bmatrix} \\[6pt] \end{alignat}
But I don't know how to work out $\psi$ for this as the first rotation is about the z axis and so rotates the x and y axis, and then the second matrix only rotates around the y axis, but the angle $\theta$ in spherical co-ordinates is not about the y axis only but x and y at the same time depending on the angle $\phi$.
Any suggestions?