Skip to content

Commit 30e4242

Browse files
Address code review: improve docstrings and add explicit None defaults
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
1 parent 77f52c8 commit 30e4242

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

rocketpy/rocket/parachute.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ class Parachute:
9494
Function of clean_pressure_signal.
9595
Parachute.radius : float
9696
Length of the non-unique semi-axis (radius) of the inflated hemispheroid
97-
parachute in meters. Estimated from ``cd_s`` if not explicitly provided.
97+
parachute in meters. Estimated from ``cd_s`` using the formula
98+
``R = sqrt(cd_s / (1.4 * π))`` if not explicitly provided.
9899
Parachute.height : float
99100
Length of the unique semi-axis (height) of the inflated hemispheroid
100101
parachute in meters.
@@ -351,8 +352,8 @@ def from_dict(cls, data):
351352
sampling_rate=data["sampling_rate"],
352353
lag=data["lag"],
353354
noise=data["noise"],
354-
radius=data.get("radius"),
355-
height=data.get("height"),
355+
radius=data.get("radius", None),
356+
height=data.get("height", None),
356357
porosity=data.get("porosity", 0.0432),
357358
)
358359

0 commit comments

Comments
 (0)