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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
//! # Ephemerust
//!
//! An accessible, **teaching-grade** astronomy, orbital-mechanics, and satellite-tracking
//! library for Rust — in spirit, the Rust counterpart to Python's
//! [Skyfield](https://rhodesmill.org/skyfield/). It deliberately occupies the middle ground
//! between raw numerical engines (such as the [`sgp4`](https://crates.io/crates/sgp4) crate)
//! and ultra-high-fidelity mission toolkits (such as `nyx-space`): it wraps the messy parts —
//! time systems, coordinate-frame conversions, and planetary theory — behind an ergonomic,
//! thoroughly documented API.
//!
//! ## Design philosophy
//!
//! - **Don't reinvent the wheel.** Heavy numerical work is delegated to established crates
//! (the `sgp4` propagator, `chrono` for time); Ephemerust supplies the conversion and
//! convenience layer around them.
//! - **Document the physics, not just the code.** Each public item explains the physical
//! reasoning and the conventions (frames, units, epochs) it assumes.
//! - **Errors are teaching moments.** Failures explain *what* was expected and *why*, so the
//! library is instructive even when input is wrong (see [`TleError`]).
//!
//! ## Module map
//!
//! | Module | Responsibility |
//! |--------|----------------|
//! | [`time`] | Julian Date, Greenwich/Local sidereal time |
//! | [`coordinates`] | RA/Dec ↔ Alt/Az, ECEF ↔ ECI, and WGS84 ECEF ↔ geodetic |
//! | [`celestial`] | Sun/Moon position and rise/set; dispatch to planets |
//! | [`orbital`] | Kepler's equation, orbital period, elements → state vectors |
//! | [`planets`] | VSOP87 planetary ephemeris |
//! | [`satellite`] | TLE / SGP4 propagation, TEME → ECEF → geodetic, look angles, passes, ground track |
//! | [`sgp4_teaching`] | Educational two-body / Kepler scaffolding vs the real `sgp4` model (`docs/sgp4.md`) |
//!
//! ## Conventions
//!
//! Angles are in degrees and times in UTC unless a function states otherwise; right ascension
//! and sidereal time are in hours; distances follow each module's stated unit (kilometres for
//! orbital/satellite state, metres for ECEF/ECI). No precession or nutation is applied, which
//! bounds accuracy at roughly the arcminute level — see `docs/accuracy-and-limits.md`.
//!
//! ## API stability, MSRV, and Cargo features
//!
//! The project is in the **`0.x`** semver range: minor releases may include breaking API
//! changes (see [`CHANGELOG.md`](https://github.com/IsomorphicAlgo/ephemerust/blob/master/CHANGELOG.md)).
//! The **minimum supported Rust version (MSRV)** is declared in the crate `Cargo.toml`
//! (`package.rust-version`) and summarized in the top-level readme.
//!
//! Optional Cargo features:
//!
//! | Feature | Purpose |
//! |---------|---------|
//! | *(none by default)* | Default build: no HTTP client dependencies. |
//! | `network` | Exposes the `track` CLI flag `--tle-url` for future CelesTrak/Space-Track-style
//! fetch; the handler is still a stub (“not implemented”) until wired in a later release. |
//!
//! ## Example
//!
//! Compute the Julian Date and Greenwich Mean Sidereal Time of the J2000.0 epoch:
//!
//! ```
//! use chrono::{TimeZone, Utc};
//! use ephemerust::{julian_date, greenwich_mean_sidereal_time};
//!
//! // J2000.0 is defined as 2000-01-01 12:00:00 UTC.
//! let epoch = Utc.with_ymd_and_hms(2000, 1, 1, 12, 0, 0).unwrap();
//! let jd = julian_date(epoch);
//! assert!((jd - 2451545.0).abs() < 1e-6);
//!
//! // GMST is the Earth's rotation angle expressed in hours of right ascension.
//! let gmst = greenwich_mean_sidereal_time(jd);
//! assert!((0.0..24.0).contains(&gmst));
//! ```
// Core modules
/// **Educational** SGP4-related mechanics (two-body skeleton vs production `sgp4`).
///
/// This is **not** used by [`satellite::propagate`]; it exists for learning and regression
/// checks documented in `docs/sgp4.md`.
/// Error handling: the crate-wide [`error::AstroError`] type and [`error::Result`] alias.
// Re-export commonly used types and functions for convenience
pub use ;
// Re-export coordinate types and WGS84 geodetic helpers
pub use ;
// Re-export celestial object types
pub use ;
// Re-export planet types
pub use ;
// Re-export satellite types and propagation / ground-point pipeline
pub use ;
// Re-export time functions
pub use ;