CelestialCalendar 1.0.0 · unreleased development @ 67a7c4c79a4a4a6aa7e703c9e6f0039ae34bee82
Loading...
Searching...
No Matches
astro::illumination Namespace Reference

Namespaces

namespace  detail

Classes

struct  Geometry
 Observer-facing illumination geometry for a target body. More...

Functions

auto fraction (const toolbox::AngleDeg &phase_angle) -> double
 Calculate the illuminated disk fraction from the target-centered phase angle.
auto geometry (const toolbox::SphericalCoordinate &source_pos, const toolbox::SphericalCoordinate &target_pos) -> Geometry
 Calculate the angular separation, target-centered phase angle, and illuminated fraction.

Function Documentation

◆ fraction()

auto astro::illumination::fraction ( const toolbox::AngleDeg & phase_angle) ->double
inlinenodiscard

Calculate the illuminated disk fraction from the target-centered phase angle.

Parameters
phase_angleThe angle between source and observer as seen from the target.
Returns
Illuminated fraction in [0, 1] for a finite phase angle.
See also
Jean Meeus, "Astronomical Algorithms", Second Edition, Formulas (41.1) and (48.1).

◆ geometry()

auto astro::illumination::geometry ( const toolbox::SphericalCoordinate & source_pos,
const toolbox::SphericalCoordinate & target_pos )->Geometry
inlinenodiscard

Calculate the angular separation, target-centered phase angle, and illuminated fraction.

Parameters
source_posThe illuminating body's observer-centered spherical position.
target_posThe target body's position in the same spherical frame as source_pos.
Returns
The target's observer-facing illumination geometry.
Note
Distances must share one unit; the library's spherical coordinates carry AU.
Meeus prints these equations for the Moon; the distance-triangle identities are target-neutral, with the planetary analogues discussed in Chapter 41. His ecliptic form beneath (48.2) omits the Sun's latitude; the full spherical separation here keeps both latitudes.
See also
Jean Meeus, "Astronomical Algorithms", Second Edition, (48.1)-(48.3).