CelestialCalendar 1.0.0 · unreleased development @ 67a7c4c79a4a4a6aa7e703c9e6f0039ae34bee82
Loading...
Searching...
No Matches
ephemeris_events.hpp File Reference

Interval longitude events using the ephemeris models and fixed-grid search. More...

#include <algorithm>
#include <cfenv>
#include <cfloat>
#include <cmath>
#include <concepts>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <format>
#include <limits>
#include <optional>
#include <ranges>
#include <span>
#include <stdexcept>
#include <tuple>
#include <type_traits>
#include <vector>
#include "ephemeris.hpp"
#include "ephemeris_event_facts.hpp"
#include "ephemeris_event_bounds.hpp"
#include "event_search.hpp"

Classes

struct  astro::ephemeris::LongitudeEvent
 A crossing or exact numerical contact at a supplied longitude. More...
struct  astro::ephemeris::StationEvent
 A stationary instant of the published finite-difference rate, with its two-sided motion. More...
struct  astro::ephemeris::LongitudeDifferenceEvent
 An event in the directed, canonical longitude difference first minus second. More...

Namespaces

namespace  astro
namespace  astro::ephemeris
namespace  astro::ephemeris::detail

Enumerations

enum class  astro::ephemeris::EventDirection : uint8_t { astro::ephemeris::INCREASING , astro::ephemeris::DECREASING , astro::ephemeris::TANGENT }
 Behavior of an angular level on the two sides of an event. More...
enum class  astro::ephemeris::Motion : uint8_t { astro::ephemeris::DIRECT , astro::ephemeris::RETROGRADE }
 The sign of longitude motion away from a stationary instant. More...

Functions

auto astro::ephemeris::detail::event_longitude (const Target target, const double jde_tt) -> toolbox::AngleDeg
 Evaluate the actual target longitude; descending-node rates alone use the ascending trajectory.
auto astro::ephemeris::detail::constant_longitude_difference (const Target first, const Target second) -> std::optional< toolbox::AngleDeg >
 Recognize constant real-model first-minus-second relations by target identity, not sampled positions.
auto astro::ephemeris::detail::event_rate_center (const Target target, const double jde_tt) -> double
 Choose a query-independent legal rate center for a time in the closed rate domain.
template<typename Provider>
requires std::invocable<const Provider&, double> and std::same_as<std::invoke_result_t<const Provider&, double>, astro::detail::event_search::Value>
auto astro::ephemeris::detail::event_rate_value (const Provider &provider, const Target target, const double jde_tt, const double first_derivative) -> astro::detail::event_search::Value
 Evaluate a rate at a legal center and charge its displacement from the requested TT time.
auto astro::ephemeris::detail::validate_event_environment () -> void
 Reject execution environments outside the source-model error contract before evaluating a provider.
auto astro::ephemeris::detail::event_grid (const Target first, const std::optional< Target > second, const astro::detail::event_search::Interval query) -> astro::detail::event_search::Grid
 Validate a nonempty query against the published rate domains, then form its absolute cell grid.
auto astro::ephemeris::detail::event_bounds (const Target target, const astro::detail::event_search::Interval cell) -> EventBounds
 Select a fixed analysis band by the entire canonical cell and sample halo, never by query endpoints.
auto astro::ephemeris::detail::has_no_station (const EventBounds bounds) -> bool
 Recognize a globally certified nonzero rate without scanning its sign.
auto astro::ephemeris::detail::event_position_value (const Target target, const double jde_tt, const EventBounds bounds) -> astro::detail::event_search::LongitudeValue
 Observe the source longitude with its selected fixed-band evaluation allowance.
auto astro::ephemeris::detail::event_rate_observation (const Target target, const double jde_tt, const EventBounds bounds) -> astro::detail::event_search::Value
 Evaluate the seven-point rate at a center allowed by its domain, bounding any time displacement.
auto astro::ephemeris::detail::subtract_event_rates (const astro::detail::event_search::Value first, const astro::detail::event_search::Value second) -> astro::detail::event_search::Value
 Subtract independent scalar observations with a conservative binary64 subtraction allowance.
auto astro::ephemeris::detail::difference_bounds (const EventBounds first, const EventBounds second) -> astro::detail::event_search::TrajectoryBounds
 Sum absolute derivative bounds for a directed difference, without subtracting independent uncertainties.
auto astro::ephemeris::detail::event_direction (const astro::detail::event_search::ContactDirection direction) -> EventDirection
 Translate the private search classification without coupling the kernel to public result types.
auto astro::ephemeris::detail::search_longitudes (const Target first, const std::optional< Target > second, const toolbox::AngleDeg target, const astro::detail::event_search::Grid grid, const astro::detail::event_search::Interval query) -> std::vector< astro::detail::event_search::LongitudeRoot >
 Search whole absolute cells; station refinement uses the cell's allowances, contact regions the window's.
auto astro::ephemeris::longitude_events (const Target target, const toolbox::AngleDeg target_longitude, const double start_jde_tt, const double end_jde_tt) -> std::vector< LongitudeEvent >
 Return every crossing or exact numerical contact at a supplied tropical longitude.
auto astro::ephemeris::stations (const Target target, const double start_jde_tt, const double end_jde_tt) -> std::vector< StationEvent >
 Return every isolated zero of ephemeris::longitude_rate in a half-open TT interval.
auto astro::ephemeris::longitude_difference_events (const Target first, const Target second, const toolbox::AngleDeg target_difference, const double start_jde_tt, const double end_jde_tt) -> std::vector< LongitudeDifferenceEvent >
 Return every event at a directed longitude difference, first minus second.

Variables

constexpr double astro::ephemeris::detail::EVENT_RATE_CENTER_QUANTUM_TT_DAYS
constexpr double astro::ephemeris::detail::EVENT_CELL_WIDTH_TT_DAYS
constexpr double astro::ephemeris::detail::EVENT_TIME_RESOLUTION_TT_DAYS
constexpr std::size_t astro::ephemeris::detail::EVENT_MAXIMUM_EVALUATIONS
constexpr std::size_t astro::ephemeris::detail::EVENT_MAXIMUM_CANDIDATES
constexpr double astro::ephemeris::detail::EVENT_CENTURY_START_JDE_TT
constexpr double astro::ephemeris::detail::EVENT_CENTURY_END_JDE_TT

Detailed Description

Interval longitude events using the ephemeris models and fixed-grid search.

See also
docs/EPHEMERIS_EVENTS.md for rate definitions, domains, numerical guarantees and terminology.