Camera on Airplane: Extrinsic plus Intrinsic 3D Rotations?

AI Thread Summary
The discussion focuses on defining camera angles for Google Earth based on aircraft movements, specifically how to rotate the camera view around the aircraft's yaw axis. The input parameters include Latitude, Longitude, Altitude, Heading, Pitch, and Bank angles derived from Flight Simulator, which are used to establish the camera's initial position. The challenge lies in generating a full rotation matrix that combines extrinsic rotations of the aircraft with intrinsic rotations of the camera, allowing for dynamic views during maneuvers. The conversation also highlights the need to convert between intrinsic and extrinsic rotations and the importance of using vectors for clarity in calculations. Ultimately, the goal is to extract the rotated Google Earth Heading, Tilt, and Roll angles from the final rotation matrix.
rpmc
Messages
8
Reaction score
0
Apologies up front for the long question … I have tried to be brief.

I want to define camera angles for Google Earth (GE) when rotated about an aircraft yaw axis. The input is Latitude, Longitude, Altitude plus Heading, Pitch and Bank angles, actually coming from Flight Simulator. These drive the GE camera view which is similarly defined in terms of Latitude, Longitude, Altitude and Heading, Tilt and Roll angles, with the GE camera initially looking straight ahead, along the roll axis of the aircraft. As I understand it, these angles define an extrinsic rotation (is this correct?) relative to the world coordinate system, but at any rate, they are supplied by Flight Simulator. This part is working fine and I get a GE view the pilot would see looking straight ahead.

However, I want to be able to rotate the GE camera view around the aircraft yaw axis by some arbitrary angle, and derive new GE Heading, Tilt, and Roll angles that would replicate, for example, looking left instead of straight ahead. At any point in time, the aircraft can be turning or performing aerobatics including inverted flight, and I want the rotated GE Heading, Tilt, and Roll angles to capture the aircraft maneuvering. For example, an aircraft performing an inside loop looks like a left barrel roll to a camera pointing -90 degrees Yaw = left. As I understand the camera rotation, it is an intrinsic rotation relative to the current aircraft axis system. The answer I need, the rotated GE angles, must be stated relative to the world coordinate system.

Assumptions:

Aircraft Relative to World, right handed system
Roll axis = x, roll angle = u
Pitch axis = y, pitch angle = v
Yaw axis = z, yaw angle = w (positive Z = down)

Camera relative to Aircraft, right handed system
Roll axis = xx, roll angle = a
Pitch axis = yy, pitch angle = b
Yaw axis = zz, yaw angle = c (positive zz = belly of plane)

I understand the elemental rotation functions are:
Code:
Rx(u)=      1        0        0
            0      c(u)    -s(u)
            0      s(u)     c(u)Ry(v)=    c(v)       0      s(v)
            0        1        0
         -s(v)       0      c(v)Rz(w)=    c(w)    -s(w)       0
          s(w)     c(w)       0
            0        0        1

and similar for the camera rotation about the airplane axis system.

What next? I think my first problem is to generate the correct full rotation matrix that is a product of the elemental extrinsic rotations of the aircraft times the product of the elemental intrinsic rotations of the camera. Is that correct? I believe I'm having difficulty keeping track of extrinsic vs. intrinsic and producing the final, full rotation matrix. And, I may indeed be wrong about the first rotation being extrinsic.

After that, the issue is to find the GE rotated Heading, Tilt and Roll angles that come out of the final full rotation matrix.

Any suggestions or links to references are most appreciated. I would like to accomplish this first using Euler (Tait-Bryan) rotations, and after I understand that, move on to Quaternions.

Robert
 
Last edited:
Physics news on Phys.org
There's probably a standard approach in graphics programming that is slicker than this, but this post explains how I'd approach it, from first principles.

I find it easier to work with vectors than with angles, because I'm more used to them. A rotation of a vector is achieved by pre-multiplying it by a rotation matrix.

To fully define the viewpoint direction of a camera or plane we need two vectors: one that points along the lens/fuselage and another, orthogonal to that, that points to the top of the camera/plane. Call these a 'point' vector and a 'top' vector' respectively.

We have two pairs: the point and top vectors of the plane, and of the camera.

Assume we have the point and top vectors of the plane, which are given by the Heading, Tilt and Roll angles in terms of world coordinates. The Heading and Tilt angles are the Azimuth and (90 degrees minus Zenith) angles of the point vector in spherical coordinates. The Roll angle relates to the top vector

Assume we also have the Roll, Pitch and Yaw angles of the camera relative to the plane. These transformations are usually specified as intrinsic rotations, which means they are specified in coordinate systems that have ben transformed by any preceding rotations. The order of application matters, so we'll assume the order is roll first, then pitch, then yaw. It is more convenient to calculate with extrinsic rotations, which means they are specified using untransformed coordinate systems. Fortunately, to convert from intrinsic to extrinsic, all we need to do is reverse the order of application, so What is needed is to calculate:

$$\vec{Point}_{Camera}=Roll^{Cam}_{Plane} \times Pitch^{Cam}_{Plane}\times Yaw^{Cam}_{Plane}\times \vec{Point}_{Plane}$$

where the first three factors are (extrinsic) rotation matrices and the last is the plane's point vector.

Similarly

$$\vec{Top}_{Camera}=Roll^{Cam}_{Plane} \times Pitch^{Cam}_{Plane}\times Yaw^{Cam}_{Plane}\times \vec{Top}_{Plane}$$

If the plane point and top vectors are specified in world coordinates then so will the camera point and top vectors. You can then extract the camera's GE Heading, Tilt and Roll angles from those two vectors.

The Wikipedia article on Euler angles looks quite good. That probably tells how to do this interms of angles rather than vectors, but I didn't get time to dive into it.
 
Thanks Andre,

I think I understand the concept of your approach, vectors vs angles, but I'm still hung up on some points.

Do you have the time to expand a bit on "A rotation of a vector is achieved by pre-multiplying it by a rotation matrix"? I'd like to see the matrix math representation of that.

Thanks again for your quick response.
 
In your opening post you show the matrices for rotations about the x, y and z axes, by angles u, v, w respectively, as Rx(u), Ry(v), Rz(w) resp.

Say you have a vector ##\vec{v}=\left(\array{1\\ 0\\ 2}\right)## and you want to rotate it first by u around the x axis, then by v around the y axis, then by w around the z axis. Then the result will be the vector you get from the following matrix multiplication:

$$Rz(w)\times \left( Ry(v)\times \left(Rx(u)\times \vec{v}\right)\right)$$

The parentheses are not necessary, because matrix multiplication is associative, but I've put them into show you the usual order of applying the transformations.

Those transformations are relative to fixed x,y,z axes. With your camera using a roll,pitch,yaw system, your 2nd and 3rd rotations would be specified relative to transformed axes, because each rotation transforms the coordinate axes used to specify the next rotation, as well as transforming the vector. Say you have chosen x,y and z to represent the roll, pitch and yaw axes. Then a bit of mathematical manipulation shows that there's an easy way to allow for the transformed axes. To give the above vector a roll of u followed by a pitch of v followed by a yaw of w, we simply reverse the order of matrix multiplication as follows:

$$Rx(u)\times \left( Ry(v)\times \left(Rz(w)\times \vec{v}\right)\right)$$
 
Thread 'Is 'Velocity of Transport' a Recognized Term in English Mechanics Literature?'
Here are two fragments from Banach's monograph in Mechanics I have never seen the term <<velocity of transport>> in English texts. Actually I have never seen this term being named somehow in English. This term has a name in Russian books. I looked through the original Banach's text in Polish and there is a Polish name for this term. It is a little bit surprising that the Polish name differs from the Russian one and also differs from this English translation. My question is: Is there...
This has been discussed many times on PF, and will likely come up again, so the video might come handy. Previous threads: https://www.physicsforums.com/threads/is-a-treadmill-incline-just-a-marketing-gimmick.937725/ https://www.physicsforums.com/threads/work-done-running-on-an-inclined-treadmill.927825/ https://www.physicsforums.com/threads/how-do-we-calculate-the-energy-we-used-to-do-something.1052162/
Hi there, im studying nanoscience at the university in Basel. Today I looked at the topic of intertial and non-inertial reference frames and the existence of fictitious forces. I understand that you call forces real in physics if they appear in interplay. Meaning that a force is real when there is the "actio" partner to the "reactio" partner. If this condition is not satisfied the force is not real. I also understand that if you specifically look at non-inertial reference frames you can...

Similar threads

Back
Top