fawkes::LinearInterpolator Class Reference
Linear value interpolator. More...
#include <utils/math/interpolation/linear.h>
Inheritance diagram for fawkes::LinearInterpolator:

Public Member Functions | |
| virtual float | interpolate (float t_current, float t_end, float t_step, float v_start, float v_end) |
| Interpolate a point at a specific time. | |
Detailed Description
Linear value interpolator.The interpolator creates intermediate points given a starting and and end point and time constraints. Times are supplied in a discrete unit like miliseconds or microseconds. The values are interpolated on a straight line between the starting and the end point.
The calculation is executed with the following equation:
Definition at line 34 of file linear.h.
Member Function Documentation
| float fawkes::LinearInterpolator::interpolate | ( | float | t_current, | |
| float | t_end, | |||
| float | t_step, | |||
| float | v_start, | |||
| float | v_end | |||
| ) | [virtual] |
Interpolate a point at a specific time.
- Parameters:
-
t_current current time for which to calculate the intermediate point t_end end time/total time. The start time is always 0. t_step Time of a time slice for discrete intermediate interpolation points. Set to 1 for maximum resolution. v_start start value v_end end value
- Returns:
- interpolated value at time t_current between t_start and t_end.
Implements fawkes::Interpolator.
Definition at line 51 of file linear.cpp.
The documentation for this class was generated from the following files:
- src/libs/utils/math/interpolation/linear.h
- src/libs/utils/math/interpolation/linear.cpp

