Skip to content

Commit c91a575

Browse files
authored
REV: Revert PR #958 (#1063)
* Revert "fix(parachute): gate trigger u_dot on arity instead of parameter names" This reverts commit 6c891c9. * Revert "MNT: refactor parachute implementation (#958)" This reverts commit b516ace. * REV: Fix merge errors * MNT: remove last mentions of hemisoherical chute
1 parent bcdb31c commit c91a575

45 files changed

Lines changed: 29605 additions & 25398 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ The following image shows how the four main classes interact with each other:
143143
A typical workflow starts with importing these classes from RocketPy:
144144

145145
```python
146-
from rocketpy import Environment, Rocket, SolidMotor, Flight, HemisphericalParachute
146+
from rocketpy import Environment, Rocket, SolidMotor, Flight
147147
```
148148

149149
An optional step is to import datetime, which is used to define the date of the simulation:
@@ -255,7 +255,7 @@ tail = calisto.add_tail(
255255
You may want to add parachutes to your rocket as well:
256256

257257
```python
258-
main = HemisphericalParachute(
258+
main = calisto.add_parachute(
259259
name="main",
260260
cd_s=10.0,
261261
trigger=800, # ejection altitude in meters
@@ -267,7 +267,7 @@ main = HemisphericalParachute(
267267
porosity=0.0432,
268268
)
269269

270-
drogue = HemisphericalParachute(
270+
drogue = calisto.add_parachute(
271271
name="drogue",
272272
cd_s=1.0,
273273
trigger="apogee", # ejection at apogee
@@ -278,9 +278,6 @@ drogue = HemisphericalParachute(
278278
height=1.5,
279279
porosity=0.0432,
280280
)
281-
282-
calisto.add_parachute(parachute = main)
283-
calisto.add_parachute(parachute = drogue)
284281
```
285282

286283
Finally, you can create a Flight object to simulate your trajectory. To get help on the Flight class, use:

docs/examples/andromeda_flight_sim.ipynb

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,7 @@
3737
"source": [
3838
"import matplotlib.pyplot as plt\n",
3939
"\n",
40-
"from rocketpy import (\n",
41-
" Environment,\n",
42-
" Flight,\n",
43-
" Function,\n",
44-
" HemisphericalParachute,\n",
45-
" Rocket,\n",
46-
" SolidMotor,\n",
47-
")\n",
40+
"from rocketpy import Environment, Flight, Function, Rocket, SolidMotor\n",
4841
"\n",
4942
"plt.style.use(\"seaborn-v0_8-colorblind\")"
5043
]
@@ -265,7 +258,7 @@
265258
},
266259
{
267260
"cell_type": "code",
268-
"execution_count": null,
261+
"execution_count": 64,
269262
"metadata": {},
270263
"outputs": [],
271264
"source": [
@@ -283,15 +276,13 @@
283276
" position=0.3546,\n",
284277
")\n",
285278
"\n",
286-
"Drogue = HemisphericalParachute(\n",
279+
"Drogue = Andromeda.add_parachute(\n",
287280
" \"Drogue\", cd_s=0.84665922014, trigger=\"apogee\", sampling_rate=100, lag=0\n",
288281
")\n",
289282
"\n",
290-
"Main = HemisphericalParachute(\n",
283+
"Main = Andromeda.add_parachute(\n",
291284
" \"Main\", cd_s=8.362919643856031, trigger=500, sampling_rate=100, lag=0\n",
292-
")\n",
293-
"Andromeda.add_parachute(parachute=Drogue)\n",
294-
"Andromeda.add_parachute(parachute=Main)"
285+
")"
295286
]
296287
},
297288
{

docs/examples/bella_lui_flight_sim.ipynb

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
},
3232
{
3333
"cell_type": "code",
34-
"execution_count": null,
34+
"execution_count": 9,
3535
"metadata": {},
3636
"outputs": [],
3737
"source": [
@@ -40,14 +40,7 @@
4040
"import numpy as np\n",
4141
"from scipy.signal import savgol_filter\n",
4242
"\n",
43-
"from rocketpy import (\n",
44-
" Environment,\n",
45-
" Flight,\n",
46-
" Function,\n",
47-
" HemisphericalParachute,\n",
48-
" Rocket,\n",
49-
" SolidMotor,\n",
50-
")"
43+
"from rocketpy import Environment, Flight, Function, Rocket, SolidMotor"
5144
]
5245
},
5346
{
@@ -429,19 +422,18 @@
429422
},
430423
{
431424
"cell_type": "code",
432-
"execution_count": null,
425+
"execution_count": 44,
433426
"metadata": {},
434427
"outputs": [],
435428
"source": [
436-
"Drogue = HemisphericalParachute(\n",
429+
"Drogue = bella_lui.add_parachute(\n",
437430
" \"Drogue\",\n",
438431
" cd_s=parameters.get(\"CdS_drogue\")[0],\n",
439432
" trigger=\"apogee\",\n",
440433
" sampling_rate=105,\n",
441434
" lag=parameters.get(\"lag_rec\")[0],\n",
442435
" noise=(0, 8.3, 0.5),\n",
443-
")\n",
444-
"bella_lui.add_parachute(parachute=Drogue)"
436+
")"
445437
]
446438
},
447439
{

docs/examples/camoes_flight_sim.ipynb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
" Environment,\n",
5353
" Flight,\n",
5454
" Function,\n",
55-
" HemisphericalParachute,\n",
5655
" Rocket,\n",
5756
" SolidMotor,\n",
5857
")\n",
@@ -300,18 +299,17 @@
300299
},
301300
{
302301
"cell_type": "code",
303-
"execution_count": null,
302+
"execution_count": 85,
304303
"metadata": {},
305304
"outputs": [],
306305
"source": [
307306
"def drogue_trigger(p, h, y):\n",
308307
" return True if y[5] < 5 and y[2] > 300 else False\n",
309308
"\n",
310309
"\n",
311-
"Drogue = HemisphericalParachute(\n",
310+
"Drogue = CAMOES.add_parachute(\n",
312311
" \"Drogue\", cd_s=0.33, sampling_rate=400, lag=1.5, trigger=drogue_trigger\n",
313-
")\n",
314-
"CAMOES.add_parachute(parachute=Drogue)"
312+
")"
315313
]
316314
},
317315
{

docs/examples/defiance_flight_sim.ipynb

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
},
2222
{
2323
"cell_type": "code",
24-
"execution_count": null,
24+
"execution_count": 1,
2525
"metadata": {},
2626
"outputs": [],
2727
"source": [
2828
"import datetime\n",
2929
"\n",
30-
"from rocketpy import Environment, Flight, Function, HemisphericalParachute, Rocket\n",
30+
"from rocketpy import Environment, Flight, Function, Rocket\n",
3131
"from rocketpy.motors import CylindricalTank, Fluid, HybridMotor\n",
3232
"from rocketpy.motors.tank import MassFlowRateBasedTank"
3333
]
@@ -185,7 +185,7 @@
185185
},
186186
{
187187
"cell_type": "code",
188-
"execution_count": null,
188+
"execution_count": 4,
189189
"metadata": {},
190190
"outputs": [
191191
{
@@ -221,15 +221,11 @@
221221
"\n",
222222
"defiance.add_tail(top_radius=0.07, bottom_radius=0.064, length=0.0597, position=0.1)\n",
223223
"\n",
224-
"Main = HemisphericalParachute(\n",
225-
" name=\"main\", cd_s=2.2, trigger=305, sampling_rate=100, lag=0\n",
226-
")\n",
224+
"defiance.add_parachute(name=\"main\", cd_s=2.2, trigger=305, sampling_rate=100, lag=0)\n",
227225
"\n",
228-
"Drogue = HemisphericalParachute(\n",
226+
"defiance.add_parachute(\n",
229227
" name=\"drogue\", cd_s=1.55, trigger=\"apogee\", sampling_rate=100, lag=0\n",
230-
")\n",
231-
"defiance.add_parachute(parachute=Main)\n",
232-
"defiance.add_parachute(parachute=Drogue)"
228+
")"
233229
]
234230
},
235231
{

docs/examples/genesis_flight_sim.ipynb

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"source": [
3838
"import matplotlib.pyplot as plt\n",
3939
"\n",
40-
"from rocketpy import Environment, Flight, Function, HemisphericalParachute, Rocket\n",
40+
"from rocketpy import Environment, Flight, Function, Rocket\n",
4141
"from rocketpy.motors import SolidMotor\n",
4242
"\n",
4343
"plt.style.use(\"seaborn-v0_8-colorblind\")"
@@ -267,11 +267,11 @@
267267
},
268268
{
269269
"cell_type": "code",
270-
"execution_count": null,
270+
"execution_count": 8,
271271
"metadata": {},
272272
"outputs": [],
273273
"source": [
274-
"Drogue = HemisphericalParachute(\n",
274+
"Drogue = GENESIS.add_parachute(\n",
275275
" name=\"Drogue\",\n",
276276
" cd_s=0.285005285533666,\n",
277277
" trigger=\"apogee\",\n",
@@ -280,16 +280,14 @@
280280
" noise=(0, 8.3, 0.5),\n",
281281
")\n",
282282
"\n",
283-
"Main = HemisphericalParachute(\n",
283+
"Main = GENESIS.add_parachute(\n",
284284
" name=\"Main\",\n",
285285
" cd_s=1.1,\n",
286286
" trigger=870,\n",
287287
" sampling_rate=105,\n",
288288
" lag=1,\n",
289289
" noise=(0, 8.3, 0.5),\n",
290-
")\n",
291-
"GENESIS.add_parachute(parachute=Drogue)\n",
292-
"GENESIS.add_parachute(parachute=Main)"
290+
")"
293291
]
294292
},
295293
{

docs/examples/halcyon_flight_sim.ipynb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@
3131
},
3232
{
3333
"cell_type": "code",
34-
"execution_count": null,
34+
"execution_count": 2,
3535
"metadata": {},
3636
"outputs": [],
3737
"source": [
3838
"import datetime\n",
3939
"\n",
4040
"import matplotlib.pyplot as plt\n",
4141
"\n",
42-
"from rocketpy import Environment, Flight, Function, HemisphericalParachute, Rocket\n",
42+
"from rocketpy import Environment, Flight, Function, Rocket\n",
4343
"from rocketpy.motors import CylindricalTank, Fluid, HybridMotor\n",
4444
"from rocketpy.motors.tank import MassFlowRateBasedTank\n",
4545
"\n",
@@ -416,18 +416,17 @@
416416
},
417417
{
418418
"cell_type": "code",
419-
"execution_count": null,
419+
"execution_count": 11,
420420
"metadata": {},
421421
"outputs": [],
422422
"source": [
423-
"Main = HemisphericalParachute(\n",
423+
"Main = HALCYON.add_parachute(\n",
424424
" name=\"Main\",\n",
425425
" cd_s=9.621,\n",
426426
" trigger=\"apogee\",\n",
427427
" sampling_rate=100,\n",
428428
" lag=5,\n",
429-
")\n",
430-
"HALCYON.add_parachute(parachute=Main)"
429+
")"
431430
]
432431
},
433432
{

docs/examples/juno3_flight_sim.ipynb

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,13 @@
3333
},
3434
{
3535
"cell_type": "code",
36-
"execution_count": null,
36+
"execution_count": 2,
3737
"metadata": {},
3838
"outputs": [],
3939
"source": [
4040
"import matplotlib.pyplot as plt\n",
4141
"\n",
42-
"from rocketpy import (\n",
43-
" Environment,\n",
44-
" Flight,\n",
45-
" Function,\n",
46-
" HemisphericalParachute,\n",
47-
" Rocket,\n",
48-
" SolidMotor,\n",
49-
")\n",
42+
"from rocketpy import Environment, Flight, Function, Rocket, SolidMotor\n",
5043
"from rocketpy.simulation.flight_data_importer import FlightDataImporter\n",
5144
"\n",
5245
"plt.style.use(\"seaborn-v0_8-colorblind\")"
@@ -340,19 +333,18 @@
340333
},
341334
{
342335
"cell_type": "code",
343-
"execution_count": null,
336+
"execution_count": 15,
344337
"metadata": {},
345338
"outputs": [],
346339
"source": [
347-
"drogue = HemisphericalParachute(\n",
340+
"drogue = juno.add_parachute(\n",
348341
" \"Drogue\",\n",
349342
" cd_s=0.885,\n",
350343
" trigger=\"apogee\",\n",
351344
" sampling_rate=105,\n",
352345
" noise=(0, 8.3, 0.5),\n",
353346
" lag=0.5,\n",
354-
")\n",
355-
"juno.add_parachute(parachute=drogue)"
347+
")"
356348
]
357349
},
358350
{

0 commit comments

Comments
 (0)