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
// SPDX-License-Identifier: AGPL-3.0-or-later
// Copyright (C) 2026 Vallés Puig, Ramon
//! Unified error type for the TLE mean-elements propagator.
use Error;
/// Errors produced while constructing or evaluating a [`TlePropagator`](crate::astro::sgp4::TlePropagator).
///
/// The variants split cleanly into three groups:
///
/// * **Initialisation** ([`InvalidElements`](Sgp4Error::InvalidElements),
/// [`InvalidEpoch`](Sgp4Error::InvalidEpoch)) — the TLE record is structurally
/// well-formed but its mean elements cannot be validated (e.g. eccentricity
/// outside `[0, 1)`, sub-orbital mean motion, malformed UTC epoch).
/// * **Propagation** ([`Propagation`](Sgp4Error::Propagation)) — propagation
/// diverged at the requested epoch (typical for very large `|Δt|` on
/// decayed objects or degenerate element sets).
/// * **Time conversion** ([`TimeConversion`](Sgp4Error::TimeConversion)) — the
/// target epoch supplied as a [`tempoch::JulianDate<tempoch::UTC>`] cannot be
/// represented as a calendar instant, e.g. it falls outside the leap-second
/// table covered by the active [`tempoch::TimeContext`].
///
/// # Examples
///
/// ```
/// use siderust::astro::sgp4::Sgp4Error;
/// let e = Sgp4Error::InvalidEpoch("year out of range");
/// assert!(matches!(e, Sgp4Error::InvalidEpoch(_)));
/// assert!(e.to_string().contains("epoch"));
/// ```