Skip to content

Commit 7f082d2

Browse files
committed
DOC: StochasticAirBrakes related documentation added
Documentation related to the StochasticAirBrakes implementation has been added in StochasticAirBrakes, StochasticRocket and Rocket classes.
1 parent e45ae76 commit 7f082d2

File tree

3 files changed

+45
-5
lines changed

3 files changed

+45
-5
lines changed

rocketpy/rocket/rocket.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,9 +1539,21 @@ def set_air_brakes(
15391539
air_brakes,
15401540
controller,
15411541
):
1542-
1542+
"""Adds an air brake with a controller to the rocket.
1543+
1544+
Parameters
1545+
----------
1546+
air_brakes : AirBrakes
1547+
Air brake to be added to the rocket.
1548+
controller : _Controller
1549+
Air brake controller
1550+
1551+
Returns
1552+
-------
1553+
None
1554+
"""
15431555
self.air_brakes.append(air_brakes)
1544-
self._add_controllers(controller)
1556+
self._add_controllers(controller)
15451557

15461558
def add_air_brakes(
15471559
self,

rocketpy/stochastic/stochastic_aero_surfaces.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,14 +447,24 @@ class StochasticAirBrakes(StochasticModel):
447447
----------
448448
object : AirBrakes
449449
AirBrakes object to be used for validation.
450-
drag_coefficient_curve : list
450+
drag_coefficient_curve : list, str
451451
The drag coefficient curve of the air brakes can account for
452452
either the air brakes' drag alone or the combined drag of both
453453
the rocket and the air brakes.
454454
drag_coefficient_curve_factor : tuple, list, int, float
455455
The drag curve factor of the air brakes.
456456
reference_area : tuple, list, int, float
457457
Reference area used to non-dimensionalize the drag coefficients.
458+
clamp : bool
459+
If True, the simulation will clamp the deployment level to 0 or 1 if
460+
the deployment level is out of bounds. If False, the simulation will
461+
not clamp the deployment level and will instead raise a warning if
462+
the deployment level is out of bounds.
463+
override_rocket_drag : bool
464+
If False, the air brakes drag coefficient will be added to the
465+
rocket's power off drag coefficient curve. If True, during the
466+
simulation, the rocket's power off drag will be ignored and the air
467+
brakes drag coefficient will be used for the entire rocket instead.
458468
deployment_level : tuple, list, int, float
459469
Initial deployment level, ranging from 0 to 1.
460470
name : list[str]
@@ -481,14 +491,24 @@ def __init__(
481491
----------
482492
air_brakes : AirBrakes
483493
AirBrakes object to be used for validation.
484-
drag_coefficient_curve : list, optional
494+
drag_coefficient_curve : list, str, optional
485495
The drag coefficient curve of the air brakes can account for
486496
either the air brakes' drag alone or the combined drag of both
487497
the rocket and the air brakes.
488498
drag_coefficient_curve_factor : tuple, list, int, float, optional
489499
The drag curve factor of the air brakes.
490500
reference_area : tuple, list, int, float, optional
491501
Reference area used to non-dimensionalize the drag coefficients.
502+
clamp : bool, optional
503+
If True, the simulation will clamp the deployment level to 0 or 1 if
504+
the deployment level is out of bounds. If False, the simulation will
505+
not clamp the deployment level and will instead raise a warning if
506+
the deployment level is out of bounds.
507+
override_rocket_drag : bool, optional
508+
If False, the air brakes drag coefficient will be added to the
509+
rocket's power off drag coefficient curve. If True, during the
510+
simulation, the rocket's power off drag will be ignored and the air
511+
brakes drag coefficient will be used for the entire rocket instead.
492512
deployment_level : tuple, list, int, float, optional
493513
Initial deployment level, ranging from 0 to 1.
494514
"""

rocketpy/stochastic/stochastic_rocket.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,15 @@ def add_air_brakes(
398398
air_brakes,
399399
controller
400400
):
401-
401+
"""Adds an air brake to the stochastic rocket.
402+
403+
Parameters
404+
----------
405+
air_brakes : StochasticAirBrakes or Airbrakes
406+
The air brake to be added to the stochastic rocket.
407+
controller : _Controller
408+
Deterministic air brake controller.
409+
"""
402410
# checks if input is a StochasticAirbrakes type
403411
if not isinstance(air_brakes, (AirBrakes, StochasticAirBrakes)):
404412
raise TypeError(

0 commit comments

Comments
 (0)