@@ -1978,8 +1978,9 @@ def __init__(
1978
1978
brakes drag coefficient will be used for the entire rocket instead.
1979
1979
Default is False.
1980
1980
deployment_level : float, optional
1981
- Current deployment level, ranging from 0 to 1. Deployment level is the
1982
- fraction of the total airbrake area that is Deployment. Default is 0.
1981
+ Initial deployment level, ranging from 0 to 1. Deployment level is
1982
+ the fraction of the total airbrake area that is Deployment. Default
1983
+ is 0.
1983
1984
name : str, optional
1984
1985
Name of the air brakes. Default is "AirBrakes".
1985
1986
@@ -1997,6 +1998,7 @@ def __init__(
1997
1998
self .reference_area = reference_area
1998
1999
self .clamp = clamp
1999
2000
self .override_rocket_drag = override_rocket_drag
2001
+ self .initial_deployment_level = deployment_level
2000
2002
self .deployment_level = deployment_level
2001
2003
self .prints = _AirBrakesPrints (self )
2002
2004
self .plots = _AirBrakesPlots (self )
@@ -2023,6 +2025,12 @@ def deployment_level(self, value):
2023
2025
)
2024
2026
self ._deployment_level = value
2025
2027
2028
+ def _reset (self ):
2029
+ """Resets the air brakes to their initial state. This is ran at the
2030
+ beginning of each simulation to ensure the air brakes are in the correct
2031
+ state."""
2032
+ self .deployment_level = self .initial_deployment_level
2033
+
2026
2034
def evaluate_center_of_pressure (self ):
2027
2035
"""Evaluates the center of pressure of the aerodynamic surface in local
2028
2036
coordinates.
0 commit comments