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
//! Named vehicle archetypes.
//!
//! These are starting-point [`MassProperties`] / mass values for common
//! reference missions. Mission code typically combines them with an
//! [`orbital_elements`](super::orbital_elements) preset and an
//! integrator choice via the typestate
//! [`VehicleBuilder`](crate::VehicleBuilder).
//!
//! ```
//! use astrodyn::recipes::vehicle;
//! use astrodyn_quantities::ext::F64Ext;
//! assert_eq!(vehicle::iss_mass().get::<uom::si::mass::kilogram>(), 420_000.0);
//! ```
use MassProperties;
use F64Ext;
use ;
use meter;
use kilogram;
/// ISS-class mass (~420 t) as a typed [`Mass`].
///
/// ```
/// use astrodyn::recipes::vehicle;
/// use uom::si::mass::kilogram;
/// assert_eq!(vehicle::iss_mass().get::<kilogram>(), 420_000.0);
/// ```
/// 1 kg unit-sphere test particle. Used by drag / SRP verification
/// scenarios that match JEOD's "1 kg sphere in elliptical orbit"
/// pattern.
///
/// ```
/// use astrodyn::recipes::vehicle;
/// use uom::si::mass::kilogram;
/// assert_eq!(vehicle::unit_sphere_mass().get::<kilogram>(), 1.0);
/// ```
/// STS-114 (Discovery) mass at launch (~109 t).
///
/// ```
/// use astrodyn::recipes::vehicle;
/// use uom::si::mass::kilogram;
/// assert_eq!(vehicle::sts114_mass().get::<kilogram>(), 109_000.0);
/// ```
/// Clementine probe wet mass at lunar arrival (424 kg).
///
/// Matches the JEOD `SIM_Earth_Moon` reference simulation mass; the
/// `tier3_sim_earth_moon` Tier 3 case asserts against this value. SRP
/// acceleration scales with mass so missions cross-validating against
/// JEOD must use 424 kg, not the 227 kg dry mass.
///
/// ```
/// use astrodyn::recipes::vehicle;
/// use uom::si::mass::kilogram;
/// assert_eq!(vehicle::clementine_mass().get::<kilogram>(), 424.0);
/// ```
/// Dawn spacecraft mass at Mars arrival (~1217 kg total).
///
/// ```
/// use astrodyn::recipes::vehicle;
/// use uom::si::mass::kilogram;
/// assert_eq!(vehicle::dawn_mass().get::<kilogram>(), 1_217.0);
/// ```
/// Apollo CSM mass (~30 t).
///
/// ```
/// use astrodyn::recipes::vehicle;
/// use uom::si::mass::kilogram;
/// assert_eq!(vehicle::apollo_csm_mass().get::<kilogram>(), 30_000.0);
/// ```
/// Apollo Lunar Module mass (~14.7 t fueled / lunar-descent
/// configuration).
///
/// ```
/// use astrodyn::recipes::vehicle;
/// use uom::si::mass::kilogram;
/// assert_eq!(vehicle::apollo_lm_mass().get::<kilogram>(), 14_700.0);
/// ```
/// NESC Apollo body model: 6-DoF [`MassProperties`] for the
/// "Apollo Model" published in the NASA NESC GN&C Lunar Check Cases.
///
/// Source:
/// <https://nescacademy.nasa.gov/flightsim/2023/bodies#apollo-model>.
///
/// - Mass: 16 642.0 kg (distinct from [`apollo_lm_mass`], which is the
/// 14.7 t LM lunar-descent configuration).
/// - Inertia tensor (kg·m², body frame about the CoM):
/// - Diagonal: Ixx = 36 502.7, Iyy = 38 372.4, Izz = 36 514.9.
/// - Off-diagonal: Ixy = −27.1, Iyz = 1 152.4, Izx = 233.2.
/// - Center-of-mass offset (m, body frame): (4.7, 0.01, −0.0075).
///
/// The NESC document notes that the body-fixed coordinate frame
/// "coincides with the orbit-defined (vo) system at the start of the
/// scenario." That is **descriptive**: the published initial quaternion
/// already encodes the body-from-inertial rotation at t=0 — the recipe
/// returns identity `t_struct_body` (the structural-to-body transform),
/// so mission code does not need to apply an additional rotation.
///
/// Used by `astrodyn_verif_nesc::cc8` and any future NESC GN&C check
/// case that names this body model.
///
/// ```
/// use astrodyn::recipes::vehicle;
/// use uom::si::mass::kilogram;
/// let mp = vehicle::nesc_apollo_lm();
/// assert_eq!(mp.mass, 16_642.0);
/// assert!((mp.inertia.x_axis.x - 36_502.7).abs() < 1e-6);
/// assert!((mp.position.x - 4.7).abs() < 1e-12);
/// ```
/// 6-DoF rigid sphere mass properties: total mass `mass`, uniform
/// inertia `I = (2/5) m r²` along all body axes, CoM at structural
/// origin. Inputs are typed so call sites stay unit-safe ergonomically:
/// `vehicle::rigid_sphere(420_000.0.kg(), 5.0.m())`.
///
/// ```
/// use astrodyn_quantities::ext::F64Ext;
/// use astrodyn::recipes::vehicle;
/// let mp = vehicle::rigid_sphere(10.0.kg(), 1.0.m());
/// // I = (2/5) m r² = 4.0
/// assert!((mp.inertia.x_axis.x - 4.0).abs() < 1e-12);
/// assert_eq!(mp.mass, 10.0);
/// ```