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.
 
 
 
 
 

179 lines
3.9 KiB

# Test Configuration: Hybrid Impulse Burns for Analytical Propagation
# Sun + Earth system with multiple spacecraft for impulsive maneuver testing
# Tests the critical workflow: orbital elements → Cartesian → burn → orbital elements
[[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. Hohmann Transfer Spacecraft
# Initial circular LEO orbit (altitude ~400 km)
# Two maneuvers: apogee raise, circularization
[[spacecraft]]
name = "Hohmann_Transfer"
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
}
[[maneuvers]]
name = "hohmann_burn_1"
spacecraft_name = "Hohmann_Transfer"
trigger_type = "time"
trigger_value = 0.0
direction = "prograde"
delta_v = 2440.0
[[maneuvers]]
name = "hohmann_burn_2"
spacecraft_name = "Hohmann_Transfer"
trigger_type = "time"
trigger_value = 5400.0
direction = "prograde"
delta_v = 1500.0
# 2. Plane Change Spacecraft
# Initial circular orbit with inclination 0.2 rad
# One maneuver: normal burn at ascending node to change inclination to 0.4 rad
[[spacecraft]]
name = "Plane_Change"
mass = 1000.0
parent_index = 1
orbit = {
semi_major_axis = 7.0e6,
eccentricity = 0.0,
true_anomaly = 0.0,
inclination = 0.2,
longitude_of_ascending_node = 0.0,
argument_of_periapsis = 0.0
}
[[maneuvers]]
name = "plane_change_burn"
spacecraft_name = "Plane_Change"
trigger_type = "time"
trigger_value = 0.0
direction = "normal"
delta_v = 1400.0
# 3. Periapsis Burn Spacecraft
# Initial elliptical orbit (e = 0.5)
# One maneuver: prograde burn at periapsis to raise apoapsis
[[spacecraft]]
name = "Periapsis_Burn"
mass = 1000.0
parent_index = 1
orbit = {
semi_major_axis = 1.5e7,
eccentricity = 0.5,
true_anomaly = 0.0,
inclination = 0.0,
longitude_of_ascending_node = 0.0,
argument_of_periapsis = 0.0
}
[[maneuvers]]
name = "periapsis_burn"
spacecraft_name = "Periapsis_Burn"
trigger_type = "time"
trigger_value = 0.0
direction = "prograde"
delta_v = 500.0
# 4. Apoapsis Burn Spacecraft
# Initial elliptical orbit (e = 0.5)
# One maneuver: prograde burn at apoapsis to raise periapsis
[[spacecraft]]
name = "Apoapsis_Burn"
mass = 1000.0
parent_index = 1
orbit = {
semi_major_axis = 1.5e7,
eccentricity = 0.5,
true_anomaly = 3.141592653589793,
inclination = 0.0,
longitude_of_ascending_node = 0.0,
argument_of_periapsis = 0.0
}
[[maneuvers]]
name = "apoapsis_burn"
spacecraft_name = "Apoapsis_Burn"
trigger_type = "time"
trigger_value = 0.0
direction = "prograde"
delta_v = 500.0
# 5. Small Delta-v Burn Spacecraft
# Initial circular orbit
# One maneuver: minimal prograde burn (Δv < 1 m/s)
[[spacecraft]]
name = "Small_Delta_v"
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
}
[[maneuvers]]
name = "small_burn"
spacecraft_name = "Small_Delta_v"
trigger_type = "time"
trigger_value = 0.0
direction = "prograde"
delta_v = 0.5
# 6. Large Delta-v Burn Spacecraft
# Initial circular orbit
# One maneuver: large prograde burn (Δv > orbital velocity)
[[spacecraft]]
name = "Large_Delta_v"
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
}
[[maneuvers]]
name = "large_burn"
spacecraft_name = "Large_Delta_v"
trigger_type = "time"
trigger_value = 0.0
direction = "prograde"
delta_v = 12000.0