Transformation of angular and linear velocities (to determine dynamics of an object)

 Quote by Roughmar First and foremost, I decided with putting this in the math sub-forum since I believe my problem has to do with the general maths of this. I'm trying to study the dynamics of an object. For a whole lot of reasons, it is to my advantage to study those dynamics on a object fixed axis. For that, I use an earth fixed axis and subsequently apply a rotation. I'll use a specific example I found in a known paper: I'm using a Z-X-Y order for such a rotation, giving me this matrix, expressed in roll, pitch and yaw components: R = $\left[cos\psi cos\theta - sin\phi sin\psi sin\theta , -cos\phi sin \psi , cos\psi sin\theta + cos\theta sin\phi sin\psi\right]$ $\left[cos\theta sin\psi + cos\psi sin\phi sin\theta , cos\phi cos\psi , sin\psi sin\theta - cos\psi cos\theta sin\phi\right]$ $\left[-cos\phi sin\theta , sin\phi , cos\phi cos\theta\right]$ (am not really proficient with coding here, so bear with me with the previous and following "matrix", if someone can provide a code example for a matrix I'd be more than willing to make this more elegant) Now, the components of angular velocity in the body frame are p,q and r. These values are related to the derivatives of the roll, pitch and yaw angles according to $\left[p,q,r\right]^{T} =\left[cos\theta , 0 , -cos\phi sin\theta ; 0 , 1 , sin\phi;sin\theta , 0 , cos\phi\cos\theta\right]\left[\dot{\phi}, \dot{\theta},\dot{\psi}\right]^{T}$ ... My question is why. How is this last matrix calculated? I've been looking at this for the last 4 hours and reached no conclusion whatsoever.