|
CelestialCalendar 1.0.0 · unreleased development @ 67a7c4c79a4a4a6aa7e703c9e6f0039ae34bee82
|
Solar conventions and entry points: standard altitudes, twilight constants, and the transit-centered API wired to the Sun's ephemeris. More...
Functions | |
| auto | h0_from (const astro::earth::refraction::Params &p={}) -> toolbox::AngleDeg |
| Convert atmospheric conditions to the sunrise/sunset altitude convention. | |
| auto | transit_jde (const std::chrono::year_month_day &ymd_ut1, const GeoLocation &location) -> double |
| Compute the instant of the Sun's upper culmination (solar transit / solar noon) on a date. | |
| auto | rise_set_jde (const double transit_jde_tt, const bool is_rise, const GeoLocation &location, const toolbox::AngleDeg &h0=STANDARD_ALTITUDE) -> std::optional< double > |
| Compute the instant at which the Sun crosses altitude h₀, before (sunrise) or after (sunset) a given transit. | |
| auto | calculate (const std::chrono::year_month_day &ymd_ut1, const GeoLocation &location, const toolbox::AngleDeg &h0=STANDARD_ALTITUDE) -> Result |
| Compute sunrise, transit, and sunset for a date and location. | |
Variables | |
| constexpr auto | STANDARD_ALTITUDE |
| The standard altitude of the Sun's center at rise/set: -0°50' = -0.8333…°. | |
| constexpr toolbox::AngleDeg | CIVIL_TWILIGHT |
| The Sun's altitude at civil twilight: -6°. | |
| constexpr toolbox::AngleDeg | NAUTICAL_TWILIGHT |
| The Sun's altitude at nautical twilight: -12°. | |
| constexpr toolbox::AngleDeg | ASTRONOMICAL_TWILIGHT |
| The Sun's altitude at astronomical twilight: -18°. | |
| constexpr auto | provider |
| The Sun's position provider: apparent equatorial coordinates at one instant (TT). | |
Solar conventions and entry points: standard altitudes, twilight constants, and the transit-centered API wired to the Sun's ephemeris.
|
inlinenodiscard |
Compute sunrise, transit, and sunset for a date and location.
| ymd_ut1 | The date, interpreted on the UT1 scale (callers handle time zones). |
| location | The observer's location. |
| h0 | The event altitude. Defaults to STANDARD_ALTITUDE; pass a twilight constant to compute dawn/dusk instead. |
| std::invalid_argument | If ymd_ut1 is invalid, location is out of range, or h0 is not finite or outside [-90°, 90°], or a time conversion leaves its supported years. |
| std::runtime_error | For a transit or rise/set residual-guard failure. |
|
inlinenodiscard |
Convert atmospheric conditions to the sunrise/sunset altitude convention.
| p | The atmospheric refraction parameters. Defaults to 15°C/1013.25 hPa/Bennett. |
| std::invalid_argument | If p contains non-finite, non-positive pressure, or temperature at or below −273°C. For Model::SAEMUNDSSON, may throw std::runtime_error if the horizon iteration does not converge. |
|
inlinenodiscard |
Compute the instant at which the Sun crosses altitude h₀, before (sunrise) or after (sunset) a given transit.
| transit_jde_tt | The transit instant, as a julian ephemeris day on the TT scale (from transit_jde). |
| is_rise | True for the upward crossing before transit, false for the downward crossing after it. |
| location | The observer's location. |
| h0 | The crossing altitude. Defaults to STANDARD_ALTITUDE; pass a twilight constant for dawn/dusk instants. |
| std::invalid_argument | / std::runtime_error See the generic rise_set_jde. |
|
inlinenodiscard |
Compute the instant of the Sun's upper culmination (solar transit / solar noon) on a date.
| ymd_ut1 | The date, interpreted on the UT1 scale (not local civil time — callers handle time zones). The returned transit is the one nearest 12h local mean time on this date. |
| location | The observer's location. |
| std::invalid_argument | If ymd_ut1 is invalid, location is out of range, or a time conversion leaves its supported years. |
| std::runtime_error | If the transit solve fails its residual guard. |
|
inlineconstexpr |
The Sun's altitude at astronomical twilight: -18°.
|
inlineconstexpr |
The Sun's altitude at civil twilight: -6°.
|
inlineconstexpr |
The Sun's altitude at nautical twilight: -12°.
|
inlineconstexpr |
The Sun's position provider: apparent equatorial coordinates at one instant (TT).
|
inlineconstexpr |
The standard altitude of the Sun's center at rise/set: -0°50' = -0.8333…°.