[This FAQ is limited to questions about calculating planetary positions and related problems of spherical astronomy. Other areas of interest, such as calculations of telescope optics, are beyond the bounds of this document].
Calculation of astronomical events is a vast field with literature stretching back centuries, even to ancient times. This "frequently asked questions" list is directed toward the amateur astronomer who is looking for starting points. If you become familiar with the first two books recommended below, you will be well on your way. You will, in fact, have surpassed the author of the FAQ!
Of course, I invite your suggestions.
Monday-Friday, 9AM-5PM Eastern time
800-825-STAR (order only)
24 hour fax: 804-272-5920 If you have access to a good library, books under the subject headings "Spherical Astronomy" and "Celestial Mechanics" would be the places to start.
Although it requires some study, this is the closest thing to a "cookbook" approach I have seen. Better than that, it explains and makes comprehensible many difficult concepts, and has many worked examples and illustrations. It is not restricted to elementary problems, but treats many advanced topics. No calculus is required.
Beginners face two obstacles before they can calculate anything useful: (1) they must learn to convert between civil and astronomical dates and times (a task made more difficult by the fact that the Earth's rate of rotation is variable), and (2) they must learn a number of translations between coordinate systems (Sun-centered to Earth-centered to location-centered, as well as ecliptic to equatorial to horizon) and the application of corrections for precession and nutation and parallax. This is why questions such as "How do I predict the location of the moon?" do not have simple answers. You must know how to do (1) and (2) before you can start on the moon.
The proper order of corrections and coordinate conversions had previously been very confusing for me, but Meeus gave me everything I needed to overcome these obstacles.
He covers the basics of time and coordinate transformations, corrections for precession and nutation, and for the observer's true "topocentric" location as offset from the center of the Earth. For any given time, you can predict the positions of the Sun, Moon and planets and derive all the normal phenomena of the almanac. You can derive physical ephemerides (that is, the orientation of the objects as seen through a telescope) for the Sun, Moon, Jupiter, Mars and Saturn's rings. He provides both low-precision and high-precision techniques for charting Jupter's four largest moons. The Keplerian techniques of dealing with the orbits of new bodies such as comets and asteroids are also given.
A software supplement was available for the first edition, but this is no longer the case.
"Completely Revised and Rewritten", so make you sure you get the 1992 edition.
This explains how the data in the annual "Astronomical Almanac" is produced. It is also a high-quality spherical astronomy text with many references to the current research literature. If you've read Meeus and want "more", this is the logical next step.
Note that it contains very few worked examples and the math is much more advanced than in Meeus. Some of the chapters deal with issues of the professional astronomer that will not usually concern the amateur. Examples: plate tectonic motion can cause an observing site to shift its position several centimeters per year. Ocean tidal pressure on the continental shelves, and atmospheric pressure above the continents, can cause elevation to vary by similar amounts.
Note also that they use a different method of calculating planetary positions than does Meeus.
Astronomy publishes programs from time to time.
Willmann-Bell sells back issues of Celestial Computing, "A Journal for Personal Computers and Celestial Mechanics", dated from 1988 through 1992, edited by David Eagle. This is no longer published.
The Computing Section of the Association of Lunar and Planetary
Observers (A.L.P.O.) has a Computing Section and an electronic journal called The Digital
Unfortunately, these consist of uncommented BASIC listings.
Pseudo-code articles would be of greater use to those trying to
understand the calculations.
Astronomy magazine provides a small set of BASIC programs:
(Nov 15 1997) There is a Web page for the Motif version at:
It's available at:
This is for DOS and Windows, and is on the web at: ftp://ftp.demon.co.uk/pub/misc/astronomy/winmeuss.exe Caution: there is another program called ASTROWIN for astrology.
altitude = asin(sin(LAT) * sin(DEC) + cos(LAT)* cos(DEC) * cos(H)) where "atan2(x,y)" is C-library function equivalent to "atan(x/y)".
Bill Owen (email@example.com) offers the following comments: For the azimuth, it might be better to multiply both numerator and denominator by cos(DEC). Granted that the answer should turn out the same either way, since 0/something = something else/infinity, but you'll avoid the overflow that would otherwise result when you compute tan(DEC) near the poles.
Also, the formula you have here is zero when you're looking south. Although there are different conventions, the most common one reckons azimuth eastward from *north*.
Combine these nits, and the formula I use is: azimuth = atan2 (-sin(H)*cos(DEC), cos(LAT)*sin(DEC) - sin(LAT)*cos(DEC)*cos(H) )
Here is the method published in the Explanatory Supplement.
Perform integer math and drop all remainders. It is valid for
any Gregorian year "Y":
C = Y / 100
N = Y - 19 * (Y / 19)
K = (C - 17) / 25
I = C - C / 4 - (C - K) / 3 + 19 * N + 15
I = I - 30 * (I / 30)
I = I - (I / 28) * (1 - (I / 28) * (29 / (I + 1)) * ((21 - N) / 11))
J = Y + Y / 4 + I + 2 - C + C / 4
J = J - 7 * (J / 7)
L = I - J
M = 3 + (L + 40) / 44
D = L + 28 - 31 * (M / 4) "M" is the month number (3 -> March, 4 -> April) and "D" is the day of the month.
There is a short BASIC program at
The current speed of a body like a comet orbiting the sun, or in a hyperbolic or parabolic orbit, is: 2 * pi * sqrt(2/r - (1-e)/q) AU/year
where r is the current distance in AU to the sun, q is the perihelion distance in AU, and e is the eccentricity of the orbit.
It has been suggested to me that the following precisions are appropriate for the applications shown: 100 miles for most skyviewing work, 2 miles for accurately predicting Iridium flares, 50 feet for occultation work.