dbetchkal / NMSIM-Python

A Python-based wrapper for Noise Model Simulation (NMSIM). Eases the creation of input files and joining data from GIS databases.
GNU General Public License v2.0
10 stars 3 forks source link

Linear interpolation will not work correctly for heading #1

Closed dbetchkal closed 3 years ago

dbetchkal commented 4 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]

Which will fail, as heading is circular. np.interp accepts a period parameter, which looks like a fine solution.

dbetchkal commented 3 years ago

Added a function interpolate_heading to main module which implements circular interpolation for heading.