Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Attention: The newest changes should be on top -->
- ENH: Adaptive Monte Carlo via Convergence Criteria [#922](https://github.com/RocketPy-Team/RocketPy/pull/922)
- ENH: Auto-Detection of Pressure Conversion Factor [#966](https://github.com/RocketPy-Team/RocketPy/pull/966)
- ENH: Introduce pressure unit conversion when using forecast/reanalysis/ensemble data [#955](https://github.com/RocketPy-Team/RocketPy/pull/955)
- MNT: Refactor parachute implementation with abstract base and hemispherical model split [#958](https://github.com/RocketPy-Team/RocketPy/pull/958)
- MNT: Move parachute classes to the `rocketpy.rocket.parachutes` subpackage and add the `HemisphericalParachute` model [#958](https://github.com/RocketPy-Team/RocketPy/pull/958)
- DOC: Add aerodynamic surfaces user guide [#1043](https://github.com/RocketPy-Team/RocketPy/pull/1043)
- DOC: Add Valkyrie flight example (Bisky Team) [#967](https://github.com/RocketPy-Team/RocketPy/pull/967)
- DOC: Configure AI instructions and update developer docs [#975](https://github.com/RocketPy-Team/RocketPy/pull/975)
Expand All @@ -72,7 +72,7 @@ Attention: The newest changes should be on top -->
### Changed

- REL: bumps up rocketpy version to 1.13.0 [#1048](https://github.com/RocketPy-Team/RocketPy/pull/1048)
- MNT: **Breaking**: `Parachute` is now an abstract base class and can no longer be instantiated directly; use `HemisphericalParachute` (or `Rocket.add_parachute`, which builds it for you). Loading old serialized files still works [#958](https://github.com/RocketPy-Team/RocketPy/pull/958)
- MNT: `Parachute` remains a concrete generic class, fully backward compatible with previous versions; the new `HemisphericalParachute` subclass implements the same model but does not expose the `noise` parameter (attach a noisy `Barometer` sensor instead) [#958](https://github.com/RocketPy-Team/RocketPy/pull/958) [#1061](https://github.com/RocketPy-Team/RocketPy/pull/1061)
- MNT: Discrete controllers are now called exactly once per time node (previously twice); results may change for stateful controllers and `observed_variables` no longer contains duplicated entries [#949](https://github.com/RocketPy-Team/RocketPy/pull/949)
- MNT: Multi-dimensional linear `Function` objects now apply their extrapolation rule to points outside the data's convex hull (previously returned NaN) [#969](https://github.com/RocketPy-Team/RocketPy/pull/969)
- MNT: Informational messages previously shown with `print()` now use Python logging and are silent by default; call `rocketpy.utils.enable_logging()` to see them [#973](https://github.com/RocketPy-Team/RocketPy/pull/973)
Expand Down
8 changes: 3 additions & 5 deletions docs/examples/andromeda_flight_sim.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
" Environment,\n",
" Flight,\n",
" Function,\n",
" HemisphericalParachute,\n",
" Parachute,\n",
" Rocket,\n",
" SolidMotor,\n",
")\n",
Expand Down Expand Up @@ -283,13 +283,11 @@
" position=0.3546,\n",
")\n",
"\n",
"Drogue = HemisphericalParachute(\n",
"Drogue = Parachute(\n",
" \"Drogue\", cd_s=0.84665922014, trigger=\"apogee\", sampling_rate=100, lag=0\n",
")\n",
"\n",
"Main = HemisphericalParachute(\n",
" \"Main\", cd_s=8.362919643856031, trigger=500, sampling_rate=100, lag=0\n",
")\n",
"Main = Parachute(\"Main\", cd_s=8.362919643856031, trigger=500, sampling_rate=100, lag=0)\n",
"Andromeda.add_parachute(parachute=Drogue)\n",
"Andromeda.add_parachute(parachute=Main)"
]
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/bella_lui_flight_sim.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
" Environment,\n",
" Flight,\n",
" Function,\n",
" HemisphericalParachute,\n",
" Parachute,\n",
" Rocket,\n",
" SolidMotor,\n",
")"
Expand Down Expand Up @@ -433,7 +433,7 @@
"metadata": {},
"outputs": [],
"source": [
"Drogue = HemisphericalParachute(\n",
"Drogue = Parachute(\n",
" \"Drogue\",\n",
" cd_s=parameters.get(\"CdS_drogue\")[0],\n",
" trigger=\"apogee\",\n",
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/camoes_flight_sim.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
" Environment,\n",
" Flight,\n",
" Function,\n",
" HemisphericalParachute,\n",
" Parachute,\n",
" Rocket,\n",
" SolidMotor,\n",
")\n",
Expand Down Expand Up @@ -308,7 +308,7 @@
" return True if y[5] < 5 and y[2] > 300 else False\n",
"\n",
"\n",
"Drogue = HemisphericalParachute(\n",
"Drogue = Parachute(\n",
" \"Drogue\", cd_s=0.33, sampling_rate=400, lag=1.5, trigger=drogue_trigger\n",
")\n",
"CAMOES.add_parachute(parachute=Drogue)"
Expand Down
10 changes: 3 additions & 7 deletions docs/examples/defiance_flight_sim.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"source": [
"import datetime\n",
"\n",
"from rocketpy import Environment, Flight, Function, HemisphericalParachute, Rocket\n",
"from rocketpy import Environment, Flight, Function, Parachute, Rocket\n",
"from rocketpy.motors import CylindricalTank, Fluid, HybridMotor\n",
"from rocketpy.motors.tank import MassFlowRateBasedTank"
]
Expand Down Expand Up @@ -221,13 +221,9 @@
"\n",
"defiance.add_tail(top_radius=0.07, bottom_radius=0.064, length=0.0597, position=0.1)\n",
"\n",
"Main = HemisphericalParachute(\n",
" name=\"main\", cd_s=2.2, trigger=305, sampling_rate=100, lag=0\n",
")\n",
"Main = Parachute(name=\"main\", cd_s=2.2, trigger=305, sampling_rate=100, lag=0)\n",
"\n",
"Drogue = HemisphericalParachute(\n",
" name=\"drogue\", cd_s=1.55, trigger=\"apogee\", sampling_rate=100, lag=0\n",
")\n",
"Drogue = Parachute(name=\"drogue\", cd_s=1.55, trigger=\"apogee\", sampling_rate=100, lag=0)\n",
"defiance.add_parachute(parachute=Main)\n",
"defiance.add_parachute(parachute=Drogue)"
]
Expand Down
6 changes: 3 additions & 3 deletions docs/examples/genesis_flight_sim.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"source": [
"import matplotlib.pyplot as plt\n",
"\n",
"from rocketpy import Environment, Flight, Function, HemisphericalParachute, Rocket\n",
"from rocketpy import Environment, Flight, Function, Parachute, Rocket\n",
"from rocketpy.motors import SolidMotor\n",
"\n",
"plt.style.use(\"seaborn-v0_8-colorblind\")"
Expand Down Expand Up @@ -271,7 +271,7 @@
"metadata": {},
"outputs": [],
"source": [
"Drogue = HemisphericalParachute(\n",
"Drogue = Parachute(\n",
" name=\"Drogue\",\n",
" cd_s=0.285005285533666,\n",
" trigger=\"apogee\",\n",
Expand All @@ -280,7 +280,7 @@
" noise=(0, 8.3, 0.5),\n",
")\n",
"\n",
"Main = HemisphericalParachute(\n",
"Main = Parachute(\n",
" name=\"Main\",\n",
" cd_s=1.1,\n",
" trigger=870,\n",
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/halcyon_flight_sim.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"\n",
"import matplotlib.pyplot as plt\n",
"\n",
"from rocketpy import Environment, Flight, Function, HemisphericalParachute, Rocket\n",
"from rocketpy import Environment, Flight, Function, Parachute, Rocket\n",
"from rocketpy.motors import CylindricalTank, Fluid, HybridMotor\n",
"from rocketpy.motors.tank import MassFlowRateBasedTank\n",
"\n",
Expand Down Expand Up @@ -420,7 +420,7 @@
"metadata": {},
"outputs": [],
"source": [
"Main = HemisphericalParachute(\n",
"Main = Parachute(\n",
" name=\"Main\",\n",
" cd_s=9.621,\n",
" trigger=\"apogee\",\n",
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/juno3_flight_sim.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
" Environment,\n",
" Flight,\n",
" Function,\n",
" HemisphericalParachute,\n",
" Parachute,\n",
" Rocket,\n",
" SolidMotor,\n",
")\n",
Expand Down Expand Up @@ -344,7 +344,7 @@
"metadata": {},
"outputs": [],
"source": [
"drogue = HemisphericalParachute(\n",
"drogue = Parachute(\n",
" \"Drogue\",\n",
" cd_s=0.885,\n",
" trigger=\"apogee\",\n",
Expand Down
8 changes: 4 additions & 4 deletions docs/examples/lince_flight_sim.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
" Environment,\n",
" Flight,\n",
" Function,\n",
" HemisphericalParachute,\n",
" Parachute,\n",
" Rocket,\n",
" SolidMotor,\n",
")\n",
Expand Down Expand Up @@ -269,7 +269,7 @@
"metadata": {},
"outputs": [],
"source": [
"Main = HemisphericalParachute(\n",
"Main = Parachute(\n",
" \"Main\", cd_s=3.9, trigger=\"apogee\", sampling_rate=150, lag=0, noise=(0, 0, 0)\n",
")\n",
"LincePreDeploy.add_parachute(parachute=Main)"
Expand Down Expand Up @@ -333,7 +333,7 @@
"metadata": {},
"outputs": [],
"source": [
"Main_stage_1 = HemisphericalParachute(\n",
"Main_stage_1 = Parachute(\n",
" \"Main\", cd_s=3.9, trigger=\"apogee\", sampling_rate=150, lag=0, noise=(0, 0, 0)\n",
")\n",
"LincePostDeploy.add_parachute(parachute=Main_stage_1)"
Expand Down Expand Up @@ -402,7 +402,7 @@
"metadata": {},
"outputs": [],
"source": [
"Main_stage_2 = HemisphericalParachute(\n",
"Main_stage_2 = Parachute(\n",
" \"Main\", cd_s=0.159248, trigger=\"apogee\", sampling_rate=150, lag=0, noise=(0, 0, 0)\n",
")\n",
"Payload.add_parachute(parachute=Main_stage_2)"
Expand Down
6 changes: 3 additions & 3 deletions docs/examples/ndrt_2020_flight_sim.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
" Environment,\n",
" Flight,\n",
" Function,\n",
" HemisphericalParachute,\n",
" Parachute,\n",
" Rocket,\n",
" SolidMotor,\n",
")"
Expand Down Expand Up @@ -378,15 +378,15 @@
"metadata": {},
"outputs": [],
"source": [
"drogue = HemisphericalParachute(\n",
"drogue = Parachute(\n",
" \"Drogue\",\n",
" cd_s=parameters.get(\"cd_s_drogue\")[0],\n",
" trigger=\"apogee\",\n",
" sampling_rate=105,\n",
" lag=parameters.get(\"lag_rec\")[0],\n",
" noise=(0, 8.3, 0.5),\n",
")\n",
"main = HemisphericalParachute(\n",
"main = Parachute(\n",
" \"Main\",\n",
" cd_s=parameters.get(\"cd_s_main\")[0],\n",
" trigger=167.64,\n",
Expand Down
6 changes: 3 additions & 3 deletions docs/examples/prometheus_2022_flight_sim.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
" Flight,\n",
" Function,\n",
" GenericMotor,\n",
" HemisphericalParachute,\n",
" Parachute,\n",
" Rocket,\n",
")\n",
"from rocketpy.simulation.flight_data_importer import FlightDataImporter\n",
Expand Down Expand Up @@ -282,12 +282,12 @@
" position=0.273,\n",
" sweep_length=0.066,\n",
")\n",
"drogue = HemisphericalParachute(\n",
"drogue = Parachute(\n",
" \"Drogue\",\n",
" cd_s=1.6 * np.pi * 0.3048**2, # Cd = 1.6, D_chute = 24 in\n",
" trigger=\"apogee\",\n",
")\n",
"main = HemisphericalParachute(\n",
"main = Parachute(\n",
" \"Main\",\n",
" cd_s=2.2 * np.pi * 0.9144**2, # Cd = 2.2, D_chute = 72 in\n",
" trigger=457.2, # 1500 ft\n",
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/valetudo_flight_sim.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"# Importing libraries\n",
"import matplotlib.pyplot as plt\n",
"\n",
"from rocketpy import Environment, Flight, HemisphericalParachute, Rocket, SolidMotor"
"from rocketpy import Environment, Flight, Parachute, Rocket, SolidMotor"
]
},
{
Expand Down Expand Up @@ -387,7 +387,7 @@
"metadata": {},
"outputs": [],
"source": [
"drogue = HemisphericalParachute(\n",
"drogue = Parachute(\n",
" \"Drogue\",\n",
" cd_s=parameters.get(\"cd_s_drogue\")[0],\n",
" trigger=\"apogee\",\n",
Expand Down
6 changes: 3 additions & 3 deletions docs/user/compare_flights.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ We will start by importing the necessary classes and modules:
.. jupyter-execute::

from rocketpy.plots.compare import CompareFlights
from rocketpy import Environment, Flight, Rocket, SolidMotor, HemisphericalParachute
from rocketpy import Environment, Flight, Rocket, SolidMotor, Parachute
from datetime import datetime, timedelta


Expand Down Expand Up @@ -83,7 +83,7 @@ This is done following the same steps as in the :ref:`firstsimulation` example.
top_radius=0.0635, bottom_radius=0.0435, length=0.060, position=-1.194656
)

main_chute = HemisphericalParachute(
main_chute = Parachute(
"Main",
cd_s=10.0,
trigger=800,
Expand All @@ -92,7 +92,7 @@ This is done following the same steps as in the :ref:`firstsimulation` example.
noise=(0, 8.3, 0.5),
)

drogue_chute = HemisphericalParachute(
drogue_chute = Parachute(
"Drogue",
cd_s=1.0,
trigger="apogee",
Expand Down
10 changes: 5 additions & 5 deletions docs/user/deployable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Let's start by importing the rocketpy classes we will use.

.. jupyter-execute::

from rocketpy import Environment, SolidMotor, Rocket, Flight, HemisphericalParachute
from rocketpy import Environment, SolidMotor, Rocket, Flight, Parachute


Creating Environment
Expand Down Expand Up @@ -182,7 +182,7 @@ Therefore we should be careful with the value of its mass.


# Define Parachutes for the rocket
main_chute = HemisphericalParachute(
main_chute = Parachute(
"Main",
cd_s=7.2,
trigger=800,
Expand All @@ -191,7 +191,7 @@ Therefore we should be careful with the value of its mass.
noise=(0, 8.3, 0.5),
)

drogue_chute = HemisphericalParachute(
drogue_chute = Parachute(
"Drogue",
cd_s=0.72,
trigger="apogee",
Expand Down Expand Up @@ -244,7 +244,7 @@ surfaces to stabilize it, nor a motor that ignites. It does, however, have parac
center_of_mass_without_motor=0,
)

payload_drogue = HemisphericalParachute(
payload_drogue = Parachute(
"Drogue",
cd_s=0.35,
trigger="apogee",
Expand All @@ -253,7 +253,7 @@ surfaces to stabilize it, nor a motor that ignites. It does, however, have parac
noise=(0, 8.3, 0.5),
)

payload_main = HemisphericalParachute(
payload_main = Parachute(
"Main",
cd_s=4.0,
trigger=800,
Expand Down
6 changes: 3 additions & 3 deletions docs/user/first_simulation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ we will use from RocketPy:

.. jupyter-execute::

from rocketpy import Environment, SolidMotor, Rocket, Flight, HemisphericalParachute
from rocketpy import Environment, SolidMotor, Rocket, Flight, Parachute

.. note::

Expand Down Expand Up @@ -272,7 +272,7 @@ Finally, we can add any number of Parachutes to the ``Rocket`` object.

.. jupyter-execute::

main = HemisphericalParachute(
main = Parachute(
name="main",
cd_s=10.0,
trigger=800, # ejection altitude in meters
Expand All @@ -284,7 +284,7 @@ Finally, we can add any number of Parachutes to the ``Rocket`` object.
porosity=0.0432,
)

drogue = HemisphericalParachute(
drogue = Parachute(
name="drogue",
cd_s=1.0,
trigger="apogee", # ejection at apogee
Expand Down
Loading
Loading