Camera on Airplane: Extrinsic plus Intrinsic 3D Rotations?

Click For Summary

Discussion Overview

The discussion revolves around the mathematical modeling of camera angles for Google Earth (GE) in relation to an aircraft's movement, specifically focusing on the rotations involved when the aircraft maneuvers. Participants explore the relationship between extrinsic and intrinsic rotations, and how to derive the necessary angles for the GE camera view based on the aircraft's heading, pitch, and bank angles.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant seeks to define camera angles for GE based on aircraft yaw, pitch, and roll, questioning the nature of the rotations as extrinsic or intrinsic.
  • Another participant suggests using vectors instead of angles for defining the camera's viewpoint direction, proposing a method to calculate the camera's point and top vectors based on the aircraft's angles.
  • A participant expresses confusion about the concept of vector rotation through matrix multiplication and requests clarification on the mathematical representation.
  • Another participant explains the order of matrix multiplication for applying rotations, emphasizing the need to reverse the order for intrinsic rotations to maintain consistency with extrinsic rotations.

Areas of Agreement / Disagreement

Participants express differing views on the best approach to model the camera rotations, with some favoring vector-based methods and others focusing on angle-based methods. There is no consensus on the correct method or the definitions of extrinsic versus intrinsic rotations.

Contextual Notes

Participants acknowledge potential difficulties in keeping track of extrinsic versus intrinsic rotations and the implications of transforming coordinate systems through successive rotations. There are also unresolved aspects regarding the final rotation matrix and the extraction of GE angles from it.

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)$$
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
6K