@@ -185,6 +185,7 @@ def __init__(
185185 "verbose" : False ,
186186 },
187187 }
188+ # TODO: add all exportable attributes to this list
188189 self .exportable_list = [
189190 "apogee" ,
190191 "apogeeTime" ,
@@ -1078,35 +1079,9 @@ def __export_flight_data(
10781079 -------
10791080 None
10801081 """
1081-
1082- # In case not variables are passed, export default variables
1083- if not isinstance (variables , list ):
1084- variables = [
1085- "apogee" ,
1086- "apogeeTime" ,
1087- "apogeeX" ,
1088- "apogeeY" ,
1089- "executionTime" ,
1090- "finalStaticMargin" ,
1091- "frontalSurfaceWind" ,
1092- "impactVelocity" ,
1093- "initialStaticMargin" ,
1094- "lateralSurfaceWind" ,
1095- "maxAcceleration" ,
1096- "maxAccelerationTime" ,
1097- "maxSpeed" ,
1098- "maxSpeedTime" ,
1099- "numberOfEvents" ,
1100- "outOfRailStaticMargin" ,
1101- "outOfRailTime" ,
1102- "outOfRailVelocity" ,
1103- "tFinal" ,
1104- "xImpact" ,
1105- "yImpact" ,
1106- ]
1107- else : # Check if variables are valid and raise error if not
1108- if not all ([isinstance (var , str ) for var in variables ]):
1109- raise TypeError ("Variables must be strings." )
1082+ # TODO: This method is called at every loop of the dispersion
1083+ # so all the for loops are slowing down de dispersion
1084+ # find a more efficient way to save attributes
11101085
11111086 # First, capture the flight data that are saved in the flight object
11121087 attributes_list = list (set (dir (flight )).intersection (self .export_list ))
@@ -1345,7 +1320,7 @@ def run_dispersion(
13451320
13461321 # Fins
13471322 for finSet in self .finSet_names :
1348- # TODO: Allow elliptical fins as well
1323+ # TODO: Allow elliptical fins
13491324 rocket_dispersion .addTrapezoidalFins (
13501325 n = setting [f"finSet_{ finSet } _n" ],
13511326 rootChord = setting [f"finSet_{ finSet } _rootChord" ],
0 commit comments