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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (C) 2026 Vallés Puig, Ramon
//! Typed unit aliases and physical constants for spacecraft astrodynamics.
//!
//! This module provides the unit aliases and semantic coefficient newtypes that the
//! `siderust::astro::dynamics` redesign requires. They live in `qtty` rather than
//! `siderust` because they are pure quantity/unit definitions with no observational
//! or ephemeris semantics.
//!
//! ## Unit aliases
//!
//! | Alias | Expansion | Typical use |
//! |-------|-----------|-------------|
//! | [`KmPerSecond`] | `Per<Kilometer, Second>` | Orbital velocity |
//! | [`KmPerSecondSquared`] | `Per<Per<Kilometer, Second>, Second>` | Acceleration in km/s² |
//! | [`InverseSecond`] | `Per<Ratio, Second>` | Decay/rate, inverse-time quantities |
//! | [`AreaToMassUnit`] | `Per<SquareMeter, Kilogram>` | Ballistic coefficient area/mass |
//! | [`GravitationalParameter`] | `Quantity<Per<CubicKilometer, Prod<Second, Second>>>` | μ = G·M |
//!
//! ## Gravitational parameter constants
//!
//! | Constant | Value (km³/s²) | Reference |
//! |----------|----------------|-----------|
//! | [`GM_EARTH`] | 398 600.441 8 | EGM2008 / WGS-84 |
//! | [`GM_SUN`] | 1.327 124 400 18 × 10¹¹ | IAU 2012 |
//! | [`GM_MOON`] | 4.902 800 066 × 10³ | DE430 |
//! | [`GM_MERCURY`] | 2.203 187 832 8 × 10⁴ | DE430 |
//! | [`GM_VENUS`] | 3.248 585 920 0 × 10⁵ | DE430 |
//! | [`GM_MARS`] | 4.282 837 581 6 × 10⁴ | DE430 |
//! | [`GM_JUPITER`] | 1.267 127 648 0 × 10⁸ | DE430 |
//! | [`GM_SATURN`] | 3.794 058 520 0 × 10⁷ | DE430 |
//! | [`GM_URANUS`] | 5.794 548 600 0 × 10⁶ | DE430 |
//! | [`GM_NEPTUNE`] | 6.836 527 100 5 × 10⁶ | DE430 |
//! | [`GM_PLUTO`] | 9.770 × 10² | DE430 |
//!
//! ## Semantic coefficient newtypes
//!
//! [`DragCoefficient`], [`SrpCoefficient`], [`J2Coefficient`], and
//! [`StokesCoefficient`] are thin wrappers around a bare `f64` that prevent
//! accidental mixing of aerodynamic, solar-radiation-pressure, gravitational
//! zonal, and tesseral/sectorial harmonic coefficients in force-model APIs.
use ;
use Ratio;
use Kilometer;
use Kilogram;
use Second;
use CubicKilometer;
use ;
// ─────────────────────────────────────────────────────────────────────────────
// Unit type aliases
// ─────────────────────────────────────────────────────────────────────────────
/// Unit marker for kilometre per second (km/s).
///
/// Canonical orbital-velocity unit used throughout astrodynamics.
pub type KmPerSecond = ;
/// Quantity alias: a velocity in km/s.
pub type KmPerSeconds = ;
/// Unit marker for kilometre per second squared (km/s²).
///
/// Astrodynamics acceleration unit: `(km/s) / s`.
pub type KmPerSecondSquared = ;
/// Quantity alias: an acceleration in km/s².
pub type KmPerSecondsSquared = ;
/// Unit marker for km²/s — specific angular momentum.
pub type KmSquaredPerSecond = ;
/// Quantity alias: specific angular momentum in km²/s.
pub type SpecificAngularMomentum = ;
/// Unit marker for km²/s² — specific orbital energy.
pub type KmSquaredPerSecondSquared = ;
/// Quantity alias: specific orbital energy in km²/s².
pub type SpecificOrbitalEnergy = ;
/// Unit marker for inverse-second (1/s).
///
/// Represents a rate or decay constant. The numerator uses [`Ratio`] as the
/// dimensionless "one" unit, giving the dimension `Dimensionless / Time`.
pub type InverseSecond = ;
/// Quantity alias: a rate or decay constant in 1/s.
pub type InverseSeconds = ;
/// Unit marker for area-to-mass ratio (m²/kg).
///
/// Used as the effective cross-sectional area per unit mass in drag and SRP
/// force models.
pub type AreaToMassUnit = ;
/// Quantity alias: an area-to-mass ratio in m²/kg.
pub type AreaToMass = ;
// ─────────────────────────────────────────────────────────────────────────────
// Gravitational parameter
// ─────────────────────────────────────────────────────────────────────────────
/// Unit marker for the standard gravitational parameter μ = G·M (km³/s²).
///
/// EGM2008 uses this convention: `μ_Earth ≈ 398 600.441 8 km³/s²`.
/// The unit is `CubicKilometer / (Second * Second)`.
pub type GravitationalParameterUnit = ;
/// Typed standard gravitational parameter: km³/s².
///
/// Used for G·M of Earth, Sun, Moon, and any other body expressed in the
/// conventional astrodynamics unit.
pub type GravitationalParameter = ;
/// Earth standard gravitational parameter (EGM2008 / WGS-84).
///
/// μ_⊕ = 398 600.441 8 km³/s²
pub const GM_EARTH: GravitationalParameter = new;
/// Sun standard gravitational parameter (IAU 2012 system).
///
/// μ_☉ = 1.327 124 400 18 × 10¹¹ km³/s²
pub const GM_SUN: GravitationalParameter = new;
/// Moon standard gravitational parameter (DE430 value).
///
/// μ_☾ = 4.902 800 066 × 10³ km³/s²
pub const GM_MOON: GravitationalParameter = new;
/// Mercury standard gravitational parameter (DE430 value).
///
/// μ = 2.203 187 832 8 × 10⁴ km³/s²
pub const GM_MERCURY: GravitationalParameter = new;
/// Venus standard gravitational parameter (DE430 value).
///
/// μ = 3.248 585 920 0 × 10⁵ km³/s²
pub const GM_VENUS: GravitationalParameter = new;
/// Mars system standard gravitational parameter (DE430 value, Mars + Phobos + Deimos).
///
/// μ = 4.282 837 581 6 × 10⁴ km³/s²
pub const GM_MARS: GravitationalParameter = new;
/// Jupiter system standard gravitational parameter (DE430 value, Jupiter + all moons).
///
/// μ = 1.267 127 648 0 × 10⁸ km³/s²
pub const GM_JUPITER: GravitationalParameter = new;
/// Saturn system standard gravitational parameter (DE430 value, Saturn + all moons).
///
/// μ = 3.794 058 520 0 × 10⁷ km³/s²
pub const GM_SATURN: GravitationalParameter = new;
/// Uranus system standard gravitational parameter (DE430 value, Uranus + all moons).
///
/// μ = 5.794 548 600 0 × 10⁶ km³/s²
pub const GM_URANUS: GravitationalParameter = new;
/// Neptune system standard gravitational parameter (DE430 value, Neptune + all moons).
///
/// μ = 6.836 527 100 5 × 10⁶ km³/s²
pub const GM_NEPTUNE: GravitationalParameter = new;
/// Pluto system standard gravitational parameter (DE430 value, Pluto + Charon).
///
/// μ = 9.770 × 10² km³/s²
pub const GM_PLUTO: GravitationalParameter = new;
/// Speed of light in vacuum (km/s).
///
/// c = 299 792.458 km/s (exact by SI definition).
pub const SPEED_OF_LIGHT_KM_S: KmPerSeconds = new;
// ─────────────────────────────────────────────────────────────────────────────
// Semantic dimensionless coefficient newtypes
// ─────────────────────────────────────────────────────────────────────────────
/// Aerodynamic drag coefficient C_D (dimensionless).
///
/// Physically represents the ratio of drag force to the product of dynamic
/// pressure and reference area. Typical values: 2.0–2.4 for flat plates in
/// free-molecular flow.
;
/// Solar radiation pressure coefficient C_R (dimensionless).
///
/// Scales the ideal-reflector SRP force. A perfectly absorbing surface has
/// C_R = 1.0; a perfect specular mirror has C_R = 2.0.
;
/// Gravitational zonal harmonic J₂ coefficient (dimensionless).
///
/// The dominant oblateness term in the geopotential expansion.
/// For Earth: J₂ ≈ 1.082 635 9 × 10⁻³ (EGM2008).
;
/// Stokes (spherical-harmonic) geopotential coefficient C_nm or S_nm (dimensionless).
///
/// Stores a single fully-normalised Stokes coefficient as used in the EGM2008
/// and similar gravity-field models.
;
// ─────────────────────────────────────────────────────────────────────────────
// Tests
// ─────────────────────────────────────────────────────────────────────────────