@@ -10,14 +10,14 @@ def test_flight_with_launch_plus_delay_trigger(
1010 example_spaceport_env , calisto_motorless , cesaroni_m1670
1111):
1212 """Test a complete flight simulation with a 'launch + X' parachute trigger.
13-
13+
1414 This simulates a rocket with a delay charge that deploys the parachute at a
1515 fixed time after launch, similar to model rockets without avionics.
1616 """
1717 # Use existing rocket and add motor
1818 rocket = calisto_motorless
1919 rocket .add_motor (cesaroni_m1670 , position = - 1.373 )
20-
20+
2121 # Add a parachute with "launch + 5" trigger (5 seconds after launch)
2222 rocket .add_parachute (
2323 name = "Main" ,
@@ -27,7 +27,7 @@ def test_flight_with_launch_plus_delay_trigger(
2727 lag = 1.5 ,
2828 noise = (0 , 8.3 , 0.5 ),
2929 )
30-
30+
3131 # Run flight simulation
3232 flight = Flight (
3333 environment = example_spaceport_env ,
@@ -37,15 +37,15 @@ def test_flight_with_launch_plus_delay_trigger(
3737 heading = 0 ,
3838 terminate_on_apogee = False ,
3939 )
40-
40+
4141 # Verify that the parachute was deployed at approximately the right time
4242 # The parachute should deploy at t=5s + lag=1.5s = 6.5s (fully deployed)
4343 assert flight .t is not None
44-
44+
4545 # Check that parachute deployment happened (should have parachute_cd_s set)
4646 # This attribute is set when parachute is deployed
4747 assert hasattr (flight , "parachute_cd_s" )
48-
48+
4949 # Verify simulation completed successfully
5050 assert flight .apogee_time > 0
5151
@@ -55,17 +55,17 @@ def test_flight_with_burnout_plus_delay_trigger(
5555 example_spaceport_env , calisto_motorless , cesaroni_m1670
5656):
5757 """Test a complete flight simulation with a 'burnout + X' parachute trigger.
58-
58+
5959 This simulates a rocket with a motor delay charge that deploys the parachute
6060 at a fixed time after motor burnout, typical of model rocket motors.
6161 """
6262 # Use existing rocket and add motor
6363 rocket = calisto_motorless
6464 rocket .add_motor (cesaroni_m1670 , position = - 1.373 )
65-
65+
6666 # Get motor burnout time
6767 motor_burnout = rocket .motor .burn_out_time
68-
68+
6969 # Add a parachute with "burnout + 3" trigger (3 seconds after burnout)
7070 rocket .add_parachute (
7171 name = "Main" ,
@@ -75,7 +75,7 @@ def test_flight_with_burnout_plus_delay_trigger(
7575 lag = 1.5 ,
7676 noise = (0 , 8.3 , 0.5 ),
7777 )
78-
78+
7979 # Run flight simulation
8080 flight = Flight (
8181 environment = example_spaceport_env ,
@@ -85,17 +85,17 @@ def test_flight_with_burnout_plus_delay_trigger(
8585 heading = 0 ,
8686 terminate_on_apogee = False ,
8787 )
88-
88+
8989 # Verify that the parachute was deployed
9090 assert flight .t is not None
91-
91+
9292 # Check that parachute deployment happened
9393 assert hasattr (flight , "parachute_cd_s" )
94-
94+
9595 # The parachute should deploy after motor burnout + delay
9696 # Expected deployment at burnout_time + 3s + lag
9797 expected_deploy_time = motor_burnout + 3.0 + 1.5
98-
98+
9999 # Verify simulation completed successfully and parachute deployed after burnout
100100 assert flight .apogee_time > 0
101101 # The simulation should run past the expected deployment time
@@ -107,13 +107,13 @@ def test_flight_with_multiple_time_based_parachutes(
107107 example_spaceport_env , calisto_motorless , cesaroni_m1670
108108):
109109 """Test a flight with multiple time-based parachutes (drogue and main).
110-
110+
111111 This simulates a dual-deployment system using time-based triggers.
112112 """
113113 # Use existing rocket and add motor
114114 rocket = calisto_motorless
115115 rocket .add_motor (cesaroni_m1670 , position = - 1.373 )
116-
116+
117117 # Add drogue parachute - deploys at burnout + 2 seconds
118118 rocket .add_parachute (
119119 name = "Drogue" ,
@@ -123,7 +123,7 @@ def test_flight_with_multiple_time_based_parachutes(
123123 lag = 0.5 ,
124124 noise = (0 , 8.3 , 0.5 ),
125125 )
126-
126+
127127 # Add main parachute - deploys at burnout + 10 seconds
128128 rocket .add_parachute (
129129 name = "Main" ,
@@ -133,7 +133,7 @@ def test_flight_with_multiple_time_based_parachutes(
133133 lag = 1.0 ,
134134 noise = (0 , 8.3 , 0.5 ),
135135 )
136-
136+
137137 # Run flight simulation
138138 flight = Flight (
139139 environment = example_spaceport_env ,
@@ -143,11 +143,11 @@ def test_flight_with_multiple_time_based_parachutes(
143143 heading = 0 ,
144144 terminate_on_apogee = False ,
145145 )
146-
146+
147147 # Verify simulation completed successfully
148148 assert flight .t is not None
149149 assert flight .apogee_time > 0
150-
150+
151151 # Check that parachute deployment happened
152152 assert hasattr (flight , "parachute_cd_s" )
153153
@@ -157,13 +157,13 @@ def test_flight_with_mixed_trigger_types(
157157 example_spaceport_env , calisto_motorless , cesaroni_m1670
158158):
159159 """Test a flight with both time-based and traditional parachute triggers.
160-
160+
161161 This ensures backward compatibility when mixing trigger types.
162162 """
163163 # Use existing rocket and add motor
164164 rocket = calisto_motorless
165165 rocket .add_motor (cesaroni_m1670 , position = - 1.373 )
166-
166+
167167 # Add drogue parachute with traditional apogee trigger
168168 rocket .add_parachute (
169169 name = "Drogue" ,
@@ -173,7 +173,7 @@ def test_flight_with_mixed_trigger_types(
173173 lag = 0.5 ,
174174 noise = (0 , 8.3 , 0.5 ),
175175 )
176-
176+
177177 # Add main parachute with altitude trigger
178178 rocket .add_parachute (
179179 name = "Main" ,
@@ -183,7 +183,7 @@ def test_flight_with_mixed_trigger_types(
183183 lag = 1.0 ,
184184 noise = (0 , 8.3 , 0.5 ),
185185 )
186-
186+
187187 # Run flight simulation
188188 flight = Flight (
189189 environment = example_spaceport_env ,
@@ -193,10 +193,10 @@ def test_flight_with_mixed_trigger_types(
193193 heading = 0 ,
194194 terminate_on_apogee = False ,
195195 )
196-
196+
197197 # Verify simulation completed successfully
198198 assert flight .t is not None
199199 assert flight .apogee_time > 0
200-
200+
201201 # Check that parachute deployment happened
202- assert hasattr (flight , "parachute_cd_s" )
202+ assert hasattr (flight , "parachute_cd_s" )
0 commit comments