![]() |
siderust-cpp 0.8.0
Header-only C++ wrapper for siderust
|
Lunar phase geometry, phase events, and illumination periods. More...
#include "altitude.hpp"#include "coordinates.hpp"#include "ffi_core.hpp"#include "time.hpp"#include <ostream>#include <vector>

Go to the source code of this file.
Classes | |
| struct | siderust::MoonPhaseGeometry |
| Geometric description of the Moon's phase at a point in time. More... | |
| struct | siderust::PhaseEvent |
| A principal lunar phase event (new moon, first quarter, etc.). More... | |
Namespaces | |
| namespace | siderust |
| namespace | siderust::detail |
| namespace | siderust::moon |
Enumerations | |
| enum class | siderust::PhaseKind : int32_t { siderust::NewMoon = 0 , siderust::FirstQuarter = 1 , siderust::FullMoon = 2 , siderust::LastQuarter = 3 } |
| Principal lunar phase kinds (new-moon quarter events). More... | |
| enum class | siderust::MoonPhaseLabel : int32_t { siderust::NewMoon = 0 , siderust::WaxingCrescent = 1 , siderust::FirstQuarter = 2 , siderust::WaxingGibbous = 3 , siderust::FullMoon = 4 , siderust::WaningGibbous = 5 , siderust::LastQuarter = 6 , siderust::WaningCrescent = 7 } |
| Descriptive moon phase labels (8 canonical phases). More... | |
Functions | |
| std::vector< PhaseEvent > | siderust::detail::phase_events_from_c (siderust_phase_event_t *ptr, uintptr_t count) |
| std::vector< Period< TT, MJD > > | siderust::detail::illum_periods_from_c (tempoch_period_mjd_t *ptr, uintptr_t count) |
| MoonPhaseGeometry | siderust::moon::phase_geocentric (const Time< TT, JD > &jd) |
| Compute geocentric Moon phase geometry at a Julian Date. | |
| MoonPhaseGeometry | siderust::moon::phase_topocentric (const Time< TT, JD > &jd, const Geodetic &site) |
| Compute topocentric Moon phase geometry at a Julian Date. | |
| MoonPhaseLabel | siderust::moon::phase_label (const MoonPhaseGeometry &geom) |
| Determine the descriptive phase label for a given geometry. | |
| std::vector< PhaseEvent > | siderust::moon::find_phase_events (const Period< TT, MJD > &window, const SearchOptions &opts={}) |
| Find principal phase events (new moon, quarters, full moon) in a window. | |
| std::vector< Period< TT, MJD > > | siderust::moon::illumination_above (const Period< TT, MJD > &window, double k_min, const SearchOptions &opts={}) |
| Find periods when illuminated fraction is ≥ k_min. | |
| std::vector< Period< TT, MJD > > | siderust::moon::illumination_below (const Period< TT, MJD > &window, double k_max, const SearchOptions &opts={}) |
| Find periods when illuminated fraction is ≤ k_max. | |
| std::vector< Period< TT, MJD > > | siderust::moon::illumination_range (const Period< TT, MJD > &window, double k_min, double k_max, const SearchOptions &opts={}) |
| Find periods when illuminated fraction is within [k_min, k_max]. | |
| double | siderust::illuminated_percent (const MoonPhaseGeometry &geom) |
| Get the illuminated fraction as a percentage [0, 100]. | |
| bool | siderust::is_waxing (MoonPhaseLabel label) |
| Check if a phase label describes a waxing moon. | |
| bool | siderust::is_waning (MoonPhaseLabel label) |
| Check if a phase label describes a waning moon. | |
| std::ostream & | siderust::operator<< (std::ostream &os, PhaseKind kind) |
| Stream operator for PhaseKind. | |
| std::ostream & | siderust::operator<< (std::ostream &os, MoonPhaseLabel label) |
| Stream operator for MoonPhaseLabel. | |
Lunar phase geometry, phase events, and illumination periods.
Wraps siderust-ffi's lunar phase API with exception-safe C++ types and RAII-managed output arrays.
All phase-geometry functions accept a Julian Date (siderust::Time<TT, JD>). Search windows use the regular Time<TT, MJD>-based siderust::Period<TT, MJD>.
Definition in file lunar_phase.hpp.