# How can I compute the attitude of a satellite given its yaw, pitch, roll, and velocity?

How can I compute the attitude of a satellite given its yaw, pitch, roll, and velocity?

Yaw, Pitch, and Roll are given with respect to the velocity vector (A vector whose origin is the satellite's center towards to the direction of motion).

The velocity is given in ECEF.

By attitude I mean the direction of the satellite's body after the rotations along different axes caused by yaw/pitch/roll steering.

• What is ECEF? I know earth centered inertial frame, but I can't come up with the 2nd E. – Organic Marble Jun 30 '15 at 21:32
• "Earth-Centered, Earth-Fixed" – duzzy Jun 30 '15 at 21:40
• How can I compute the attitude of a satellite given its yaw, pitch, roll, and velocity? You can't. At an absolute minimum, you need to satellite's angular velocity. Velocity doesn't provide that information. – David Hammen Jul 1 '15 at 1:03
• @DavidHammen Thanks. we know the satellite's angular velocity as well. – Mahdi Khosravi Jul 1 '15 at 3:57
• It is a bit confusing. Yaw, pitch and roll should identify a reference frame that moves with the satellite along the orbit and usually roll is aligned with the velocity vector, yaw points towards the Earth and pitch to form a right-handed frame. Is this the case? Than you may want to know the final orientation of the satellite given the 3 angles about yaw, pitch and roll axes. Correct? – tuspazio Jul 1 '15 at 9:12

Let's name $\vartheta$, $\varphi$ and $\psi$ the angles respectively about roll, pitch and yaw. And suppose we want to combine the rotations in exactly this order. The rotation matrices related to each rotation are: $$A_{\rm r} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & c_\vartheta & s_\vartheta \\ 0 & -s_\vartheta & c_\vartheta \end{bmatrix}, \; A_{\rm p} = \begin{bmatrix} c_\varphi & 0 & -s_\varphi \\ 0 & 1 & 0 \\ s_\varphi & 0 & c_\varphi \end{bmatrix}, \; A_{\rm y} = \begin{bmatrix} c_\psi & s_\psi & 0 \\ -s_\psi & c_\psi & 0 \\ 0 & 0 & 1 \end{bmatrix}$$
Then just perform the product of the 3 matrices in the reverse order (successive rotations rule): $$A(\vartheta, \varphi, \phi) = A_{\rm y}A_{\rm p}A_{\rm r}$$