diff --git a/README.md b/README.md index 9636d4c..63fb26d 100644 --- a/README.md +++ b/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 diff --git a/configs/example_binary_star.toml b/configs/example_binary_star.toml index 9b80c8a..45760f1 100644 --- a/configs/example_binary_star.toml +++ b/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 -semi_major_axis = 4.0e11 \ No newline at end of file +eccentricity = 0.0 +semi_major_axis = 4.0e11 diff --git a/configs/solar_system.toml b/configs/solar_system.toml index 7492167..b3092fe 100644 --- a/configs/solar_system.toml +++ b/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 @@ -147,4 +138,4 @@ position = { x = 1.556e12, y = 0.0, z = 0.0 } parent_index = 6 color = { r = 0.9, g = 0.6, b = 0.3 } eccentricity = 0.0 -semi_major_axis = 1.556e12 \ No newline at end of file +semi_major_axis = 1.556e12 diff --git a/tests/configs/earth_circular.txt b/tests/configs/earth_circular.txt deleted file mode 100644 index 4c08845..0000000 --- a/tests/configs/earth_circular.txt +++ /dev/null @@ -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 diff --git a/tests/configs/mars_circular.txt b/tests/configs/mars_circular.txt deleted file mode 100644 index e09492d..0000000 --- a/tests/configs/mars_circular.txt +++ /dev/null @@ -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