[Contents]
Copyright © 2009 jsd

All your base are belong to us.
– Toaplan / Sega

1  Coordinate Systems, Basis Sets, Reference Frames, Axes, etc.

Here is a list of coordinate systems that are commonly used to describe locations, motions, and orientations at or near the surface of the earth ... along with some advice on how to use the various systems. The terminology used here is consistent with e.g. reference 1.

A coordinate system {X, Y, Z} is used to specify positions. Each such system induces a corresponding set of basis vectors {dX, dY, dZ} that is used to specify directions.

1.    Earth-Centered Earth-Fixed (ECEF) system

The origin of coordinates is at the center of the earth. The X axis passes through the (latitude, longitude) point (0, 0) which is in the Gulf of Guinea, south of Ghana and west of Gabon. The Y axis passes through the (latitude, longitude) point (0, 90e) which is in the Indian Ocean, southeast of Sri Lanka and west of Indonesia. The Z axis passes through the north pole.

This means that {dX, dY, dZ} is a right-handed orthogonal system.

This is not an inertial reference frame, since it rotates along with the earth.

2.    Earth-Centered Nonrotating (ECN or ECNR) system

This system is all-too-often called the Earth-Centered Inertial (ECI) system, but this is a misnomer, because it is definitely not an inertial frame. See below for more on this.

The origin of coordinates is at the center of the earth. The X axis passes through the intersection of the ecliptic with the earth’s equatorial plane, namely the point (declination, right ascension) = (0,0) which is a point in the constellation Pisces. This is where the sun is located at the moment of the vernal equinox. The Y axis passes through the point (declination, right ascension) = (0,6:00) which is a point in the constellation Orion. The Z axis passes through the north pole.

This means that {dX, dY, dZ} is a right-handed orthogonal system.

Considered as a coordinate system, this not an inertial reference frame, since it partakes of the earth’s orbital velocity, which changes direction during the course of the year. This system is however much more nearly inertial than the ECEF frame, since it is nonrotating. The orbital acceleration is only about 0.006 m/s2, which is sometimes negligible, depending on the application.

The induced vector basis {dX, dY, dZ} is inertial, since it is nonrotating. Directions are independent of position.

3.    Local North-East-Down (NED) system

Except at the poles, at each point on the earth you can define a local reference frame such that the X axis points north, the Y axis points east, and the Z axis points down.

There are innumerable different NED systems, one for each point on earth, so you need to specify which one you are using at the moment.

In any NED system, {dX, dY, dZ} is a right-handed orthogonal system.

Each NED system rotates along with the earth, so it is not an inertial reference frame.

As a general rule, you should be wary of using the NED system, because it breaks down at the poles. Use the ECN or ECEF systems instead. There is lots of data that comes to you in NED form, but you should convert it to ECN or ECEF at the first opportunity.

The NED system differs from the ENU system (item 4) by a simple rotation. The NED system is preferred over ENU in many applications, because it bears a simple natural relationship to the conventional aviation body axes (item 6).

4.    Local East-North-Up (ENU) system

This is the same idea as the NED system (item 3). The only difference is a rotation.

5.    Local Horizontal (LH) system or Horizontal Local (HL) system or Local Tangent Plane (LTP) system.

These names are deprecated because they are ambiguous. They could refer to the NED system or the ENU system.

6.    Body system

In a boat, aircraft, or spacecraft, the conventional body axes are defined as follows: The X axis extends out the front of the craft. The Y axis extends out the starboard side. The Z axis extends out the bottom.

These axes are rigidly fixed to the structure of the craft, and rotate with the craft. In particular, when the craft is maneuvering, you cannot assume that the Z axis is vertical or that the X or Y axis is horizontal relative to the local surface of the earth.

Having the Z axis point downward may seem counterintuitive at first glance, but this system has many advantages.

7.    OpenGL Camera system

The OpenGL graphics software uses the following system: The X axis points to the viewer’s right. The Y axis points out the top of the camera. The Z axis points backward, i.e. opposite to the direction of view.

The OpenAL audio software uses the same system.

In this system, {dX, dY, dZ} is a right-handed orthogonal system.

This system differs from the conventional body system (item 6) by a simple rotation.

8.    Euler angles – Yaw, Pitch, and Roll

The attitude of a craft refers to its orientation. This is a physical, geometric quantity, independent of what coordinate system (if any) you are using.

It is often – but not always – useful to measure the attitude relative to the local NED frame. To put an aircraft into a specified attitude (given in terms of yaw, pitch, and bank), perform the following steps in order: Start with the aircraft heading north in level flight. Rotate the aircraft in the XY plane by the given yaw angle. Then rotate in the (new) ZX plane by the given pitch angle. Finally, rotate in the (new) YZ plane by the given bank angle.

Conversely, given a specified attitude, you can determine the corresponding yaw, pitch, and bank angles by doing the aforementioned steps in the reverse order: First roll (in the YZ plane) to wings-level attitude, then pitch up or down (in the ZX plane) to level-pitch attitude, and then finally yaw (in the XY plane) back to north.

For more about how to specify rotations, and how to compute the effect of multiple rotations, see reference 2.

It must be emphasized that the attitude is a physical, geometric quantity, independent of what coordinate system (if any) you are using. In particular, if you fly over the north pole, there is no abrupt change in your attitude. Your heading will change abruptly, but heading does not define attitude.

To repeat: yaw, pitch, and roll do not define attitude; they are merely one scheme for measuring and/or specifying attitude. This scheme is very badly behaved at the north and south poles.

Better ways of specifying attitude are described in section 2.

2  Orientation and Attitude

In this section we emphasize angles and orientations, in contrast to section 1 where most of the focus was on coordinates and locations.

To describe the orientation of a body in space, you need two things:

2.1  ECEF + XYZ Body Axes

Here’s an example of how this is often done in practice: Suppose we want to describe the attitude of an aircraft in a way that is consistent with the ECEF coordinate system (item 1) ... or, rather, with the vector basis induced by those coordinates.

For a boat, aircraft, or spacecraft, the natural thing to do is to choose a “reference attitude” such that the XYZ axes of the conventional body system (item 6) are aligned with the XYZ axes of the ECEF system. Then any other attitude can be expressed as a rotation relative to this reference attitude.

The physical meaning of this reference attitude is as follows: Suppose you are flying over the Gulf of Guinea at (lat, lon) = (0, 0). Then the reference attitude is a vertical climb, with the nose pointing up, the starboard wingtip pointing east, and the belly pointing north.

This may seem like a strange attitude to choose as a standard reference, but it is mathematically convenient, because it is the direct consequence of aligning the body XYZ axes with the ECEF XYZ axes.

2.2  ECEF + OpenGL Camera Axes

Here is another way of specifying orientation. Instead of using the conventional aviation XYZ body axes, it uses the OpenGL camera axes (item 7).

The idea is to align the OpenGL axes with the ECEF axes.

In this system, the standard orientation can be achieved as follows:

Suppose you are over the Gulf of Guinea, at (lat,lon) = (0,0). Then the reference orientation is:

To say the same thing in other words, and perhaps more to the point: Using ECEF (item 1) + OpenGL camera orientation conventions (item 7) at (lat,lon) = (0,0), the reference orientation is:

3  References

1.
“JSBSim Reference Manual” http://www.jsbsim.org/JSBSimReferenceManual.pdf

2.
John Denker, “Multi-Dimensional Rotations, Including Boosts” www.av8n.com/physics/rotations.htm
[Contents]
Copyright © 2009 jsd