Skip to content

Commit e01cef6

Browse files
committed
rename misleading function ms2s
1 parent 8b666d8 commit e01cef6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

autotune/data_extractor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ def getInputOutputData(logfile, axis, instance=0):
4545
log = ULog(logfile)
4646

4747
y_data = get_data(log, 'vehicle_angular_velocity', 'xyz[{}]'.format(axis))
48-
t_y_data = ms2s(get_data(log, 'vehicle_angular_velocity', 'timestamp'))
48+
t_y_data = us2s(get_data(log, 'vehicle_angular_velocity', 'timestamp'))
4949

5050
actuator_controls_n = 'actuator_controls_{}'.format(instance)
5151
u_data = get_data(log, actuator_controls_n, 'control[{}]'.format(axis))
52-
t_u_data = ms2s(get_data(log, actuator_controls_n, 'timestamp'))
52+
t_u_data = us2s(get_data(log, actuator_controls_n, 'timestamp'))
5353

5454
(t_aligned, u_aligned, y_aligned) = extract_identification_data(log, t_u_data, u_data, t_y_data, y_data, axis)
5555

@@ -67,7 +67,7 @@ def get_data(log, topic_name, variable_name, instance=0):
6767

6868
return variable_data
6969

70-
def ms2s(time_ms):
70+
def us2s(time_ms):
7171
return time_ms * 1e-6
7272

7373
def get_delta_mean(data_list):
@@ -81,7 +81,7 @@ def get_delta_mean(data_list):
8181

8282
def extract_identification_data(log, t_u_data, u_data, t_y_data, y_data, axis):
8383
status_data = get_data(log, 'autotune_attitude_control_status', 'state')
84-
t_status = ms2s(get_data(log, 'autotune_attitude_control_status', 'timestamp'))
84+
t_status = us2s(get_data(log, 'autotune_attitude_control_status', 'timestamp'))
8585

8686
len_y = len(t_y_data)
8787
len_s = len(t_status)

0 commit comments

Comments
 (0)