Skip to content

Commit 3889134

Browse files
committed
checkpoint: thinking out loud
1 parent c270edf commit 3889134

File tree

6 files changed

+209
-185
lines changed

6 files changed

+209
-185
lines changed

assets/configs/real-scale/celestials.ron

Lines changed: 0 additions & 71 deletions
This file was deleted.

assets/configs/real-scale/constants.ron

Lines changed: 0 additions & 34 deletions
This file was deleted.

assets/configs/real-scale/satellites.ron

Lines changed: 0 additions & 79 deletions
This file was deleted.

assets/settings.ron

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
// Simulation settings.
2+
(
3+
// Scale factors allow the simulation to produce realistic results in
4+
// non-real measurement scales. All calculations are self-consistent with
5+
// the real-scale units. Scale factors only affect visualizations.
6+
scale_factors: (
7+
// All spatial units of measure are multiplied by this scalar.
8+
space: 0.0001,
9+
// Number of simulation seconds that occur per system second.
10+
time: 1000.0,
11+
)
12+
physical_constants: (
13+
// Universal gravitational constant, G, as m^3 kg^-1 s^-2
14+
gravitational_constant: 6.67430e-11,
15+
// Speed of light, c, as m s^-1
16+
speed_of_light: 299792458.0,
17+
// 100 Julian years as seconds. A Julian year is exactly 365.25 days of
18+
// 86400 seconds each. This constant is useful for counting centuries in
19+
// time scales that have leap seconds or leap days.
20+
julian_century: 36525.0 * 86400.0,
21+
),
22+
// Physical characteristics of natural bodies.
23+
celestials: [
24+
// Units:
25+
// mass: kilograms
26+
// radius: meters (average)
27+
// rotation_period: seconds
28+
// gravitational_parameter: m^3/s^2
29+
// escape_velocity: m/s
30+
// ),
31+
(
32+
name: "Sun",
33+
mass: 1.9885e30,
34+
radius: 696340000.0,
35+
rotation_period: 0.0,
36+
gravitational_parameter: 1.32712440042e20,
37+
surface_gravity: 274.0,
38+
escape_velocity: 617700.0,
39+
),
40+
(
41+
name: "Earth",
42+
mass: 5.97237e24,
43+
radius: 6371000.0,
44+
rotation_period: 86164.09054,
45+
gravitational_parameter: 3.986004418e14,
46+
surface_gravity: 9.80665,
47+
escape_velocity: 11186.0,
48+
),
49+
(
50+
name: "Moon",
51+
mass: 7.342e22,
52+
radius: 1737100.0,
53+
rotation_period: 2360591.5104,
54+
gravitational_parameter: 4.9048695e12,
55+
escape_velocity: 2375.0,
56+
),
57+
(
58+
name: "Jupiter",
59+
mass: 1.8982e27,
60+
radius: 69911000.0,
61+
),
62+
],
63+
// Characteristics of artificial satellites.
64+
satellites: [
65+
// Units:
66+
// mass: total mass, as kilograms
67+
// dimensions: size of bounding box, as meters (x,y,z)
68+
// orbiting: the body the orbit is defined around [Earth, Moon]
69+
// semi_major_axis: meters
70+
// eccentricity: number between [0.0,1.0]
71+
// inclination: radians from the ecliptic
72+
// clock_type: on-board clock type [USO, CSAC, TCXO]
73+
// clock_frequency: tick frequency of the on-board clock, as Hz
74+
// clock_stability: Allan deviation at 1 second (or -1 for unknown)
75+
(
76+
name: "International Space Station (ISS)",
77+
mass: 419725.0,
78+
dimensions: [72.8, 108.5, 27.5],
79+
orbiting: "Earth",
80+
semi_major_axis: 6785000.0,
81+
eccentricity: 0.0008,
82+
inclination: 0.9012,
83+
clock_type: "USO",
84+
clock_frequency: 10e6,
85+
clock_stability: 1e-12,
86+
),
87+
(
88+
name: "GPS IIIA-6",
89+
mass: 2161.0,
90+
dimensions: [2.55, 2.24, 4.62],
91+
orbiting: "Earth",
92+
semi_major_axis: 26559800.0,
93+
eccentricity: 0.0,
94+
inclination: 0.9599,
95+
clock_type: "USO",
96+
clock_frequency: 10.23e6,
97+
clock_stability: -1.0,
98+
),
99+
(
100+
name: "GPS IIR-10",
101+
mass: 2032.0,
102+
dimensions: [2.44, 2.03, 5.18],
103+
orbiting: "Earth",
104+
semi_major_axis: 26559800.0,
105+
eccentricity: 0.0,
106+
inclination: 0.9599,
107+
clock_type: "USO",
108+
clock_frequency: 10.23e6,
109+
clock_stability: -1.0,
110+
),
111+
(
112+
name: "GPS IIF-3",
113+
mass: 1630.0,
114+
dimensions: [2.4, 2.0, 4.5],
115+
orbiting: "Earth",
116+
semi_major_axis: 26559800.0,
117+
eccentricity: 0.0,
118+
inclination: 0.9599,
119+
clock_type: "USO",
120+
clock_frequency: 10.23e6,
121+
clock_stability: -1.0,
122+
),
123+
(
124+
name: "GPS IIF-9",
125+
mass: 1630.0,
126+
dimensions: [2.4, 2.0, 4.5],
127+
orbiting: "Earth",
128+
semi_major_axis: 26559800.0,
129+
eccentricity: 0.0,
130+
inclination: 0.9599,
131+
clock_type: "USO",
132+
clock_frequency: 10.23e6,
133+
clock_stability: -1.0,
134+
),
135+
(
136+
name: "Lunar Reconnaissance Orbiter",
137+
mass: 1916.0,
138+
dimensions: [3.6, 3.6, 4.4],
139+
orbiting: "Moon",
140+
semi_major_axis: 1789000.0,
141+
eccentricity: 0.0093,
142+
inclination: 1.5533,
143+
clock_type: "USO",
144+
clock_stability: 1e-13,
145+
clock_frequency: 40e6,
146+
),
147+
(
148+
name: "LADEE",
149+
mass: 383.0,
150+
dimensions: [2.37, 2.37, 1.85],
151+
orbiting: "Moon",
152+
semi_major_axis: 1866200.0,
153+
eccentricity: 0.125,
154+
inclination: 1.57,
155+
clock_type: "USO",
156+
clock_frequency: 30e6,
157+
clock_stability: 1e-14,
158+
),
159+
(
160+
name: "CAPSTONE",
161+
mass: 25.0,
162+
dimensions: [0.34, 0.34, 0.64],
163+
orbiting: "Moon",
164+
semi_major_axis: 16800000.0,
165+
eccentricity: 0.1,
166+
inclination: 1.1,
167+
clock_type: "TCXO",
168+
clock_frequency: 1e6,
169+
clock_stability: 1e-12,
170+
),
171+
(
172+
name: "Chandrayaan-2 Orbiter",
173+
mass: 2379.0,
174+
dimensions: [3.2, 5.7, 2.1],
175+
semi_major_axis: 1800000.0,
176+
orbiting: "Moon",
177+
eccentricity: 0.014,
178+
inclination: 1.533,
179+
clock_type: "USO",
180+
clock_frequency: 38e6,
181+
clock_stability: 1e-13,
182+
),
183+
],
184+
)

docs/devlog/v0.2.2.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,27 @@ with nyx.
8989

9090
Maybe instead of spending so much time on the orbits, I should spend more time
9191
on... you know... figuring out the time dilation.
92+
93+
# 2024-09-15
94+
Reference frames matter. A lot. I need to spend some time thinking about the
95+
problem of motion and time from the perspective of "how do we convert between
96+
reference frames".
97+
98+
- https://orbital-mechanics.space/intro/reference-frames.html
99+
- https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/req/frames.html
100+
- https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/Tutorials/pdf/individual_docs/17_frames_and_coordinate_systems.pdf
101+
- https://nyxspace.com/nyxspace/MathSpec/models/gravity/
102+
- https://nyxspace.com/nyxspace/showcase/04_lro_od/
103+
104+
In this context, the most important reference frames are
105+
1. Earth-centered Inertial (ECI).
106+
2. Moon-centered Inertial.
107+
3. Object-centered Body-fixed (for a given actor).
108+
109+
I really don't want to have to code up my own reference frame transformations.
110+
This seals the deal with using Nyx. I'll apply scale factors to help with
111+
visualizations if I need to. I don't think there's a place for Particular
112+
anymore. Honestly this might also rule out the necessity for Avian as well.
113+
Since Nyx is a real astrodynamics crate, I'm basically locked into 3D as well.
114+
115+
I put settings, constants, etc. in another RON file for safe keeping.

0 commit comments

Comments
 (0)