rotating an airplane thats pitched 10 degrees nose up, to the left.

29 Views Asked by At

z′=zcos(10°)−ysin(10°)
y′=zsin(10°)+ycos(10°)

Im using this equation to make my virtual airplane rotate to 10° nose up. The challenge now is to make the airplane bank to 30° left so I changed z to x in the next equation so that the plane can bank 30°.

x′=xcos(30°)−ysin(30°)
y′=xsin(30°)+ycos(30°)

The issue with this code is that the plane doesn't turn realistically. This equation would only work if the plane was in level flight..... not while climbing, what is the right way to solve this issue?

1

There are 1 best solutions below

1
On

You need to rotate the axes to follow the plane. The way you are doing it, you pitch up and then roll in the original reference frame. You want to pitch up around $x$, as you do, but then to roll around $z'$ instead of $z$. The second set of equations should have $x''$ and $y''$ on the left and $x'$ and $y'$ on the right. The first should be expanded by $x'=x$ so you can do that. The second should have $z''=z'$ so you know $z''$.