1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
// SPDX-License-Identifier: AGPL-3.0-or-later
// Copyright (C) 2026 Vallés Puig, Ramon
//! # Unified Altitude Computation & Event API
//!
//! A clean, user‑friendly API for computing target altitude vs time and
//! finding events (crossings, culminations, altitude ranges) for **any**
//! celestial target.
//!
//! ## Module Structure
//!
//! - [`types`] — Core type definitions (events, queries, periods)
//! - [`search`] — Search options and configuration constants
//! - [`compute`] — Low-level altitude computation functions
//! - [`events`] — Event finding (crossings, culminations, ranges)
//! - [`provider`] — Trait-based dispatch for bodies
//!
//! ## Public Functions
//!
//! | Function | Purpose |
//! |----------|---------|
//! | [`crossings`] | Threshold crossings in a time window |
//! | [`culminations`] | All local maxima/minima of altitude |
//! | [`altitude_ranges`] | Intervals where altitude is within `[h_min, h_max]` |
//! | [`above_threshold`] | Intervals where altitude is above threshold |
//! | [`below_threshold`] | Intervals where altitude is below threshold |
//!
//! All inputs/outputs are typed with `qtty` (`Degrees`, `JulianDate`, etc.).
//!
//! ## Time Scale
//!
//! `ModifiedJulianDate` / `Period<MJD>` values in this API are interpreted on
//! the TT axis (`tempoch` canonical JD(TT) semantics). If your inputs are UTC
//! timestamps, convert them with `ModifiedJulianDate::from_utc(...)` first.
//!
//! ## Trait-Based API
//!
//! The [`AltitudePeriodsProvider`] trait provides a unified interface for
//! computing altitude periods of any celestial body. Implementations exist
//! for [`Sun`](crate::bodies::solar_system::Sun),
//! [`Moon`](crate::bodies::solar_system::Moon),
//! [`Star`](crate::bodies::Star), and
//! [`direction::ICRS`](crate::coordinates::spherical::direction::ICRS).
//!
//! All event-finding functions are generic over `AltitudePeriodsProvider`,
//! so you can pass any supported body directly.
//!
//! ## Example
//!
//! ```rust
//! use siderust::calculus::altitude::{crossings, AltitudePeriodsProvider, SearchOpts};
//! use siderust::bodies::Sun;
//! use siderust::coordinates::centers::Geodetic;
//! use siderust::coordinates::frames::ECEF;
//! use siderust::time::{ModifiedJulianDate, Period};
//! use qtty::*;
//!
//! let site = Geodetic::<ECEF>::new(Degrees::new(0.0), Degrees::new(51.48), Meters::new(0.0));
//! let window = Period::new(ModifiedJulianDate::new(60000.0), ModifiedJulianDate::new(60001.0));
//!
//! // Pass any body that implements AltitudePeriodsProvider
//! let events = crossings(&Sun, &site, window, Degrees::new(0.0), SearchOpts::default());
//!
//! // Or use the trait methods directly
//! let alt_rad = Sun.altitude_at(&site, siderust::time::ModifiedJulianDate::new(60000.0));
//! ```
// ---------------------------------------------------------------------------
// Submodules
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// Re-exports: Types
// ---------------------------------------------------------------------------
pub use ;
// ---------------------------------------------------------------------------
// Re-exports: Search Options
// ---------------------------------------------------------------------------
pub use SearchOpts;
// ---------------------------------------------------------------------------
// Re-exports: Core Computation
// ---------------------------------------------------------------------------
// fixed_star_altitude_rad moved to stellar module
// ---------------------------------------------------------------------------
// Re-exports: Event Finding
// ---------------------------------------------------------------------------
pub use ;
// ---------------------------------------------------------------------------
// Re-exports: Trait & Provider Functions
// ---------------------------------------------------------------------------
pub use ;