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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
// SPDX-License-Identifier: AGPL-3.0-or-later
// Copyright (C) 2026 Vallés Puig, Ramon
//! Strongly typed TLE propagator prediction state.
//!
//! [`TemeState`] bundles the position and velocity returned by a single
//! [`TlePropagator::propagate_at`](crate::astro::sgp4::TlePropagator::propagate_at) call,
//! together with the UTC instant the prediction is valid for.
//!
//! The state lives in the **TEME** (True Equator, Mean Equinox) frame defined
//! by `affn::frames::TEME`, geocentric, with positions in
//! [`qtty::length::Kilometer`] and velocities in [`KilometerPerSecond`].
//! Downstream conversion to ITRF / GCRF / ECEF is provided by
//! `siderust::coordinates::transform::providers::frames_teme` once Earth
//! Orientation Parameters are supplied.
use crate;
use Kilometer;
use Second;
use Per;
use ;
/// Velocity unit alias used by the SGP4 propagator: kilometres per second.
///
/// SGP4 publishes velocities in km·s⁻¹; we expose them as a typed
/// [`qtty::Per<Kilometer, Second>`] so users cannot accidentally
/// mix them with m·s⁻¹ values from other parts of the stack.
///
/// # Examples
///
/// ```
/// use siderust::astro::sgp4::KilometerPerSecond;
/// use qtty::Quantity;
/// let v: Quantity<KilometerPerSecond> = Quantity::new(7.5);
/// assert!((v.value() - 7.5).abs() < 1e-12);
/// ```
pub type KilometerPerSecond = ;
/// Geocentric **TEME** Cartesian position with kilometre units.
///
/// Re-export of [`crate::coordinates::cartesian::position::TEME`] specialised
/// to [`qtty::length::Kilometer`].
pub type TemePositionKm = TEME;
/// **TEME** Cartesian velocity with km·s⁻¹ units.
pub type TemeVelocityKmPerSec = TEME;
/// SGP4 prediction at a single epoch in the **TEME** frame.
///
/// Construction is performed by the propagator; this struct only exposes
/// typed accessors. The fields are public-but-stable — adding new components
/// (e.g. covariance) would be a breaking change requiring a new type.
///
/// # Examples
///
/// ```
/// use siderust::astro::sgp4::{TlePropagator, TemeState};
/// use siderust::formats::tle::parse_3le;
/// use siderust::qtty::Minutes;
///
/// let tle = parse_3le(
/// "ISS (ZARYA)",
/// "1 25544U 98067A 08264.51782528 -.00002182 00000-0 -11606-4 0 2927",
/// "2 25544 51.6416 247.4627 0006703 130.5360 325.0288 15.72125391563537",
/// ).unwrap();
/// let prop = TlePropagator::from_tle(&tle).unwrap();
/// let state: TemeState = prop.propagate_minutes(Minutes::new(0.0)).unwrap();
/// // Magnitudes are in kilometres and km/s for an LEO.
/// let r = state.position().as_array();
/// assert!(r[0].value().abs() < 8_000.0);
/// ```