From c5b48578e573c8c02f6267579880847450b6ee8b Mon Sep 17 00:00:00 2001 From: Gui-FernandesBR Date: Sun, 13 Nov 2022 20:50:16 +0100 Subject: [PATCH 1/3] ENH: adding name as a karg in Flight class --- rocketpy/Flight.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rocketpy/Flight.py b/rocketpy/Flight.py index cb908dcab..c010aa898 100644 --- a/rocketpy/Flight.py +++ b/rocketpy/Flight.py @@ -62,6 +62,8 @@ class Flight: Original rail length minus the distance measured from nozzle exit to the lower rail button. It assumes the nozzle to be aligned with the beginning of the rail. + Flight.name: str + Name of the flight. Numerical Integration settings: @@ -527,6 +529,7 @@ def __init__( atol=6 * [1e-3] + 4 * [1e-6] + 3 * [1e-3], timeOvershoot=True, verbose=False, + name="", ): """Run a trajectory simulation. @@ -582,6 +585,8 @@ def __init__( time in some cases. Default is True. verbose : bool, optional If true, verbose mode is activated. Default is False. + name : str, optional + Name of the flight. Default is "". Returns ------- @@ -607,6 +612,7 @@ def __init__( self.initialSolution = initialSolution self.timeOvershoot = timeOvershoot self.terminateOnApogee = terminateOnApogee + self.name = name # Modifying Rail Length for a better out of rail condition upperRButton = max(self.rocket.railButtons[0]) From c37d95f0a0be8bf66c5b7d5346d78e150f232f1a Mon Sep 17 00:00:00 2001 From: Guilherme Fernandes Alves Date: Mon, 14 Nov 2022 05:19:46 +0100 Subject: [PATCH 2/3] MAINT: modifying default name value --- rocketpy/Flight.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rocketpy/Flight.py b/rocketpy/Flight.py index c010aa898..249977b06 100644 --- a/rocketpy/Flight.py +++ b/rocketpy/Flight.py @@ -529,7 +529,7 @@ def __init__( atol=6 * [1e-3] + 4 * [1e-6] + 3 * [1e-3], timeOvershoot=True, verbose=False, - name="", + name="Flight", ): """Run a trajectory simulation. From ca68cd8a6f125ecd6cce00ace36e733289094179 Mon Sep 17 00:00:00 2001 From: Guilherme Fernandes Alves Date: Mon, 14 Nov 2022 05:20:21 +0100 Subject: [PATCH 3/3] MAINT: Update flight docs --- rocketpy/Flight.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rocketpy/Flight.py b/rocketpy/Flight.py index 249977b06..34faa73da 100644 --- a/rocketpy/Flight.py +++ b/rocketpy/Flight.py @@ -586,7 +586,7 @@ def __init__( verbose : bool, optional If true, verbose mode is activated. Default is False. name : str, optional - Name of the flight. Default is "". + Name of the flight. Default is "Flight". Returns -------