FREE Online Measurements Converters and Calculators
  Online Calculators - Online Converters - Unit Measurement Translators
Metric <-> Imperial <-> Metric

  Celestial to Horizon Co-ordinates Calculator
Custom Search

Extra Links
Scripts available at JavaScript Source

This Java Script calculator (by Stephen R. Schmitt) converts celestial coordinates of right ascension and declination into horizon coordinates of altitude and azimuth. To operate the calculator, enter the right ascension and declination of a celestial object, enter the latitude and longitude of the observing site. Enter north and east degrees as positive integers; enter south and west degrees as negative integers; enter minutes as positive floating point numbers. Enter the date and time for your location. If the date and time zone of your computer is set correctly, the program will compute the correct universal time (UT).

Press the Compute button to obtain the solution for your location and selected time. On invalid entries, a popup window will display an error message.

The Test button inserts a test case to show how the calculator works.

Coordinates of object and observer
declination     deg     min    
right ascension     hrs     min    
latitude     deg     min    
longitude     deg     min    

Local date and time of observation

date -- year : mon : day     : :
time -- hr : min : sec     : :

altitude     deg  
azimuth     deg  


Equatorial coordinates

By extending the lines of latitude and longitude outward from the Earth and onto the inside of the celestial sphere we get the equatorial coordinate system. The coordinates of stars, planets, and other celestial objects corresponding to latitude and longitude are declination (DEC) and right ascension (RA).

The declination of an object is its angle in degrees, minutes, and seconds of arc above or below the celestial equator. The right ascension is the angle between an object and the location of the vernal equinox (First Point in Aries) measured eastward along the celestial equator in hours, minutes, and seconds of sidereal time. Since the location of the vernal equinox changes due to the precession of the Earth's axis of rotation, coordinates must be given with reference to a date or epoch.

Right ascension is given in time units. One hour corresponds to 1/24 of a circle, or 15° of arc. As the Earth rotates, the sky moves to the West by about 1 hour of right ascension during each hour of clock time or exactly one hour of sidereal time. The Earth makes one full revolution in about 23 hours and 56 minutes of clock time or 24 hours of sidereal time. Sidereal time corresponds to the right ascension of the zenith, the point in the sky directly overhead.

For example, the coordinates of the star Regulus (Leo a) for epoch J2000 are:

RA:   10h 08m 22.3s
DEC: +11° 58' 02"

When the local sidereal time is 10h 08m 22.3s, it would be on the local meridian.

Horizon coordinates: azimuth and altitude

This is a local coordinate system to use for locating objects in the night sky as seen from a point on the Earth's surface. Azimuth is the angle of a celestial object around the sky from north. It is measure along the horizon in from North 0° through East 90°, South 180°, West 270° and back to North. Altitude is the complement of the zenith angle, which is the angle from the local meridian to the hour circle of object being observed. An object directly overhead would have an altitude of 90°. An object with a calculated altitude of 0° may not appear exactly on the horizon due to the refraction of light through the atmosphere. Generally, refraction makes objects near the horizon appear higher than their computed altitude.

Coordinate transformation

The azimuth (AZ) and altitude (ALT) of an object in the sky can be calculated easily using the date, universal time (UT), and the latitude (LAT) and longitude (LON) of the observing site and the right ascension (RA) and declination (DEC) of the object. All coordinates are expressed in degrees in the range 0° to 360°, so that trigonometric functions can be used for coordinate conversion.

Local Mean Sidereal Time

The mean sidereal time (MST) is calculated from a polynomial function of UT since epoch J2000. This formula gives MST, the sidereal time at the Greenwich meridian (at longitude 0°) in degrees. To get local mean sidereal time (LMST), add longitude if East or subtract longitude if West.

MST  = f(UT)

Hour Angle

The hour angle (HA) is the angle between an observer's meridian projected onto the celestial sphere and the right ascension of a celestial body. It is used in coordinate conversion.


Conversion of HA and DEC into ALT and AZ

Using the RA, DEC and HA for the object, and the latitude (LAT) of the observing site, the following formulas give the ALT and AZ of the object at the time and longitude that was used to calculate HA.

sin(ALT) = sin(DEC)·sin(LAT) + cos(DEC)·cos(LAT)·cos(HA)

           sin(DEC) - sin(ALT)·sin(LAT)
cos(A)   = ----------------------------

If sin(HA) is negative, then AZ = A, otherwise AZ = 360 - A 

This gives the computed horizon coordinates without correction for atmospheric refraction.


Copyright © 2004, Stephen R. Schmitt