Skip to content

Commit e41f227

Browse files
Update rocket.add_parachute to use radius=None for consistency
Changed the default radius from 1.5 to None in the add_parachute method to match the Parachute class behavior. This ensures consistent automatic radius calculation from cd_s across both APIs. Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
1 parent ccc8939 commit e41f227

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

rocketpy/rocket/rocket.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,7 +1488,7 @@ def add_parachute(
14881488
sampling_rate=100,
14891489
lag=0,
14901490
noise=(0, 0, 0),
1491-
radius=1.5,
1491+
radius=None,
14921492
height=None,
14931493
porosity=0.0432,
14941494
):
@@ -1551,7 +1551,9 @@ def add_parachute(
15511551
are in pascal.
15521552
radius : float, optional
15531553
Length of the non-unique semi-axis (radius) of the inflated hemispheroid
1554-
parachute. Default value is 1.5.
1554+
parachute. If not provided, it is estimated from ``cd_s`` assuming a
1555+
typical hemispherical parachute drag coefficient of 1.4, using the
1556+
formula: ``radius = sqrt(cd_s / (1.4 * pi))``.
15551557
Units are in meters.
15561558
height : float, optional
15571559
Length of the unique semi-axis (height) of the inflated hemispheroid

0 commit comments

Comments
 (0)