Template Function navtk::utils::condition_source_data
Defined in File interpolation.hpp
Function Documentation
-
template<typename T>
std::vector<Size> navtk::utils::condition_source_data(std::vector<double> &time_source, std::vector<T> &data_source, std::vector<double> &time_interp) Modifies vector inputs so that they can be used to generate a valid interpolation.
Inputs are sorted in time; elements with identical time tags are removed, keeping only the first occurrence; and
time_interpelements that do not overlap withtime_sourceelements are removed.- Parameters
time_source – The base times, size N.
data_source – The interpolation base data, size N.
time_interp – The times to interpolate to.
- Throws
std::runtime_error – if
time_source.size() != data_source.size()ordata_source.size < 2and the error mode is ErrorMode::DIE for either case.- Returns
A vector of indices of elements that were removed from the sorted
time_interpvector due to being duplicates or not overlapping withtime_source.