Almanac Note

Astronomy Engine: The Calculations Behind LuNAC

A moon calendar connects an astronomical event to a moment in everyday life. Behind each entry are questions: What defines the event? How is its timing calculated? Where does that calculation come from?

For LuNAC, that foundation is Astronomy Engine.

Astronomy Engine is an open-source software library that calculates the positions of the Sun, Moon, and planets. It also provides methods for finding events such as lunar phases, eclipses, equinoxes, and solstices. Its source code and documentation are publicly available, allowing developers to examine how its calculations work. Astronomy Engine project overview

LuNAC builds on this foundation to organize astronomical results into a calendar, with explicit requirements for recording their source, timing, and calculation context.

From a position to an event

Calculating where something is and finding when something happens are connected tasks.

A lunar phase provides a useful example. Astronomy Engine defines the principal phases through the difference between the Moon’s and Sun’s ecliptic longitudes, measured from Earth’s center. These are angular positions referenced to the plane of Earth’s orbit. Full moon corresponds to a longitude difference of 180 degrees. Astronomy Engine: MoonPhase

To find a full moon’s timing, the software searches for when that defined relationship occurs. Astronomy Engine provides a phase-search function that accepts a target angle and a window of time, then returns the calculated event time if it finds one within that window. Astronomy Engine: SearchMoonPhase

That gives a calendar entry a specific meaning: a calculated moment when a defined astronomical condition is met.

What supports the calculations

Astronomy Engine’s documentation describes its use of established astronomical models, including a shortened form of the VSOP87 series for planetary calculations. The project reports testing its results against the United States Naval Observatory’s NOVAS software, NASA JPL’s Horizons system, and other reference calculations. Astronomy Engine: technical background and testing

These comparisons help assess how closely its calculations agree with independent references. They also make accuracy something that can be discussed and tested. A useful astronomical result has a defined method and an understood level of precision.

Time and place give a result context

Some calculations describe a relationship as seen from Earth’s center. Others describe the sky from a particular place on Earth.

Moonrise, for example, requires an observer’s location. Astronomy Engine represents that location using latitude, longitude, and elevation, and includes it in rise-and-set calculations. Astronomy Engine: Observer, SearchRiseSet

LuNAC’s specification requires this observer context to be recorded. It also requires authoritative event times to be stored in Coordinated Universal Time, or UTC. Converting a time for local display preserves the underlying instant, even when the local calendar date changes.

For someone reading a lunar almanac, this distinction matters. An event’s time, its date on your calendar, and its relationship to your location each contribute to understanding it.

What LuNAC adds

Astronomy Engine supplies astronomical calculations. LuNAC’s role is to carry those results into a usable calendar while preserving the information needed to explain them.

LuNAC’s data standard requires provenance: a record of where a result came from. That includes the engine and its version, the calculation method, the time standard, the observer context, and when the result was generated. It also requires declared precision and, where applicable, timing tolerance.

The standard requires validation before astronomical data is accepted. Missing provenance or failed verification must stop the affected data from moving forward. These requirements give the calendar a basis for checking its entries and tracing them back to their calculations.

An open-source foundation

Astronomy Engine is the work of Don Cross and is distributed under the MIT license. LuNAC builds on that work as part of its computational foundation. Astronomy Engine license and attribution

For readers who want to explore further, the project’s documentation offers a direct path from the events named in an almanac to the methods used to calculate them.