Browse Source

Phase 5: Update all test configs to new orbit table format

main
cinnaboot 6 months ago
parent
commit
64f20ef309
  1. 35
      docs/unified_orbital_elements_plan.md
  2. 16
      tests/configs/earth_circular.toml
  3. 34
      tests/configs/earth_mars_simple.toml
  4. 16
      tests/configs/hyperbolic_comet.toml
  5. 34
      tests/configs/interplanetary_transfer.toml
  6. 23
      tests/configs/maneuver_sequence.toml
  7. 33
      tests/configs/manual_root_transition.toml
  8. 16
      tests/configs/mars_circular.toml
  9. 24
      tests/configs/mutual_soi_close.toml
  10. 16
      tests/configs/parabolic_comet.toml
  11. 32
      tests/configs/simple_root_transition.toml
  12. 24
      tests/configs/soi_transition.toml
  13. 112
      tests/configs/solar_system.toml
  14. 23
      tests/configs/spacecraft_test.toml

35
docs/unified_orbital_elements_plan.md

@ -272,23 +272,24 @@ struct Spacecraft {
- `config_loader.cpp`: Update call after config load - `config_loader.cpp`: Update call after config load
- Tests: Update if they call initialization directly - Tests: Update if they call initialization directly
### Phase 5: Update Test Configs ### Phase 5: Update Test Configs ✅ COMPLETE
13. **Update all test configs to use new format** 13. **Update all test configs to use new format**
**Configs to update:** **Configs to update:**
- `tests/configs/solar_system.toml` - All planets and moons - ✅ `tests/configs/solar_system.toml` - All planets and moons
- `tests/configs/earth_circular.toml` - Simple test - ✅ `tests/configs/earth_circular.toml` - Simple test
- `tests/configs/mars_circular.toml` - Simple test - ✅ `tests/configs/mars_circular.toml` - Simple test
- `tests/configs/spacecraft_test.toml` - Spacecraft example - ✅ `tests/configs/spacecraft_test.toml` - Spacecraft example
- `tests/configs/interplanetary_transfer.toml` - Transfer orbit - ✅ `tests/configs/interplanetary_transfer.toml` - Transfer orbit
- `tests/configs/hyperbolic_comet.toml` - Hyperbolic escape - ✅ `tests/configs/hyperbolic_comet.toml` - Hyperbolic escape
- `tests/configs/parabolic_comet.toml` - Parabolic escape - ✅ `tests/configs/parabolic_comet.toml` - Parabolic escape
- `tests/configs/soi_transition.toml` - SOI crossing - ✅ `tests/configs/soi_transition.toml` - SOI crossing
- `tests/configs/simple_root_transition.toml` - SOI test - ✅ `tests/configs/simple_root_transition.toml` - SOI test
- `tests/configs/manual_root_transition.toml` - SOI test - ✅ `tests/configs/manual_root_transition.toml` - SOI test
- `tests/configs/mutual_soi_close.toml` - Multi-body - ✅ `tests/configs/mutual_soi_close.toml` - Multi-body
- `tests/configs/maneuver_sequence.toml` - Maneuver planning - ✅ `tests/configs/maneuver_sequence.toml` - Maneuver planning
- ✅ `tests/configs/earth_mars_simple.toml` - Earth-Mars with spacecraft
**Example transformation:** **Example transformation:**
@ -463,9 +464,9 @@ This is a **major breaking change** that affects all configs and code:
- Help identify old vs new config formats (if we ever need backward compat) - Help identify old vs new config formats (if we ever need backward compat)
## Success Criteria ## Success Criteria
1. [ ] All test configs updated to new format 1. [x] All test configs updated to new format
2. [ ] Config loader successfully parses `orbit` tables 2. [x] Config loader successfully parses `orbit` tables
3. [ ] `orbital_elements_to_cartesian()` correctly converts all orbit types 3. [x] `orbital_elements_to_cartesian()` correctly converts all orbit types
4. [x] `initialize_orbital_objects()` sets up bodies and spacecraft correctly 4. [x] `initialize_orbital_objects()` sets up bodies and spacecraft correctly
5. [x] All references to `position`/`velocity` renamed to `global_*` 5. [x] All references to `position`/`velocity` renamed to `global_*`
6. [ ] Renderer displays orbits correctly 6. [ ] Renderer displays orbits correctly

16
tests/configs/earth_circular.toml

@ -6,18 +6,22 @@
name = "Sun" name = "Sun"
mass = 1.989e30 mass = 1.989e30
radius = 6.96e8 radius = 6.96e8
position = { x = 0.0, y = 0.0, z = 0.0 }
parent_index = -1 parent_index = -1
color = { r = 1.0, g = 1.0, b = 0.0 } color = { r = 1.0, g = 1.0, b = 0.0 }
eccentricity = 0.0 orbit = {
semi_major_axis = 0.0 semi_major_axis = 0.0
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Earth" name = "Earth"
mass = 5.972e24 mass = 5.972e24
radius = 6.371e6 radius = 6.371e6
position = { x = 1.496e11, y = 0.0, z = 0.0 }
parent_index = 0 parent_index = 0
color = { r = 0.0, g = 0.5, b = 1.0 } color = { r = 0.0, g = 0.5, b = 1.0 }
eccentricity = 0.0 orbit = {
semi_major_axis = 1.496e11 semi_major_axis = 1.496e11
eccentricity = 0.0
true_anomaly = 0.0
}

34
tests/configs/earth_mars_simple.toml

@ -2,31 +2,37 @@
name = "Sun" name = "Sun"
mass = 1.989e30 mass = 1.989e30
radius = 6.96e8 radius = 6.96e8
position = { x = 0.0, y = 0.0, z = 0.0 }
parent_index = -1 parent_index = -1
color = { r = 1.0, g = 1.0, b = 0.0 } color = { r = 1.0, g = 1.0, b = 0.0 }
eccentricity = 0.0 orbit = {
semi_major_axis = 0.0 semi_major_axis = 0.0
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Earth" name = "Earth"
mass = 5.972e24 mass = 5.972e24
radius = 6.371e6 radius = 6.371e6
position = { x = 1.496e11, y = 0.0, z = 0.0 }
parent_index = 0 parent_index = 0
color = { r = 0.0, g = 0.5, b = 1.0 } color = { r = 0.0, g = 0.5, b = 1.0 }
eccentricity = 0.0 orbit = {
semi_major_axis = 1.496e11 semi_major_axis = 1.496e11
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Mars" name = "Mars"
mass = 6.39e23 mass = 6.39e23
radius = 3.3895e6 radius = 3.3895e6
position = { x = 2.279e11, y = 0.0, z = 0.0 }
parent_index = 0 parent_index = 0
color = { r = 0.8, g = 0.3, b = 0.1 } color = { r = 0.8, g = 0.3, b = 0.1 }
eccentricity = 0.0 orbit = {
semi_major_axis = 2.279e11 semi_major_axis = 2.279e11
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Spacecraft" name = "Spacecraft"
@ -34,9 +40,11 @@ mass = 1.0
radius = 1000.0 radius = 1000.0
# Position at LEO altitude: Earth position + (Earth radius + 200km altitude) # Position at LEO altitude: Earth position + (Earth radius + 200km altitude)
# Earth: 1.496e11, LEO offset: 6.571e6, Total: 1.49606571e11 # Earth: 1.496e11, LEO offset: 6.571e6, Total: 1.49606571e11
position = { x = 1.49606571e11, y = 0.0, z = 0.0 }
parent_index = 1 parent_index = 1
color = { r = 1.0, g = 0.0, b = 0.5 } color = { r = 1.0, g = 0.0, b = 0.5 }
eccentricity = 0.0 orbit = {
# Semi-major axis: Earth radius + 200km LEO altitude # Semi-major axis: Earth radius + 200km LEO altitude
semi_major_axis = 6.571e6 semi_major_axis = 6.571e6
eccentricity = 0.0
true_anomaly = 0.0
}

16
tests/configs/hyperbolic_comet.toml

@ -6,18 +6,22 @@
name = "Sun" name = "Sun"
mass = 1.989e30 mass = 1.989e30
radius = 6.96e8 radius = 6.96e8
position = { x = 0.0, y = 0.0, z = 0.0 }
parent_index = -1 parent_index = -1
color = { r = 1.0, g = 1.0, b = 0.0 } color = { r = 1.0, g = 1.0, b = 0.0 }
eccentricity = 0.0 orbit = {
semi_major_axis = 0.0 semi_major_axis = 0.0
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "HyperbolicComet" name = "HyperbolicComet"
mass = 1.0e14 mass = 1.0e14
radius = 5.0e3 radius = 5.0e3
position = { x = 1.496e11, y = 0.0, z = 0.0 }
parent_index = 0 parent_index = 0
color = { r = 0.5, g = 1.0, b = 0.5 } color = { r = 0.5, g = 1.0, b = 0.5 }
eccentricity = 1.5 orbit = {
semi_major_axis = -1.496e11 semi_major_axis = -1.496e11
eccentricity = 1.5
true_anomaly = 0.0
}

34
tests/configs/interplanetary_transfer.toml

@ -6,31 +6,37 @@
name = "Sun" name = "Sun"
mass = 1.989e30 mass = 1.989e30
radius = 6.96e8 radius = 6.96e8
position = { x = 0.0, y = 0.0, z = 0.0 }
parent_index = -1 parent_index = -1
color = { r = 1.0, g = 1.0, b = 0.0 } color = { r = 1.0, g = 1.0, b = 0.0 }
eccentricity = 0.0 orbit = {
semi_major_axis = 0.0 semi_major_axis = 0.0
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Earth" name = "Earth"
mass = 5.972e24 mass = 5.972e24
radius = 6.371e6 radius = 6.371e6
position = { x = 1.496e11, y = 0.0, z = 0.0 }
parent_index = 0 parent_index = 0
color = { r = 0.0, g = 0.5, b = 1.0 } color = { r = 0.0, g = 0.5, b = 1.0 }
eccentricity = 0.0 orbit = {
semi_major_axis = 1.496e11 semi_major_axis = 1.496e11
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Mars" name = "Mars"
mass = 6.39e23 mass = 6.39e23
radius = 3.3895e6 radius = 3.3895e6
position = { x = 2.279e11, y = 0.0, z = 0.0 }
parent_index = 0 parent_index = 0
color = { r = 0.8, g = 0.3, b = 0.1 } color = { r = 0.8, g = 0.3, b = 0.1 }
eccentricity = 0.0 orbit = {
semi_major_axis = 2.279e11 semi_major_axis = 2.279e11
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Probe" name = "Probe"
@ -38,9 +44,11 @@ mass = 1.0e3
radius = 1.0e1 radius = 1.0e1
# Start at Earth's position, moving toward Mars # Start at Earth's position, moving toward Mars
# The probe will escape Earth's SOI and transition to Sun, then to Mars # The probe will escape Earth's SOI and transition to Sun, then to Mars
position = { x = 1.496e11, y = 0.0, z = 0.0 }
parent_index = 0 # Start orbiting Sun parent_index = 0 # Start orbiting Sun
color = { r = 0.0, g = 1.0, b = 0.0 } color = { r = 0.0, g = 1.0, b = 0.0 }
# Use elliptical transfer orbit with semi_major_axis halfway between Earth and Mars orbit = {
eccentricity = 0.3 # Use elliptical transfer orbit with semi_major_axis halfway between Earth and Mars
semi_major_axis = 1.888e11 semi_major_axis = 1.888e11
eccentricity = 0.3
true_anomaly = 0.0
}

23
tests/configs/maneuver_sequence.toml

@ -6,28 +6,35 @@
name = "Sun" name = "Sun"
mass = 1.989e30 mass = 1.989e30
radius = 6.96e8 radius = 6.96e8
position = { x = 0.0, y = 0.0, z = 0.0 }
parent_index = -1 parent_index = -1
color = { r = 1.0, g = 1.0, b = 0.0 } color = { r = 1.0, g = 1.0, b = 0.0 }
eccentricity = 0.0 orbit = {
semi_major_axis = 0.0 semi_major_axis = 0.0
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Earth" name = "Earth"
mass = 5.972e24 mass = 5.972e24
radius = 6.371e6 radius = 6.371e6
position = { x = 1.496e11, y = 0.0, z = 0.0 }
parent_index = 0 parent_index = 0
color = { r = 0.0, g = 0.5, b = 1.0 } color = { r = 0.0, g = 0.5, b = 1.0 }
eccentricity = 0.0 orbit = {
semi_major_axis = 1.496e11 semi_major_axis = 1.496e11
eccentricity = 0.0
true_anomaly = 0.0
}
[[spacecraft]] [[spacecraft]]
name = "LEO_Satellite" name = "LEO_Satellite"
mass = 1000.0 mass = 1000.0
position = { x = 0.0, y = 6.771e6, z = 0.0 }
velocity = { x = 7660.0, y = 0.0, z = 0.0 }
parent_index = 1 parent_index = 1
orbit = {
altitude = 400000.0
eccentricity = 0.0
true_anomaly = 0.0
}
[[maneuvers]] [[maneuvers]]
name = "orbit_raise_1" name = "orbit_raise_1"

33
tests/configs/manual_root_transition.toml

@ -5,40 +5,47 @@
name = "Sun" name = "Sun"
mass = 1.989e30 mass = 1.989e30
radius = 6.96e8 radius = 6.96e8
position = { x = 0.0, y = 0.0, z = 0.0 }
parent_index = -1 parent_index = -1
color = { r = 1.0, g = 1.0, b = 0.0 } color = { r = 1.0, g = 1.0, b = 0.0 }
eccentricity = 0.0 orbit = {
semi_major_axis = 0.0 semi_major_axis = 0.0
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Earth" name = "Earth"
mass = 5.972e24 mass = 5.972e24
radius = 6.371e6 radius = 6.371e6
position = { x = 1.496e11, y = 0.0, z = 0.0 }
parent_index = 0 parent_index = 0
color = { r = 0.0, g = 0.5, b = 1.0 } color = { r = 0.0, g = 0.5, b = 1.0 }
eccentricity = 0.0 orbit = {
semi_major_axis = 1.496e11 semi_major_axis = 1.496e11
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Mars" name = "Mars"
mass = 6.39e23 mass = 6.39e23
radius = 3.3895e6 radius = 3.3895e6
position = { x = 2.279e11, y = 0.0, z = 0.0 }
parent_index = 0 parent_index = 0
color = { r = 0.8, g = 0.3, b = 0.1 } color = { r = 0.8, g = 0.3, b = 0.1 }
eccentricity = 0.0 orbit = {
semi_major_axis = 2.279e11 semi_major_axis = 2.279e11
eccentricity = 0.0
true_anomaly = 0.0
}
# Probe starts well outside Earth's SOI to force Sun transition # Probe starts well outside Earth's SOI to force Sun transition
[[bodies]] [[bodies]]
name = "Probe" name = "Probe"
mass = 1.0e3 mass = 1.0e3
radius = 1.0e1 radius = 1.0e1
# Position probe between Earth and Mars, closer to Mars
position = { x = 2.0e11, y = 0.0, z = 0.0 }
parent_index = 1 # Start with Earth as parent parent_index = 1 # Start with Earth as parent
color = { r = 1.0, g = 0.0, b = 0.0 } color = { r = 1.0, g = 0.0, b = 0.0 }
eccentricity = 0.1 orbit = {
semi_major_axis = 2.5e11 # Large orbit around Sun semi_major_axis = 2.5e11 # Large orbit around Sun
eccentricity = 0.1
true_anomaly = 0.0
}

16
tests/configs/mars_circular.toml

@ -6,18 +6,22 @@
name = "Sun" name = "Sun"
mass = 1.989e30 mass = 1.989e30
radius = 6.96e8 radius = 6.96e8
position = { x = 0.0, y = 0.0, z = 0.0 }
parent_index = -1 parent_index = -1
color = { r = 1.0, g = 1.0, b = 0.0 } color = { r = 1.0, g = 1.0, b = 0.0 }
eccentricity = 0.0 orbit = {
semi_major_axis = 0.0 semi_major_axis = 0.0
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Mars" name = "Mars"
mass = 6.39e23 mass = 6.39e23
radius = 3.3895e6 radius = 3.3895e6
position = { x = 2.244e11, y = 0.0, z = 0.0 }
parent_index = 0 parent_index = 0
color = { r = 0.8, g = 0.3, b = 0.1 } color = { r = 0.8, g = 0.3, b = 0.1 }
eccentricity = 0.0 orbit = {
semi_major_axis = 2.244e11 semi_major_axis = 2.244e11
eccentricity = 0.0
true_anomaly = 0.0
}

24
tests/configs/mutual_soi_close.toml

@ -7,28 +7,34 @@
name = "Sun" name = "Sun"
mass = 1.989e30 mass = 1.989e30
radius = 6.96e8 radius = 6.96e8
position = { x = 0.0, y = 0.0, z = 0.0 }
parent_index = -1 parent_index = -1
color = { r = 1.0, g = 1.0, b = 0.0 } color = { r = 1.0, g = 1.0, b = 0.0 }
eccentricity = 0.0 orbit = {
semi_major_axis = 0.0 semi_major_axis = 0.0
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "PlanetA" name = "PlanetA"
mass = 5.972e24 mass = 5.972e24
radius = 6.371e6 radius = 6.371e6
position = { x = 1.496e11, y = 0.0, z = 0.0 }
parent_index = 0 parent_index = 0
color = { r = 0.0, g = 0.8, b = 0.3 } color = { r = 0.0, g = 0.8, b = 0.3 }
eccentricity = 0.0 orbit = {
semi_major_axis = 1.496e11 semi_major_axis = 1.496e11
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "PlanetB" name = "PlanetB"
mass = 5.972e24 mass = 5.972e24
radius = 6.371e6 radius = 6.371e6
position = { x = 1.501e11, y = 0.0, z = 0.0 }
parent_index = 0 parent_index = 0
color = { r = 0.8, g = 0.8, b = 0.3 } color = { r = 0.8, g = 0.8, b = 0.3 }
eccentricity = 0.0 orbit = {
semi_major_axis = 1.501e11 semi_major_axis = 1.501e11
eccentricity = 0.0
true_anomaly = 0.0
}

16
tests/configs/parabolic_comet.toml

@ -6,18 +6,22 @@
name = "Sun" name = "Sun"
mass = 1.989e30 mass = 1.989e30
radius = 6.96e8 radius = 6.96e8
position = { x = 0.0, y = 0.0, z = 0.0 }
parent_index = -1 parent_index = -1
color = { r = 1.0, g = 1.0, b = 0.0 } color = { r = 1.0, g = 1.0, b = 0.0 }
eccentricity = 0.0 orbit = {
semi_major_axis = 0.0 semi_major_axis = 0.0
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "ParabolicComet" name = "ParabolicComet"
mass = 1.0e14 mass = 1.0e14
radius = 5.0e3 radius = 5.0e3
position = { x = 1.496e11, y = 0.0, z = 0.0 }
parent_index = 0 parent_index = 0
color = { r = 0.7, g = 0.8, b = 0.9 } color = { r = 0.7, g = 0.8, b = 0.9 }
eccentricity = 1.0 orbit = {
semi_major_axis = 1.0e30 semi_major_axis = 1.0e30
eccentricity = 1.0
true_anomaly = 0.0
}

32
tests/configs/simple_root_transition.toml

@ -6,39 +6,47 @@
name = "Sun" name = "Sun"
mass = 1.989e30 mass = 1.989e30
radius = 6.96e8 radius = 6.96e8
position = { x = 0.0, y = 0.0, z = 0.0 }
parent_index = -1 parent_index = -1
color = { r = 1.0, g = 1.0, b = 0.0 } color = { r = 1.0, g = 1.0, b = 0.0 }
eccentricity = 0.0 orbit = {
semi_major_axis = 0.0 semi_major_axis = 0.0
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Earth" name = "Earth"
mass = 5.972e24 mass = 5.972e24
radius = 6.371e6 radius = 6.371e6
position = { x = 1.496e11, y = 0.0, z = 0.0 }
parent_index = 0 parent_index = 0
color = { r = 0.0, g = 0.5, b = 1.0 } color = { r = 0.0, g = 0.5, b = 1.0 }
eccentricity = 0.0 orbit = {
semi_major_axis = 1.496e11 semi_major_axis = 1.496e11
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Mars" name = "Mars"
mass = 6.39e23 mass = 6.39e23
radius = 3.3895e6 radius = 3.3895e6
position = { x = 2.279e11, y = 0.0, z = 0.0 }
parent_index = 0 parent_index = 0
color = { r = 0.8, g = 0.3, b = 0.1 } color = { r = 0.8, g = 0.3, b = 0.1 }
eccentricity = 0.0 orbit = {
semi_major_axis = 2.279e11 semi_major_axis = 2.279e11
eccentricity = 0.0
true_anomaly = 0.0
}
# Probe starts near Earth, in Earth's SOI # Probe starts near Earth, in Earth's SOI
[[bodies]] [[bodies]]
name = "Probe" name = "Probe"
mass = 1.0e3 mass = 1.0e3
radius = 1.0e1 radius = 1.0e1
position = { x = 1.496e11, y = 5.0e8, z = 0.0 }
parent_index = 1 parent_index = 1
color = { r = 1.0, g = 0.0, b = 1.0 } color = { r = 1.0, g = 0.0, b = 1.0 }
eccentricity = 0.2 orbit = {
semi_major_axis = 5.0e8 semi_major_axis = 5.0e8
eccentricity = 0.2
true_anomaly = 0.0
}

24
tests/configs/soi_transition.toml

@ -7,28 +7,34 @@
name = "Sun" name = "Sun"
mass = 1.989e30 mass = 1.989e30
radius = 6.96e8 radius = 6.96e8
position = { x = 0.0, y = 0.0, z = 0.0 }
parent_index = -1 parent_index = -1
color = { r = 1.0, g = 1.0, b = 0.0 } color = { r = 1.0, g = 1.0, b = 0.0 }
eccentricity = 0.0 orbit = {
semi_major_axis = 0.0 semi_major_axis = 0.0
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Mars" name = "Mars"
mass = 6.39e23 mass = 6.39e23
radius = 3.3895e6 radius = 3.3895e6
position = { x = 2.244e11, y = 0.0, z = 0.0 }
parent_index = 0 parent_index = 0
color = { r = 0.8, g = 0.3, b = 0.1 } color = { r = 0.8, g = 0.3, b = 0.1 }
eccentricity = 0.0 orbit = {
semi_major_axis = 2.244e11 semi_major_axis = 2.244e11
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "SmallBody" name = "SmallBody"
mass = 1.0e14 mass = 1.0e14
radius = 5.0e3 radius = 5.0e3
position = { x = 1.122e11, y = 0.0, z = 0.0 }
parent_index = 0 parent_index = 0
color = { r = 0.5, g = 0.8, b = 1.0 } color = { r = 0.5, g = 0.8, b = 1.0 }
eccentricity = 0.7 orbit = {
semi_major_axis = 3.74e11 semi_major_axis = 3.74e11
eccentricity = 0.7
true_anomaly = 0.0
}

112
tests/configs/solar_system.toml

@ -4,138 +4,166 @@
name = "Sun" name = "Sun"
mass = 1.989e30 # kg mass = 1.989e30 # kg
radius = 6.96e8 # m radius = 6.96e8 # m
position = { x = 0.0, y = 0.0, z = 0.0 }
parent_index = -1 parent_index = -1
color = { r = 1.0, g = 1.0, b = 0.0 } color = { r = 1.0, g = 1.0, b = 0.0 }
eccentricity = 0.0 orbit = {
semi_major_axis = 0.0 semi_major_axis = 0.0
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Venus" name = "Venus"
mass = 4.867e24 mass = 4.867e24
radius = 6.0518e6 radius = 6.0518e6
position = { x = 1.082e11, y = 0.0, z = 0.0 }
parent_index = 0 parent_index = 0
color = { r = 0.9, g = 0.7, b = 0.3 } color = { r = 0.9, g = 0.7, b = 0.3 }
eccentricity = 0.0 orbit = {
semi_major_axis = 1.082e11 semi_major_axis = 1.082e11
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Earth" name = "Earth"
mass = 5.972e24 mass = 5.972e24
radius = 6.371e6 radius = 6.371e6
position = { x = 1.496e11, y = 0.0, z = 0.0 }
parent_index = 0 parent_index = 0
color = { r = 0.0, g = 0.5, b = 1.0 } color = { r = 0.0, g = 0.5, b = 1.0 }
eccentricity = 0.0 orbit = {
semi_major_axis = 1.496e11 semi_major_axis = 1.496e11
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Mars" name = "Mars"
mass = 6.39e23 mass = 6.39e23
radius = 3.3895e6 radius = 3.3895e6
position = { x = 2.279e11, y = 0.0, z = 0.0 }
parent_index = 0 parent_index = 0
color = { r = 0.8, g = 0.3, b = 0.1 } color = { r = 0.8, g = 0.3, b = 0.1 }
eccentricity = 0.0 orbit = {
semi_major_axis = 2.279e11 semi_major_axis = 2.279e11
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Jupiter" name = "Jupiter"
mass = 1.898e27 mass = 1.898e27
radius = 6.9911e7 radius = 6.9911e7
position = { x = 7.785e11, y = 0.0, z = 0.0 }
parent_index = 0 parent_index = 0
color = { r = 0.9, g = 0.7, b = 0.5 } color = { r = 0.9, g = 0.7, b = 0.5 }
eccentricity = 0.0 orbit = {
semi_major_axis = 7.785e11 semi_major_axis = 7.785e11
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Saturn" name = "Saturn"
mass = 5.683e26 mass = 5.683e26
radius = 5.8232e7 radius = 5.8232e7
position = { x = 1.434e12, y = 0.0, z = 0.0 }
parent_index = 0 parent_index = 0
color = { r = 0.9, g = 0.8, b = 0.6 } color = { r = 0.9, g = 0.8, b = 0.6 }
eccentricity = 0.0 orbit = {
semi_major_axis = 1.434e12 semi_major_axis = 1.434e12
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Uranus" name = "Uranus"
mass = 8.681e25 mass = 8.681e25
radius = 2.5362e7 radius = 2.5362e7
position = { x = 2.871e12, y = 0.0, z = 0.0 }
parent_index = 0 parent_index = 0
color = { r = 0.5, g = 0.8, b = 0.9 } color = { r = 0.5, g = 0.8, b = 0.9 }
eccentricity = 0.0 orbit = {
semi_major_axis = 2.871e12 semi_major_axis = 2.871e12
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Neptune" name = "Neptune"
mass = 1.024e26 mass = 1.024e26
radius = 2.4622e7 radius = 2.4622e7
position = { x = 4.495e12, y = 0.0, z = 0.0 }
parent_index = 0 parent_index = 0
color = { r = 0.2, g = 0.4, b = 0.9 } color = { r = 0.2, g = 0.4, b = 0.9 }
eccentricity = 0.0 orbit = {
semi_major_axis = 4.495e12 semi_major_axis = 4.495e12
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Moon" name = "Moon"
mass = 7.342e22 mass = 7.342e22
radius = 1.737e6 radius = 1.737e6
position = { x = 1.49984e11, y = 0.0, z = 0.0 }
parent_index = 2 parent_index = 2
color = { r = 0.7, g = 0.7, b = 0.7 } color = { r = 0.7, g = 0.7, b = 0.7 }
eccentricity = 0.0 orbit = {
semi_major_axis = 3.844e8 semi_major_axis = 3.844e8
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Io" name = "Io"
mass = 8.93e22 mass = 8.93e22
radius = 1.822e6 radius = 1.822e6
position = { x = 7.789e11, y = 0.0, z = 0.0 }
parent_index = 4 parent_index = 4
color = { r = 0.9, g = 0.9, b = 0.3 } color = { r = 0.9, g = 0.9, b = 0.3 }
eccentricity = 0.0 orbit = {
semi_major_axis = 4.217e8 semi_major_axis = 4.217e8
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Europa" name = "Europa"
mass = 4.80e22 mass = 4.80e22
radius = 1.561e6 radius = 1.561e6
position = { x = 7.792e11, y = 0.0, z = 0.0 }
parent_index = 4 parent_index = 4
color = { r = 0.8, g = 0.8, b = 0.7 } color = { r = 0.8, g = 0.8, b = 0.7 }
eccentricity = 0.0 orbit = {
semi_major_axis = 6.709e8 semi_major_axis = 6.709e8
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Ganymede" name = "Ganymede"
mass = 1.48e23 mass = 1.48e23
radius = 2.634e6 radius = 2.634e6
position = { x = 7.796e11, y = 0.0, z = 0.0 }
parent_index = 4 parent_index = 4
color = { r = 0.6, g = 0.6, b = 0.5 } color = { r = 0.6, g = 0.6, b = 0.5 }
eccentricity = 0.0 orbit = {
semi_major_axis = 1.070e9 semi_major_axis = 1.070e9
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Callisto" name = "Callisto"
mass = 1.08e23 mass = 1.08e23
radius = 2.410e6 radius = 2.410e6
position = { x = 7.804e11, y = 0.0, z = 0.0 }
parent_index = 4 parent_index = 4
color = { r = 0.5, g = 0.5, b = 0.4 } color = { r = 0.5, g = 0.5, b = 0.4 }
eccentricity = 0.0 orbit = {
semi_major_axis = 1.883e9 semi_major_axis = 1.883e9
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Titan" name = "Titan"
mass = 1.345e23 mass = 1.345e23
radius = 2.575e6 radius = 2.575e6
position = { x = 1.43522e12, y = 0.0, z = 0.0 }
parent_index = 5 parent_index = 5
color = { r = 0.9, g = 0.6, b = 0.3 } color = { r = 0.9, g = 0.6, b = 0.3 }
eccentricity = 0.0 orbit = {
semi_major_axis = 1.222e9 semi_major_axis = 1.222e9
eccentricity = 0.0
true_anomaly = 0.0
}

23
tests/configs/spacecraft_test.toml

@ -6,25 +6,32 @@
name = "Sun" name = "Sun"
mass = 1.989e30 mass = 1.989e30
radius = 6.96e8 radius = 6.96e8
position = { x = 0.0, y = 0.0, z = 0.0 }
parent_index = -1 parent_index = -1
color = { r = 1.0, g = 1.0, b = 0.0 } color = { r = 1.0, g = 1.0, b = 0.0 }
eccentricity = 0.0 orbit = {
semi_major_axis = 0.0 semi_major_axis = 0.0
eccentricity = 0.0
true_anomaly = 0.0
}
[[bodies]] [[bodies]]
name = "Earth" name = "Earth"
mass = 5.972e24 mass = 5.972e24
radius = 6.371e6 radius = 6.371e6
position = { x = 1.496e11, y = 0.0, z = 0.0 }
parent_index = 0 parent_index = 0
color = { r = 0.0, g = 0.5, b = 1.0 } color = { r = 0.0, g = 0.5, b = 1.0 }
eccentricity = 0.0 orbit = {
semi_major_axis = 1.496e11 semi_major_axis = 1.496e11
eccentricity = 0.0
true_anomaly = 0.0
}
[[spacecraft]] [[spacecraft]]
name = "LEO_Satellite" name = "LEO_Satellite"
mass = 1000.0 mass = 1000.0
position = { x = 0.0, y = 6.771e6, z = 0.0 }
velocity = { x = 7660.0, y = 0.0, z = 0.0 }
parent_index = 1 parent_index = 1
orbit = {
altitude = 400000.0
eccentricity = 0.0
true_anomaly = 0.0
}

Loading…
Cancel
Save