Skip to content

Commit 5d8bb23

Browse files
committed
ENH: Adding callback for parachute volume
1 parent 29fcfb4 commit 5d8bb23

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

rocketpy/simulation/flight.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,21 @@ def __check_and_handle_parachute_triggers(
10021002
"parachute_added_mass_coefficient",
10031003
added_mass_coefficient,
10041004
),
1005+
lambda self: setattr(
1006+
self,
1007+
"parachute_volume",
1008+
(4 / 3)
1009+
* math.pi
1010+
* (self.parachute_height / self.parachute_radius)
1011+
* (
1012+
min(
1013+
self.parachute_radius,
1014+
self.rocket.radius,
1015+
)
1016+
)
1017+
* 3,
1018+
),
1019+
lambda self: delattr(self, "t0"),
10051020
]
10061021
self.flight_phases.add_phase(
10071022
node.t + parachute.lag,

0 commit comments

Comments
 (0)