21 template<
typename VectorT>
36 { this->
reset(initValue); }
45 average_.append(
value);
46 filteredValue_ =
value - average_.eval();
53 const VectorT &
eval()
const {
return filteredValue_; }
59 void reset(
const VectorT & initValue)
61 average_.reset(initValue);
62 filteredValue_ = initValue;
84 VectorT filteredValue_ = VectorT::Zero();
86 double saturation_ = -1;
std::optional< Eigen::VectorXd > value
void clampInPlace(double &value, double lower, double upper)
Definition: clamp.h:36
Definition: ExponentialMovingAverage.h:15
Definition: ExponentialMovingAverage.h:40
Definition: StationaryOffset.h:23
void timeConstant(double T)
Definition: StationaryOffset.h:75
const VectorT & eval() const
Definition: StationaryOffset.h:53
StationaryOffset(double dt, double timeConstant, const VectorT &initValue=VectorT::Zero())
Definition: StationaryOffset.h:34
void reset(const VectorT &initValue)
Definition: StationaryOffset.h:59
double timeConstant() const
Definition: StationaryOffset.h:68
void update(const VectorT &value)
Definition: StationaryOffset.h:43
void saturation(double limit)
Definition: StationaryOffset.h:81