Skip to main content

Module sun

Module sun 

Source
Expand description

Solar position and twilight times.

Provenance: written fresh from Meeus, Astronomical Algorithms 2nd ed., ch. 25 (“low accuracy” apparent Sun — mean longitude, three-term equation of centre, aberration and Ω-nutation corrections), accurate to ~0.01° (36″), inside the crate’s 1′ contract. Twilight solves the Sun’s altitude crossings with the moving-body iteration of the analytic solver. UTC is used where Meeus specifies dynamical time — ΔT ≈ 70 s shifts the solar longitude by ~3″, i.e. twilight instants by ~3 s.

Enums§

Twilight
A twilight definition: how far below the geometric horizon the Sun must sit for the sky to count as dark.
TwilightOutcome
Outcome of a twilight query for one night.

Functions§

sun_position
Apparent geocentric solar position (equatorial, epoch of date). Feeds twilight and crate::moon_phase_angle internally.
twilight
Dusk and dawn instants for the night whose solar lower culmination is nearest night_of, at the darkness level kind.