Skip to content

Commit b38167d

Browse files
committed
autotune: don't fail in case airspeed data contains NANs
This sometimes occurs at the end of the log
1 parent d490a89 commit b38167d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

autotune/data_extractor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ def resampleIdentificationData(t_u_data, u_data, t_y_data, y_data, t_v_data, v_d
161161
v_aligned = []
162162

163163
if len(v_data) > 0:
164+
v_data = np.nan_to_num(v_data, nan=1000)
164165
v_aligned = resample_interp(t_v_data, v_data, t_aligned)
165166

166167
return (t_aligned, u_aligned, y_aligned, v_aligned)

0 commit comments

Comments
 (0)