Template class for time-series signals with interpolation, extrapolation, and derivative capabilities.
More...
|
| | Signal () |
| | Default constructor initializing with LINEAR interpolation, ZEROS extrapolation, and DIRTY derivative.
|
| |
| | Signal (const Signal &other) |
| | Copy constructor.
|
| |
| Signal< T, TangentSignalSpec, TangentSignalSpec > | dotSignal () |
| | Create a new signal representing the time derivative of this signal.
|
| |
| double | t () const |
| | Get the current time of the signal.
|
| |
| BaseType | operator() () const |
| | Get the current signal value.
|
| |
| TangentType | dot () const |
| | Get the current time derivative of the signal.
|
| |
| BaseType | operator() (const double &t) const |
| | Get the signal value at a specific time using interpolation/extrapolation.
|
| |
| TangentType | dot (const double &t) const |
| | Get the signal derivative at a specific time using interpolation/extrapolation.
|
| |
| std::vector< BaseType > | operator() (const std::vector< double > &t) const |
| | Get signal values at multiple time points.
|
| |
| std::vector< TangentType > | dot (const std::vector< double > &t) const |
| | Get signal derivatives at multiple time points.
|
| |
| void | setInterpolationMethod (InterpolationMethod method) |
| | Set the interpolation method for this signal.
|
| |
| void | setExtrapolationMethod (ExtrapolationMethod method) |
| | Set the extrapolation method for this signal.
|
| |
| void | setDerivativeMethod (DerivativeMethod method) |
| | Set the derivative computation method for this signal.
|
| |
| void | reset () |
| | Reset the signal to initial state, clearing all history.
|
| |
| bool | update (const double &_t, const BaseType &_x, bool insertHistory=false) |
| | Update the signal with a new value at a given time, computing derivative automatically.
|
| |
| bool | update (const double &_t, const BaseType &_x, const TangentType &_xdot, bool insertHistory=false) |
| | Update the signal with a new value and derivative at a given time.
|
| |
| bool | update (const std::vector< double > &_tHistory, const std::vector< BaseType > &_xHistory) |
| | Update the signal with a history of values, computing derivatives automatically.
|
| |
| bool | update (const std::vector< double > &_tHistory, const std::vector< BaseType > &_xHistory, const std::vector< TangentType > &_xdotHistory) |
| | Update the signal with a history of values and derivatives.
|
| |
|
| template<typename S, typename BSS, typename TSS> |
| Signal< S, BSS, TSS > | operator+ (const Signal< S, BSS, TSS > &l, const Signal< S, TSS, TSS > &r) |
| |
| template<typename S, typename BSS, typename TSS> |
| Signal< S, TSS, TSS > | operator- (const Signal< S, BSS, TSS > &l, const Signal< S, BSS, TSS > &r) |
| |
| template<typename S, typename BSS, typename TSS> |
| Signal< S, BSS, TSS > | operator* (const double &l, const Signal< S, BSS, TSS > &r) |
| |
| template<typename S, typename BSS, typename TSS> |
| Signal< S, BSS, TSS > | operator* (const Signal< S, BSS, TSS > &l, const double &r) |
| |
template<typename T, typename BaseSignalSpec, typename TangentSignalSpec>
class Signal< T, BaseSignalSpec, TangentSignalSpec >
Template class for time-series signals with interpolation, extrapolation, and derivative capabilities.
The Signal class represents a time-varying signal that stores both the value and its time derivative. It supports various interpolation methods for querying values at arbitrary time points, configurable extrapolation behavior outside the defined time range, and automatic derivative computation.
- Template Parameters
-
| BaseSignalSpec | Type specification for the signal values (can be scalar, vector, or manifold types). |
| TangentSignalSpec | Type specification for the signal derivatives (typically vector types). |
Example usage:
mySignal.
update(1.0, 5.0,
true);
mySignal.
update(2.0, 7.0,
true);
double interpValue = mySignal(1.5);
ScalarSignal< double > ScalardSignal
Definition Signal.h:939
@ LINEAR
Definition Signal.h:19
void setInterpolationMethod(InterpolationMethod method)
Set the interpolation method for this signal.
Definition Signal.h:228
bool update(const double &_t, const BaseType &_x, bool insertHistory=false)
Update the signal with a new value at a given time, computing derivative automatically.
Definition Signal.h:270