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

Typedefs

using RootGenerator
 A generator for one principal phase, using its signed-fold numerical convention.

Enumerations

enum class  PhaseKind : uint8_t { NEW_MOON , FIRST_QUARTER , FULL_MOON , LAST_QUARTER }
 The four principal Moon phases. More...

Functions

auto target_angle_deg (const PhaseKind kind) -> double
 The target elongation for a given phase, in degrees.
auto moments (const int32_t year, const PhaseKind kind) -> std::vector< double >
 Calculate the moments of a given Moon phase in a Gregorian year.

Typedef Documentation

◆ RootGenerator

A generator for one principal phase, using its signed-fold numerical convention.

Enumeration Type Documentation

◆ PhaseKind

enum class astro::moon_phase::phase_moments::PhaseKind : uint8_t
strong

The four principal Moon phases.

Enumerator
NEW_MOON 
FIRST_QUARTER 
FULL_MOON 
LAST_QUARTER 

Function Documentation

◆ moments()

auto astro::moon_phase::phase_moments::moments ( const int32_t year,
const PhaseKind kind )->std::vector< double >
inlinenodiscard

Calculate the moments of a given Moon phase in a Gregorian year.

Parameters
yearThe Gregorian year, in [1, 32766].
kindThe phase kind.
Returns
The phase moments in the year, in JDE (TT-scale ephemeris time).
Exceptions
std::invalid_argumentif year is outside [1, 32766].
Note
The year runs from Jan 1 to Jan 1 in UTC; before 1972 the bounds degrade to UT1.
A phase exactly at Jan 1 UTC has no defined owner; rounding may retain or skip it (#127).

Positions: VSOP87D (Sun) and truncated ELP2000-82B (Moon), both apparent geocentric.

◆ target_angle_deg()

auto astro::moon_phase::phase_moments::target_angle_deg ( const PhaseKind kind) ->double
inlinenodiscard

The target elongation for a given phase, in degrees.