Skip to content
Snippets Groups Projects
Commit 05feb291 authored by David Verelst's avatar David Verelst
Browse files

prepost.hawcstab2: also read the aero gains from the controller tuning

parent 87e02994
No related branches found
No related tags found
No related merge requests found
......@@ -410,10 +410,14 @@ class ReadControlTuning(object):
def __init__(self):
"""
"""
pass
self._aerogains = False
def parse_line(self, line, controller):
if line.startswith('Aerodynamic gains'):
self._aerogains = True
return
split1 = line.split('=')
var1 = split1[0].strip()
try:
......@@ -449,8 +453,17 @@ class ReadControlTuning(object):
elif i == 10:
controller = 'aero_damp'
setattr(self, controller, dummy())
else:
elif not self._aerogains:
self.parse_line(line, controller)
elif self._aerogains:
break
arr = np.loadtxt(fpath, skiprows=17)
columns = ['theta', 'dq/dtheta', 'dq/dtheta_fit', 'dq/domega',
'dq/domega_fit']
self.aero_gains_units = ['[deg]', '[kNm/deg]', '[kNm/deg]',
'[kNm/(rad/s)]', '[kNm/(rad/s)]']
self.aero_gains = pd.DataFrame(arr, columns=columns)
# set some parameters to zero for the linear case, or when aerodynamic
# gain scheduling is not used
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment