# Coordinate systems and transformations

## Introduction

The need for the use of more than one coordinate system arises from the fact that many different physical phenomena are easier calculated or understood in a system that is appropriate for the phenomenon. Frequently, it is necessary to transform from one coordinate system to another. The transformations needed are described in Smart (1944), Mead (1970), Goldstein (1950), Olson (1970) and by the Magnetic and Electric Fields Branch, GSFC(1970). The definitions used for the various coordinate systems described here come from Russell (1971). The transformations were taken from Hapgood (1991).

The coordinate systems and transformations described on this page are all geocentric coordinates. This means that the centre of the Earth is taken as origin, and the transformations do not include any translations. Additional information on these and other coordinate systems (such as heliocentric and boundary normal systems) is available at the Space Plasma Group website at Ral, maintained by Mike Hapgood.

## General Remarks

For the definition of a coordinate system in threedimensional space, one has only to specify the direction of one of the axes, and the orientation of one of the other axes in the plane perpendicular to this direction. The third axis follows automatically in order to complete a right-handed orthogonal set.

Transformations may conveniently be performed using matrix arithmetic. For each transformation, there is a transformation matrix T such that Qb = TQa, where Qa is a vector in the first coordinate system, and Qb is the same vector in the second coordinate system. The transformation is thus totally described by the nine components of the matrix T.

One fortunate feature of transformation matrices is that the inverse is equal to the transpose of the matrix, i.e., if :

where (X1, X2, X3) are the direction cosines of the X-direction of the b-system, expressed in function of X, Y and Z of the a-system. Evidently, for the Y- and Z-direction, we find the corresponding (Y1, Y2, Y3) and (Z1, Z2, Z3). For the inverse transformation, we simply find:

When two or more transformations have to be carried out, these can easily be obtained by a simple multiplication of the corresponding matrices.

## Spherical and Cartesian Coordinates

In some coordinate systems, especially GEO and MAG, position is often specified in terms of colatitude theta, longitude phi and radial distance r. These are related to Cartesian components using :

and

## The Geocentric Equatorial Inertial System

The Geocentric Equatorial Inertial Systam (GEI) has its X-axis pointing from the Earth towards the first point of Aries (i.e. the position of the sun at the vernal equinox). This direction is the intersection of the Earth's equatorial plane and the ecliptic plane. The Z-axis is parallel to the rotation axis of the Earth and Y completes the right-handed orthogonal set (Y = Z x X).

The normal GEI coordinate system changes slowly in time owing to the effects of astronomical precession and the nutation of the Earth's rotation axis. The transformations described here are strictly correct if the epoch-of-date inertial system is used. Hapgood (1995) describes how the transformations should be adjusted to take account of this time depence of the GEI system.

## Geographic Coordinates

The Geographic Coordinate system (GEO) is defined so that its X-axis is in the Earth's equatorial plane but is fixed with the rotation of the Earth so that it passes through the Greenwich meridian (0° longitude). Its Z-axis is parallel to the rotation axis of the Earth, and its Y-axis completes a right-handed orthogonal set (Y = Z x X).

## Geodetic Coordinates

The geodetic coordinate system defines a position in terms of latitude, longitude and altitude above the ellipsoidal surface of the Earth (see Figure 1).

 Figure 1. Cross section of ellipsoid (taken from Kelso)

The ellipsoidal surface is a surface of resolution obtained by rotating an ellips around the minor axis. Thus, the geodetic longitude is the same as the geographic longitude, and only a meridional section must be considered.

The local horizon is defined as the plane that is tangent to the Earth's surface at a given position. The surface considered is the reference ellipsoid. The local zenith is the direction away from the point on the Earth's surface perpendicular to the local horizon. On a sphere, this direction is always directly away from the Earth's centre, but on an ellipsoid, this is not the case (except on the equator and at the poles).

The geodetic latitude, phi is the angle between the local zenith and the equatorial plane. Except at the poles and the equator, phi differs from the geocentric latitude phi'.

The point on the Earth surface directly below a given point above the surface is not on a line joining the given point and the centre of the Earth. It is the point where the local zenith points to the given point (see Figure 2). The geodetic altitude h is the distance from the point to the surface along the local zenith direction.

 Figure 2. Sub-point and altitude (taken from Kelso)

The reference ellipsoid is defined by two parameters, a, the semi-major axis, and f, the flattening, defined as:

f = (a - b) / a

where b is the semi-minor axis.

Global ellipsoidal parameters are derived from satellite data. Historically, local, regional and global best fitting ellipsoids have been considered. Table 1 lists some of these reference ellipsoids.

Table 1. Reference ellipsoids
Name semi-major axis
[m]
1/flattening Application
WGS 84 6378137 298.257 DoD (GPS)
GRS 80 6378137 298.257 IAG (Geo Ref Sys)
WGS 72 6378135 298.26 DoD (Doppler)
GRS 67 6378160 298.25 Australia 1966, South America 1969
IAU (1964) 6378160 298.25
Krassovsky (1940) 6378245 298.3 Russia
International (1924) 6378388 297 Europe (ReTrig)
Clarke (1880) 6378249 293 France, Africa
Clarke (1866) 6378206 294.98 North America
Bessel (1841) 6377397 299.15 German DHDN
Airy (1830) 6376542 299 Great Britain
Everest (1830) 6377276 300 India

The implementations in SPENVIS and UNILIB use the IAU (1964) reference ellipsoid.

The conversion from ellipsoidal coordinates to cartesian coordinates is given by:

 X = (N + h) cos(phi) cos(lambda) Y = (N + h) cos(phi) sin(lambda) Z = [N(1 - e2) + h] sin(phi)

with:

• h: the altitude;
• phi: the latitude;
• lambda: the longitude;
• e: the first eccentricity e = (a2 - b2)1/2 / a;
• N: the radius of curvature in the prime vertical:
N = a [1 - f (2 - f) sin2(phi)]-1/2

The inverse conversion can be iteratively computed from:

 h = (X2 + Y2)1/2 / cos(phi) - N tan(phi) = Z (X2 + Y2)-1/2 [1 - e2 N / (N + h)]-1 tan(lambda) = Y / X

## Geomagnetic Coordinates

The Geomagnetic Coordinate system (MAG) is defined so that its Z-axis is parallel to the magnetic dipole axis. The Y-axis of this system is perpendicular to the geographic poles such that if D is the dipole position and S is the south pole Y = D x S. Finally, the X-axis completes a right-handed orthogonal set.

The Geographic coordinates of the dipole axis derived from the International Geomagnetic Reference Field 1995 (IGRF-1995) are 79.30°N and 288.59°E for 1995. The values for the other IGRF epochs are listed in Table 2. It should be noted that the magnetic pole is moving with a speed of 2.6 km per year in the direction 15.6°N, 150.9°E. More information on the magnetic dipole and its variations can be found in Fraser-Smith (1987).

Table 2. Position of the Centred Dipole Model Northern Pole
Year Latitude Longitude
1945
1950
1955
1960
1965
1970
1975
1980
1985
1990
1995
78.47
78.47
78.46
78.51
78.53
78.59
78.69
78.81
78.97
79.13
79.30
291.47
291.15
290.84
290.53
290.15
289.82
289.53
289.24
289.10
288.89
288.59

## Geocentric Solar Ecliptic System

The Geocentric Solar Ecliptic System (GSE) has its X-axis pointing from the Earth towards the sun and its Y-axis is chosen to be in the ecliptic plane pointing towards dusk (thus opposing planetary motion). Its Z-axis is parallel to the ecliptic pole. Relative to an inertial system this system has a yearly rotation.

## Geocentric Solar Equatorial System

The Geocentric Solar Equatorial System (GSEQ) as with the GSE system has its X-axis pointing towards the Sun from the Earth. However, instead of having its Y-axis in the ecliptic plane, the GSEQ Y-axis is parallel to the Sun's equatorial plane which is inclined to the ecliptic. We note that since the X-axis is in the ecliptic plane and therefore is not necessarily in the Sun's equatorial plane, the Z-axis of this system will not necessarily be parallel to the Sun's axis of rotation. However, the Sun's axis of rotation must lie in the X-Z plane. The Z-axis is chosen to be in the same sense as the ecliptic pole, i.e. northwards.

## Geocentric Solar Magnetospheric System

The Geocentric Solar Magnetospheric System (GSM), as with both the GSE and GSEQ systems, has its X-axis from the Earth to the Sun. The Y-axis is defined to be perpendicular to the Earth's magnetic dipole so that the X-Z plane contains the dipole axis. The positive Z-axis is chosen to be in the same sense as the northern magnetic pole. The difference between the GSM system and the GSE and GSEQ is simply a rotation about the X-axis.

## Solar Magnetic Coordinates

In Solar Magnetic Coordinates (SM) the Z-axis is chosen parallel to the north magnetic pole and the Y-axis perpendicular to the Earth-Sun line towards dusk. The difference between this system and the GSM system is a rotation about the Y-axis. The amount of rotation is simply the dipole tilt angle as defined in the previous section. We note that in this system the X-axis does not point directly at the Sun. As with the GSM system, the SM system rotates with both a yearly and daily period with respect to inertial coordinates.

## Illustration

 Figure 3. Coordinate transformations for Brussels. The red ring is the geocentric equator, the black one the magnetic equator and the magenta ring is the ecliptic plane (Click on the gif to see an animation [213 Kbytes]).

# Calculation of transformation matrices

 To From GEI GEO GSE GSM SM MAG GEI 1 T1-1 T2-1 T2-1T3-1 T2-1T3-1T4-1 T1-1T5-1 GEO T1 1 T1T2-1 T1T2-1T3-1 T1T2-1T3-1T4-1 T5-1 GSE T2 T2T1-1 1 T3-1 T3-1T4-1 T2T1-1T5-1 GSM T3T2 T3T2T1-1 T3 1 T4-1 T3T2T1-1T5-1 SM T4T3T2 T4T3T2T1-1 T4T3 T4 1 T4T3T2T1-1T5-1 MAG T5T1 T5 T5T1T2-1 T5T1T2-1T3-1 T5T1T2-1T3-1T4-1 1

## T1: GEI to GEO

This matrix corresponds to a rotation in the plane of the Earth's geographic equator from the First Point of Aries to Greenwich meridian. The rotation angle theta is the Greenwich mean sidereal time. this can be calculated using the following formula (U.S. Naval Observatory, 1989):

where

with MJD the Modified Julian Date (i.e. the time measured in days from 00:00 UT on November 17, 1858) Note that T0 is the time in Julian centuries (36525 days) from 12:00 UT on January 1, 2000 (known as epoch 2000.0) to the previous midnight.

## T2: GEI to GSE

These two matrices correspond to :

1. rotation from the Earth's equator to the plane of the ecliptic;
2. rotation in the plane of the ecliptic from the First Point of Aries to the Earth-Sun direction.

These two angles are calculated as follows (U.S. Naval Observatory, 1989). First epsilon, the obliquity of the ecliptic:

and then lambdaSun, the Sun's ecliptic longitude :

where M is the Sun's mean anomaly, LAMBDA its mean longitude and T0 was defined in the previous paragraph. Note that, strictly speaking, TDT (Terrestrial Dynamical Time) should be used here in place of UT, but the difference of about a minute gives a difference of about 0.0007° in lambdaSun.

## T3: GSE to GSM

where psi is the angle between the GSE Z-axis and the projection of the magnetic dipole axis on the GSE Y-Z plane (i.e. the GSM Z-axis) measured positive for rotations towards the GSE Y-Axis. It can be calculated thus:

where psi lies between -90° and +90° and the values of ye and ze are obtained from a unit vector describing the dipole axis direction in the GSE coordinate system. Unfortunately, this direction is usually defined in the GEO coordinate system as:

where phi and lambda are the geocentric latitude and longitude of the dipole North geomagnetic pole. These may be derived from the first order coefficients of the IGRF (Fraser-Smith, 1987), eventually adjusted to the time of interest. Longitude is given by :

where, in practice, lambda must lie in the fourth quadrant. The latitude is given by:

Note that the above formula was erroneous in Hapgood (1991) and in our previous version, but is corrected in Hapgood (1997).

To obtain Qe we simply apply matrix arithmetic thus:

using the matrices defined in T1 and T2 and so psi and T3 can be determined.

## T4: GSM to SM

where mu is the dipole tilt angle, i.e. the angle between the GSM Z-axis and the dipole axis. It is positive for the North dipole pole sunward of GSM Z. It is calculated using:

where xe, ye and ze are defined in section T3 and mu must lie between -90° and +90°.

## T5: GEO to MAG

The two rotations are:
1. rotation in the plane of the Earth's equator form the Greenwich meridian to the meridian containing the dipole pole;
2. rotation in that meridian from the geographic pole to the dipole pole.

The angles phi and lambda are defined in section T3.

## References

Fraser-Smith, A. C., Centered and Eccentric Geomagnetic Dipoles and Their Poles, 1600-1985, Rev. Geophys., 25, pp. 1-16, 1987.

Hapgood, M. A., Space physics coordinate transformations: A user guide, Planet. Space Sci., 40 (5), pp. 711-717, 1992.

Hapgood, M. A., Space physics coordinate transformations: the role of precession, Ann. Geophysicae, 13, pp. 713-716, 1995.

Hapgood, M. A., Corrigendum, Planet. Space Sci., 45 (8), pp. 1047, 1997.

Kelso, T. S., Orbital Coordinate Systems, Part III, Satellite Times, January/February 1996.

Magnetic and Electric Fields Branch, Coordinate Transformations Used in OGO Satellite Data Analysis, Goddard Space Flight Center Report, X-645-70-29, 1970.

Mead, G. D., J. Geophys. Res., 72 (11), 2737, 1970.

Olson, W. P., Coordinate Transformations Used in Magnetopheric Physics, McDonnell-Douglas Astronautics Company Paper WD1145, 1970.

Peddie, N. W., International Geomagnetic Reference Field : The Third Generation, J. Geomag. Geoelectr., 34, pp. 309-326, 1985.

Russell, C. T., Geophysical Coordinate Transformations, Cosmic Electrodynamics, 2 , pp. 184-196, 1971.

Smart, W, M., Text-Book On Spherical Astronomy, Fourth Edition, Cambridge Univ. Press, Cambridge, 1944.

U.S. Naval Observatory, Almanac for Computers 1990. Nautical Almanac Office, U.S. Naval Observatory, Washington, D.C., 1989.

Last update: Mon, 12 Mar 2018