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
//! Typed physical constants used by recipes.
//!
//! Every constant returns a typed value rather than a bare `f64`, so a
//! call site that mixes them up gets a compile error rather than a
//! silent unit/identity mismatch at runtime. The dimensional safety
//! comes from two distinct mechanisms:
//!
//! - **`uom::Quantity` constants** (`r_eq_earth`, `omega_earth`, …) carry
//! their physical dimension as a `typenum`-encoded ISQ exponent tuple,
//! so `uom`'s dimensional analysis catches mixing a length with an
//! angular velocity at compile time.
//! - **[`GravParam<P>`] constants** (`mu_sun()`, `mu_ggm05c()`, …) are a
//! bespoke planet-phantom newtype — *not* a `uom::Quantity` — whose
//! safety guarantee is the `P: Planet` phantom, not `uom` dimension
//! tracking. `mu_sun()` returns `GravParam<Sun>`, `mu_ggm05c()` (Earth)
//! returns `GravParam<Earth>`, and so on, so a μ for the wrong central
//! body fails the type check at a planet-pinned consumer rather than
//! passing through silently. See [`astrodyn_quantities::dims::GravParam`]
//! for the witness-gated factory pattern that fixes the planet phantom.
//!
//! # Example
//!
//! ```
//! use astrodyn_quantities::prelude::*;
//! use astrodyn::recipes::constants::{mu_ggm05c, r_eq_earth};
//!
//! let mu = mu_ggm05c(); // GravParam<Earth>
//! let r = r_eq_earth();
//!
//! // Circular-orbit speed at the equator: v = sqrt(mu / r).
//! let v_circ_squared = mu.value / r.value;
//! assert!(v_circ_squared > 0.0);
//! ```
use GravParam;
use F64Ext;
use ;
use radian_per_second;
use ;
use meter;
// ── Earth ───────────────────────────────────────────────────────────────
/// Earth gravitational parameter from `earth_GGM05C.cc` (m³/s²).
/// Alias for [`mu_ggm05c`] under the planet-named factory naming
/// convention. `mu_earth()` returns `GravParam<Earth>` from the GGM05C
/// model, matching the per-planet `mu_*()` shape used by `mu_sun()`,
/// `mu_moon()`, `mu_mars()`.
/// Earth equatorial radius (WGS84, m).
/// Earth polar radius (WGS84, m). `r_eq * (1 - 1/298.257_223_563)`.
/// Earth sidereal angular velocity, from JEOD `RNPJ2000_data.cc`.
// ── Moon ────────────────────────────────────────────────────────────────
/// Moon gravitational parameter from `moon_GRAIL150.cc` / IAU (m³/s²).
/// Moon mean radius (m).
// ── Sun ─────────────────────────────────────────────────────────────────
/// Sun gravitational parameter from JEOD `sun_spherical.cc` (m³/s²).
/// Sun mean radius (m).
// ── Mars ────────────────────────────────────────────────────────────────
/// Mars gravitational parameter from `mars_MRO110B2.cc` (m³/s²).
/// Mars sidereal angular velocity (rad/s).
/// Mars mean radius (m).