Positional Astronomy:
Conversion between horizontal and equatorial systems

{Note: If your browser does not distinguish between "a,b" and "a,b" (the Greek letters "alpha, beta") then I am afraid you will not be able to make much sense of the equations on this page.}

To convert between the horizontal and equatorial coordinates for an object X,
we use a spherical triangle often called "The" Astronomical Triangle: XPZ,
where Z is the zenith, P is the North Celestial Pole, and X is the object.

The sides of the triangle:
   PZ is the observer's co-latitude = 90-f.
   ZX is the zenith distance of X = 90-a.
   PX is the North Polar Distance of X = 90-d.

The angles of the triangle:
   The angle at P is H, the local Hour Angle of X.
   The angle at Z is 360-A, where A is the azimuth of X.
   The angle at X is q, the parallactic angle.

We assume we know the observer’s latitude f and the Local Sidereal Time LST.
(LST may be obtained, if necessary, from Greenwich Sidereal Time and observer’s longitude.)

diagram

To convert from equatorial to horizontal coordinates:

Given RA a and declination d, we have
Local Hour Angle H = LST - RA, in hours;
convert H to degrees (multiply by 15).
Given H and d, we require azimuth A and altitude a.

By the cosine rule:
cos(90-a) = cos(90-d) cos(90-f) + sin(90-d) sin(90-f) cos(H)
which simplifies to:
sin(a) = sin(d) sin(f) + cos(d) cos(f) cos(H)
This gives us the altitude a.

By the sine rule:
sin(360-A)/sin(90-d) = sin(H)/sin(90-a)
which simplifies to:
- sin(A)/cos(d) = sin(H)/cos(a)
i.e. sin(A) = - sin(H) cos(d) / cos(a)
which gives us the azimuth A.

Alternatively, use the cosine rule again:
cos(90-d) = cos(90-f) cos(90-a) + sin(90-f) sin(90-a) cos(360-A)
which simplifies to
sin(d) = sin(f) sin(a) + cos(f) cos(a) cos(A)
Rearrange to find A:
cos(A) = { sin(d) - sin(f) sin(a) } / cos(f) cos(a)
which again gives us the azimuth A.

Here are all the equations together:
H = t - a
sin(a) = sin(d) sin(f) + cos(d) cos(f) cos(H)

sin(A) = - sin(H) cos(d) / cos(a)
cos(A) = { sin(d) - sin(f) sin(a) } / cos(f) cos(a)



Now for the inverse problem:
to convert from horizontal to equatorial coordinates:

Given f, a and A, what are a and d?

Start by using the cosine rule to get d, as shown above:
sin(d) = sin(a)sin(f) + cos(a) cos(f) cos(A)

We can now use the sine rule to get H, using the same formula as above:
sin(H) = - sin(A) cos(a) / cos(d)
Or use the cosine rule instead:
sin(a) = sin(d)sin(f) + cos(d) cos(f) cos(H)
and rearrange to find H:
cos(H) = { sin(a) - sin(d) sin(f) } / cos(d) cos(f)

Having calculated H, ascertain the Local Sidereal Time t.
Then the R.A. follows from
 a = t – H .

Here are all the equations together:
sin(d) = sin(a)sin(f) + cos(a) cos(f) cos(A)
sin(H) = - sin(A) cos(a) / cos(d)
cos(H) = { sin(a) - sin(d) sin(f) } / cos(d) cos(f)
a = t – H



Exercise:

Prove that the celestial equator cuts the horizon at azimuth 90 and 270,
at any latitude (except at the North and South Poles).

At what angle does the celestial equator cut the horizon, at latitude f ?

Click here for the answer.



Previous section: Sidereal time
Next section: Galactic coordinates
Return to index