16#ifndef UTILS_INTERPOLATOR_H
17#define UTILS_INTERPOLATOR_H
55 int16
setData(
const floating_point* x_array_ptr,
const floating_point* y_array_ptr, uint32 size);
81 int16
interpolate(floating_point x, floating_point& y_out);
84 const floating_point* _x_array_ptr =
nullptr;
85 const floating_point* _y_array_ptr =
nullptr;
88 uint32 _last_bottom = 0;
90 floating_point _slope = 0.0;
A class for performing simple x-y linear interpolation.
Definition Interpolator.h:42
int16 setData(const floating_point *x_array_ptr, const floating_point *y_array_ptr, uint32 size)
Sets the data for the interpolator.
Definition Interpolator.cpp:19
int16 interpolate(floating_point x, floating_point &y_out)
Performs linear interpolation given an x-value.
Definition Interpolator.cpp:70
floating_point getMinX() const
Returns the minimum x-value from the stored data.
Definition Interpolator.cpp:53
floating_point getMaxX() const
Returns the maximum x-value from the stored data.
Definition Interpolator.cpp:61
Definition CircularBuffer.hpp:28