# How to compute final aircraft attitude, if we know starting attitude and degrees of rotation around each axis? (Specific example)

I'm flying due north (000 degrees heading), with bank angle of 0 degrees and a pitch attitude of 0 degrees.

I roll the airplane 30 degrees to the right, rotating only around the aircraft's roll axis (longitudinal axis).

Then I pitch the aircraft up through 45 degrees of rotation around the aircraft's pitch axis (lateral axis), with no rotation around the airplane's roll axis (longitudinal axis) or yaw axis (sometimes called the "directional" axis).

At the instant the pitch rotation is finished, what is the airplane's heading, bank angle ("roll attitude"), and pitch attitude? And how is it calculated? Is calculus involved?

It's obviously a problem in spherical geometry...

Context: If the answer seems too obvious, consider what happens if we rotate 90 degrees around the pitch axis (longitudinal axis), starting from 0 degrees pitch attitude and a 90-degree bank angle.

Admittedly, the maneuver described in this question is a bit hypothetical-- it might not be possible to actually fly this maneuver. It seems to describe sort of a chandelle, but any actual climbing turn is generally going to involve continual rotations around all three axes. But, humour me and imagine that it somehow is possible to fly this maneuver.

• Closely related: What is the relation between roll angle and pitch angle? Mar 8 at 16:53
• Have a look at the rotation matrices in this answer. Mar 8 at 17:00
• @Bianfable -- it's not clear to me that that answer really tells me how to compute the final bank angle, pitch attitude, and heading, after the prescribed rotations. Rather, that answer converts a vector from body coordinates to "navigational" coordinates. Maybe if I understood the situation better I would see how the two problems are essentially the same, but I'm not seeing it at the moment-- Mar 8 at 17:13
• Anyway, I've made chat room for the present question-- chat.stackexchange.com/rooms/144514/… . Feel free to chime in. Mar 10 at 20:00
• Related-- aviation.stackexchange.com/questions/66945/…. -- in that answer to another question I asserted that if the aircraft is banked, rotating about the aircraft's pitch axis will change the bank angle even with no rotation about the aircraft's roll axis or yaw axis.It's challenging to discern whether or not any existing answers take this into account Mar 19 at 0:25

First off: for your specific example, no calculus is required (but quite a bit of linear algebra), since you only rotate around one axis at a time. If you start doing complex maneuvers, combining different rotations at different rates and times, you will need calculus (in the form of numerical integration aka "simulation": basically doing everything below in very small steps).

Rotations come in two 'flavours': intrinsic and extrinsic. For intrinsic rotations, the coordinate system rotates with the object. So much like inside an airplane. For extrinsic rotations, you rotate around fixed axes of the coordinate system, but that's not relevant for your question.

These simple rotations can be described most intuitively by rotation matrices. You start with some vector, and premultiply it by these rotation matrices to get a new vector in a new direction. For example, let's consider an airplane moving in the x-direction, wings parallel to the y-direction, and the roof pointing in the positive z-direction. The direction of the nose is then $$\begin{bmatrix}1 & 0 & 0 \end{bmatrix}^T$$, the direction of the left wing $$\begin{bmatrix}0 & 1 & 0 \end{bmatrix}^T$$ and the direction of the ceiling $$\begin{bmatrix}0 & 0 & 1 \end{bmatrix}^T$$. In principle, two of these vectors uniquely describe the orientation of the plane, but let's keep all three for completeness and put them together in a matrix describing the original orientation of the plane: $$\mathbf{O} = \begin{bmatrix}1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end{bmatrix}$$ Now, we want to rotate this around the roll axis by -30° and pitch axis by -45° (negative because of the right-handed coordinate system used): $$\mathbf{R_{roll}}=\begin{bmatrix}1 & 0 & 0 \\ 0 & \cos{-30°}& -\sin{-30°} \\ 0 & \sin{-30°} & \cos{-30°}\end{bmatrix} \qquad \mathbf{R_{pitch}}=\begin{bmatrix}\cos{-45°} & 0 & \sin{-45°} \\0 & 1 & 0 \\-\sin{-45°} & 0 &\cos{-45°}\end{bmatrix}$$ The order of multiplication matters here, and in this case, we must do the rotations from left to right$$^*$$, even though the matrix multiplication goes from right to left, with $$\mathbf{F}$$ the final orientation $$\mathbf{F}=\mathbf{R_{roll}R_{pitch}O}$$ We find the final orientation: $$\mathbf{F}=\begin{bmatrix} \sqrt{2}/2 & 0 & -\sqrt{2}/2 \\ \sqrt{2}/4 & \sqrt{3}/2 & \sqrt{2}/4 \\ \sqrt{6}/4 & -1/2 & \sqrt{6}/4 \end{bmatrix}\approx \begin{bmatrix}0.7 & 0 & -0.7 \\ 0.35 & 0.87 & 0.35 \\ 0.61 & -0.5 & 0.61\end{bmatrix}$$

Remember: the columns of $$\mathbf{F}$$ were nose, left wing, ceiling, in that order. So basically, the nose points a bit to the left and a bit more forwards than up; the left wing still points at the same heading as before but a bit down; and the ceiling points backwards and quite a bit more up than left. Got it? :) actual values coming soon.

$$^*$$ Really, we first pre-multiply by the roll, and then pre-multiply by the pitch transformed to the rolled coordinate system, so really $$(\mathbf{R_{roll}R_{pitch}R_{roll}^T})\mathbf{R_{roll}}$$ But that's just unwieldy, don't you think.

• Regarding the parts in your question about the 90° rotations: the parameters pitch, yaw and roll are ill defined for extreme attitudes so it's sometimes hard to go back from the F matrix to these parameters. But I think by using the full matrix O at least we prevented any gimbal lock. Mar 9 at 6:59
• Question: (and this would apply to the other answer too)-- is the final bank angle really 30 degrees? For any given initial bank angle, if I rotate far enough (in the nose-up sense) about the aircraft's pitch axis, with no rotation about the yaw or roll axes, don't I increase the bank angle, eventually reaching 90 degrees bank if I rotate far enough? Mar 10 at 17:06
• I'm just "flying" it with my hand ("pivoting" my hand about "pitch" only, starting with non-zero "bank") when I reach that conclusion-- Mar 10 at 17:31
• I made chat room for this question-- chat.stackexchange.com/rooms/144514/…. Have primarily focused on diagram in other answer but feel free to chime in with any more input re your answer. Perhaps of particular relevance -- chat.stackexchange.com/transcript/message/63153825#63153825 Mar 10 at 19:24
• Yeah I think I have my calculation from vector to roll angle wrong. Will fix :) Mar 10 at 20:04

To the nearest tenth of a degree--

The final pitch attitude is 37.8 degrees. The final bank angle is 39.1 degrees. The heading change is 26.6 degrees.

How the results were obtained: thinking about how a spherical attitude indicator of the type described in this question would move during the maneuver, I realized that portion of the problem involving a rotation about the aircraft's pitch axis only, was analogous to a navigational problem involving a great circle route.1

So I found an on-line great-circle calculator.

I entered "0 degrees" for the initial latitude and longitude.

I played around with the final latitude and longitude until I had a value of 30 degrees for the initial heading, and a value of (45/360) of the earth's circumference, or 3110 statue miles2, for the spherical distance.

The final latitude is the final pitch attitude, and the final longitude is the change in heading, and the final course is the final bank angle.

For anyone wanting to replicate these results, the exact values I entered for the final latitude and longitude were 37.77 degrees N and 36.57 degrees E.

Since I haven't reversed-engineered the great circle calculator, I can't state the actual formulae used in the calculator. However, I've noticed that the results are identical to those given by the formulae in another answer (this one). I independently derived formulae based on geometry similar to (actually a mirror-image of)3 the geometry illustrated in that answer, and came up with--

delta pitch attitude = arcsin (sin (pitch rotation angle) * cosin (initial bank angle))

delta heading = arctan (tan (pitch rotation angle) * sin (initial bank angle))

(no formula derived for final bank angle)4

These formulae give the same results as those given by the formulae given in that answer, and also as those given by the great circle calculator.

Footnotes:

1. Readers trying to understand the how the great circle problem relates to the current question, might find it helpful to imagine the aircraft being located inside of a transparent sphere, with a beam of light shining forward to trace a path on the surface of the sphere as the aircraft changes attitude. The movement of the resulting dot of light could either represent the movement of the "pipper" or index dot in relation to the surface of a (spherical) attitude indicator, or could represent the movement of a vessel along a great circle route.

2. These calculations use a value of 24,880 statute miles for the earth's circumference, which is the average of the circumference around the poles and the circumference around the equator. According to Wikipedia, "Earth's circumference is the distance around Earth. Measured around the Equator, it is 40,075.017 km (24,901.461 mi). Measured around the poles, the circumference is 40,007.863 km (24,859.734 mi)."

3. In my diagrams, the pitch angle was upward above the horizon, not downward below the horizon. But since the diagrams are mirror-images of each other, the resulting formulae are unchanged. Note that which leg of the triangle should be taken to represent the "flight path", depends on whether the aircraft is envisioned to be flying at a constant altitude with a non-zero angle-of-attack (as measured from the fuselage or longitudinal axis), or is envisioned to be rotating about the pitch axis and climbing while maintaining a zero angle-of-attack (as measured from the fuselage or longitudinal axis). The same basic geometry applies in either case.

4. As I was doing the derivation, I had the impression that the geometry modeled by these formulae assumed that the aircraft rolled as needed to hold the bank angle constant at the initial bank angle as the aircraft rotated about the pitch axis, but it now appears that that is not actually the case.

• I'm confused as to why these results appear to be the same as those given by this answer aviation.stackexchange.com/a/98017/34686, which I thought was built around a model that assumed a constant bank angle during the pitch rotation, which would imply a non-zero rate of roll rotation. Clearly I am missing something. Discuss further in the chat room here -- chat.stackexchange.com/rooms/144514/… Mar 19 at 0:11
• For the present purposes, it would be really nice to find an on-line great circle calculator that lets you input the initial position, initial heading (course), and distance travelled, and outputs the final location. Since this has no practical application for navigation, most are not set up this way-- please let me know via comment or chat post if you find one! Mar 19 at 1:00
• Naturally, googling "great circle calculator" will give some insight into the formulae involved-- Mar 21 at 15:04
• Since the other answer referenced here has now been deleted, readers wishing to see the triangular geometry involved may wish to see figure 11-5 referenced in this chat post--chat.stackexchange.com/transcript/message/63155332#63155332 Mar 21 at 15:07