Browse Source

Fix TOML config issues: remove duplicate Venus, fix binary star array format, remove obsolete .txt files, update README

main
cinnaboot 6 months ago
parent
commit
af6c214e38
  1. 2
      README.md
  2. 40
      configs/example_binary_star.toml
  3. 9
      configs/solar_system.toml
  4. 11
      tests/configs/earth_circular.txt
  5. 11
      tests/configs/mars_circular.txt

2
README.md

@ -41,7 +41,7 @@ make clean-all # Clean everything including raylib
```bash
./orbit_sim # Run with the default solar system configuration
./orbit_sim configs/example_binary_star.txt # Run with a custom configuration file:
./orbit_sim configs/example_binary_star.toml # Run with a custom configuration file:
```
## Controls

40
configs/example_binary_star.toml

@ -1,62 +1,62 @@
# Binary Star System with Planets
# A simple example of two stars orbiting each other with planets around them
[bodies.stara]
[[bodies]]
name = "StarA"
mass = 1.5e30
radius = 8.0e8
position = { x = 3.0e11, y = 0, z = 0 }
position = { x = 3.0e11, y = 0.0, z = 0.0 }
parent_index = -1
color = { r = 1.0, g = 1.0, b = 0.2 }
eccentricity = 0
semi_major_axis = 0
eccentricity = 0.0
semi_major_axis = 0.0
[bodies.starb]
[[bodies]]
name = "StarB"
mass = 1.2e30
radius = 7.0e8
position = { x = -3.7e11, y = 0, z = 0 }
position = { x = -3.7e11, y = 0.0, z = 0.0 }
parent_index = -1
color = { r = 0.3, g = 0.5, b = 1.0 }
eccentricity = 0
semi_major_axis = 0
eccentricity = 0.0
semi_major_axis = 0.0
[bodies.planeta1]
[[bodies]]
name = "PlanetA1"
mass = 6.0e24
radius = 7.0e6
position = { x = 3.5e11, y = 0, z = 0 }
position = { x = 3.5e11, y = 0.0, z = 0.0 }
parent_index = 0
color = { r = 0.8, g = 0.3, b = 0.2 }
eccentricity = 0
eccentricity = 0.0
semi_major_axis = 3.5e11
[bodies.planetb1]
[[bodies]]
name = "PlanetB1"
mass = 4.0e24
radius = 6.0e6
position = { x = -4.2e11, y = 0, z = 0 }
position = { x = -4.2e11, y = 0.0, z = 0.0 }
parent_index = 1
color = { r = 0.2, g = 0.8, b = 0.6 }
eccentricity = 0
eccentricity = 0.0
semi_major_axis = 4.2e11
[bodies.moona1]
[[bodies]]
name = "MoonA1"
mass = 1.0e23
radius = 2.0e6
position = { x = 3.52e11, y = 0, z = 0 }
position = { x = 3.52e11, y = 0.0, z = 0.0 }
parent_index = 2
color = { r = 0.7, g = 0.7, b = 0.7 }
eccentricity = 0
eccentricity = 0.0
semi_major_axis = 3.52e11
[bodies.planeta2]
[[bodies]]
name = "PlanetA2"
mass = 8.0e24
radius = 8.0e6
position = { x = 4.0e11, y = 0, z = 0 }
position = { x = 4.0e11, y = 0.0, z = 0.0 }
parent_index = 0
color = { r = 0.5, g = 0.6, b = 0.3 }
eccentricity = 0
eccentricity = 0.0
semi_major_axis = 4.0e11

9
configs/solar_system.toml

@ -10,15 +10,6 @@ color = { r = 1.0, g = 1.0, b = 0.0 }
eccentricity = 0.0
semi_major_axis = 0.0
name = "Venus"
mass = 4.867e24
radius = 6.0518e6
position = { x = 1.082e11, y = 0.0, z = 0.0 }
parent_index = 0
color = { r = 0.9, g = 0.7, b = 0.3 }
eccentricity = 0.0
semi_major_axis = 1.082e11
[[bodies]]
name = "Venus"
mass = 4.867e24

11
tests/configs/earth_circular.txt

@ -1,11 +0,0 @@
# Test Configuration: Sun + Earth (circular orbit)
# Earth at 1 AU with circular orbit
# Expected orbital period: ~365 days
#
# Format: name mass(kg) radius(m) x(m) y(m) z(m) parent_index r g b eccentricity semi_major_axis(m)
# Sun at origin (index 0)
Sun 1.989e30 6.96e8 0 0 0 -1 1.0 1.0 0.0 0 0
# Earth at 1 AU - circular orbit (index 1, parent Sun)
Earth 5.972e24 6.371e6 1.496e11 0 0 0 0.0 0.5 1.0 0 1.496e11

11
tests/configs/mars_circular.txt

@ -1,11 +0,0 @@
# Test Configuration: Sun + Mars (circular orbit)
# Mars at 1.5 AU with circular orbit
# Expected orbital period: ~687 days
#
# Format: name mass(kg) radius(m) x(m) y(m) z(m) parent_index r g b eccentricity semi_major_axis(m)
# Sun at origin (index 0)
Sun 1.989e30 6.96e8 0 0 0 -1 1.0 1.0 0.0 0 0
# Mars at 1.5 AU - circular orbit (index 1, parent Sun)
Mars 6.39e23 3.3895e6 2.244e11 0 0 0 0.8 0.3 0.1 0 2.244e11
Loading…
Cancel
Save