vibe coding an orbital mechanics simulation to try out claude code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

97 lines
2.5 KiB

# Test Configuration: Hybrid Continuous Thrust for Analytical Propagation
# Sun + Earth system with multiple spacecraft for continuous thrust testing
# Tests finite-duration burns and mode transitions between numerical and analytical propagation
[[bodies]]
name = "Sun"
mass = 1.989e30
radius = 6.96e8
parent_index = -1
color = { r = 1.0, g = 1.0, b = 0.0 }
orbit = {
semi_major_axis = 0.0,
eccentricity = 0.0,
true_anomaly = 0.0
}
[[bodies]]
name = "Earth"
mass = 5.972e24
radius = 6.371e6
parent_index = 0
color = { r = 0.0, g = 0.5, b = 1.0 }
orbit = {
semi_major_axis = 1.496e11,
eccentricity = 0.0,
true_anomaly = 0.0
}
# 1. Low-thrust ion engine spacecraft
# Initial circular LEO orbit (altitude ~400 km)
# Simulated continuous burn: 5000 seconds duration, 100 m/s total Δv
# Split into 100 small burns of 1 m/s each every 50 seconds
[[spacecraft]]
name = "Low_Thrust_Ion"
mass = 1000.0
parent_index = 1
orbit = {
semi_major_axis = 6.771e6,
eccentricity = 0.0,
true_anomaly = 0.0,
inclination = 0.0,
longitude_of_ascending_node = 0.0,
argument_of_periapsis = 0.0
}
# 2. Multi-burn sequence spacecraft
# Initial circular orbit
# Simulated continuous burn 1: 2000 seconds, 50 m/s total Δv (20 burns of 2.5 m/s)
# Simulated continuous burn 2: 3000 seconds, 75 m/s total Δv (30 burns of 2.5 m/s)
[[spacecraft]]
name = "Multi_Burn_Sequence"
mass = 1000.0
parent_index = 1
orbit = {
semi_major_axis = 7.0e6,
eccentricity = 0.0,
true_anomaly = 0.0,
inclination = 0.0,
longitude_of_ascending_node = 0.0,
argument_of_periapsis = 0.0
}
# 3. Mode transition spacecraft
# Initial elliptical orbit (e = 0.3)
# Simulated continuous burn: 4000 seconds, 200 m/s total Δv
# Split into 80 burns of 2.5 m/s each
# Purpose: Test switching between analytical and numerical modes during burns
[[spacecraft]]
name = "Mode_Transition"
mass = 1000.0
parent_index = 1
orbit = {
semi_major_axis = 1.2e7,
eccentricity = 0.3,
true_anomaly = 0.0,
inclination = 0.0,
longitude_of_ascending_node = 0.0,
argument_of_periapsis = 0.0
}
# 4. Energy conservation spacecraft
# Initial circular orbit
# Simulated continuous burn: 6000 seconds, 150 m/s total Δv
# Split into 120 burns of 1.25 m/s each
# Purpose: Verify energy conservation during finite-duration burn
[[spacecraft]]
name = "Energy_Conservation"
mass = 1000.0
parent_index = 1
orbit = {
semi_major_axis = 8.0e6,
eccentricity = 0.0,
true_anomaly = 0.0,
inclination = 0.0,
longitude_of_ascending_node = 0.0,
argument_of_periapsis = 0.0
}