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
use super::{CelestialBody, NAIF};
pub struct MERCURY;
impl CelestialBody for MERCURY {
fn gm() -> f64 {
22_032.080_486_418
}
fn eq_radius() -> f64 {
2439.7
}
fn flattening() -> f64 {
0.0
}
}
impl NAIF for MERCURY {
fn id() -> i32 {
199
}
}
pub struct VENUS;
impl CelestialBody for VENUS {
fn gm() -> f64 {
324_858.598_826_46
}
fn eq_radius() -> f64 {
6_051.9
}
fn flattening() -> f64 {
0.0
}
}
impl NAIF for VENUS {
fn id() -> i32 {
299
}
}
pub struct EARTH;
impl EARTH {
pub fn semi_major_radius() -> f64 {
6378.1370
}
pub fn rotation_rate() -> f64 {
7.292_115_146_706_4e-5
}
}
impl CelestialBody for EARTH {
fn gm() -> f64 {
398_600.441_5
}
fn eq_radius() -> f64 {
6_378.136_3
}
fn flattening() -> f64 {
0.003_352_810_664_747_480_5
}
}
impl NAIF for EARTH {
fn id() -> i32 {
399
}
}
pub struct MARS;
impl CelestialBody for MARS {
fn gm() -> f64 {
42_828.314_258_067
}
fn eq_radius() -> f64 {
3.397e3
}
fn flattening() -> f64 {
0.006_476_30
}
}
impl NAIF for MARS {
fn id() -> i32 {
499
}
}
pub struct JUPITER;
impl CelestialBody for JUPITER {
fn gm() -> f64 {
126_712_767.857_80
}
fn eq_radius() -> f64 {
7.1492e4
}
fn flattening() -> f64 {
0.064_874_39
}
}
impl NAIF for JUPITER {
fn id() -> i32 {
599
}
}
pub struct SATURN;
impl CelestialBody for SATURN {
fn gm() -> f64 {
37_940_626.061_137
}
fn eq_radius() -> f64 {
6.0268e4
}
fn flattening() -> f64 {
0.097_962_43
}
}
impl NAIF for SATURN {
fn id() -> i32 {
699
}
}
pub struct URANUS;
impl CelestialBody for URANUS {
fn gm() -> f64 {
5_794_549.007_071_9
}
fn eq_radius() -> f64 {
2.5559e4
}
fn flattening() -> f64 {
0.022_927_34
}
}
impl NAIF for URANUS {
fn id() -> i32 {
799
}
}
pub struct NEPTUNE;
impl CelestialBody for NEPTUNE {
fn gm() -> f64 {
6_836_534.063_879_3
}
fn eq_radius() -> f64 {
2.5269e4
}
fn flattening() -> f64 {
0.018_560_29
}
}
impl NAIF for NEPTUNE {
fn id() -> i32 {
899
}
}