Skip to content

Commit 77903d8

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 95b5131 commit 77903d8

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
@@ -1475,7 +1475,7 @@ def add_parachute(
14751475
sampling_rate=100,
14761476
lag=0,
14771477
noise=(0, 0, 0),
1478-
radius=1.5,
1478+
radius=None,
14791479
height=None,
14801480
porosity=0.0432,
14811481
):
@@ -1538,7 +1538,9 @@ def add_parachute(
15381538
are in pascal.
15391539
radius : float, optional
15401540
Length of the non-unique semi-axis (radius) of the inflated hemispheroid
1541-
parachute. Default value is 1.5.
1541+
parachute. If not provided, it is estimated from ``cd_s`` assuming a
1542+
typical hemispherical parachute drag coefficient of 1.4, using the
1543+
formula: ``radius = sqrt(cd_s / (1.4 * pi))``.
15421544
Units are in meters.
15431545
height : float, optional
15441546
Length of the unique semi-axis (height) of the inflated hemispheroid

0 commit comments

Comments
 (0)