Module astronomy

Source
Expand description

This file contains important structs and functions relating to location, time, and astronomy; these are intended for calender calculations and based off Calendrical Calculations by Reingold & Dershowitz.

TODO(#3709): Address inconcistencies with existing ICU code for extreme dates.

Structs§

Astronomical
The Astronomical struct provides functions which support astronomical calculations used by many observational calendars.
Location
A Location on the Earth given as a latitude, longitude, elevation, and standard time zone. Latitude is given in degrees from -90 to 90, longitude in degrees from -180 to 180, elevation in meters, and zone as a UTC offset in fractional days (ex. UTC+1 would have zone = 1.0 / 24.0)

Constants§

J2000
The Moment of noon on January 1, 2000
MAX_UTC_OFFSET
The maximum allowable UTC offset (+14 hours) in fractional days (14.0 / 24.0 days)
MEAN_SYNODIC_MONTH
The mean synodic month in days of 86400 atomic seconds (86400 seconds = 24 hours * 60 minutes/hour * 60 seconds/minute)
MEAN_TROPICAL_YEAR
The mean tropical year in days
MECCA
The location of Mecca; used for Islamic calendar calculations.
MIN_UTC_OFFSET
The minimum allowable UTC offset (-12 hours) in fractional days (-0.5 days)
NEW_MOON_ZERO
The moment of the first new moon of the CE, which occurred on January 11, 1 CE.
WINTER
The angle of winter for the purposes of solar calculations

Functions§

div_euclid_f64 🔒