Astronomy Engine

Supported Programming Languages
|
Browser
|
Node.js
|
C
|
| Examples | Examples | Examples |
| Documentation | Documentation | Documentation |
Overview
The Astronomy Engine is a suite of open source libraries for calculating positions of the Sun, Moon, and planets, and for predicting interesting events like oppositions, conjunctions, rise and set times, lunar phases, and more.
It supports several popular programming langauges with a consistent API. Function and type names are uniform across all the supported languages.
The Astronomy Engine is designed to be small, fast, and accurate to within ±1 arcminute. It is based on the authoritative and well-tested models VSOP87 and NOVAS C 3.1.
These libraries are rigorously unit-tested against NOVAS, JPL Horizons, and other reliable sources of ephemeris data. Calculations are also verified to be identical among all the supported programming languages.
Features
-
Provides calculations for the Sun, Moon, Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune, and Pluto.
-
Calculates for any calendar date and time between the years 1700 and 2200.
-
Provides heliocentric and geocentric Cartesian vectors of all the above bodies.
-
Determines apparent horizon-based positions for an observer anywhere on the Earth, given that observer's latitude, longitude, and elevation in meters. Optionally corrects for atmospheric refraction.
-
Calculates rise, set, and culmination times of Sun, Moon, and planets.
-
Finds date and time of Moon phases: new, first quarter, full, third quarter (or anywhere in between as expressed in degrees of ecliptic longitude).
-
Predicts lunar apogee and perigee dates, times, and distances.
-
Predicts date and time of equinoxes and solstices for a given calendar year.
-
Determines apparent visual magnitudes of all the supported celestial bodies.
-
Predicts dates of planetary conjunctions and oppositions.
-
Predicts dates of Venus' peak visual magnitude.
-
Predicts dates of maximum elongation for Mercury and Venus.