Closed dbetchkal closed 3 years ago
In the GPS-to-Trajectory notebook: cell 1, line 281 is currently: hi = np.linspace(row.heading, data.loc[next_ind, "heading"], interpSteps)[1:-1]
hi = np.linspace(row.heading, data.loc[next_ind, "heading"], interpSteps)[1:-1]
Which will fail, as heading is circular. np.interp accepts a period parameter, which looks like a fine solution.
np.interp
Added a function interpolate_heading to main module which implements circular interpolation for heading.
interpolate_heading
In the GPS-to-Trajectory notebook: cell 1, line 281 is currently:
hi = np.linspace(row.heading, data.loc[next_ind, "heading"], interpSteps)[1:-1]
Which will fail, as heading is circular.
np.interp
accepts a period parameter, which looks like a fine solution.