Function navtk::utils::cubic_spline_interpolate

Function Documentation

std::pair<std::vector<Size>, std::vector<double>> navtk::utils::cubic_spline_interpolate(const std::vector<double> &orig_time_source, const std::vector<double> &data_source, const std::vector<double> &orig_time_interp)

Interpolates using cubic spline interpolation.

If source data/time is not available to interpolate for a time_interp time tag, then, that time tag is unused. The unused index is reported to the user.

Parameters
  • orig_time_source – the source time stamps to be interpolated

  • data_source – the source data to be interpolated

  • orig_time_interp – the time stamps to interpolate the data

Returns

A pair, where the first element is vector of unused indexes from time_interp, and the second element is interpolated source data.