30 #include <Eigen/Dense> 58 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
82 void append(
const Eigen::Vector3d & value)
95 const Eigen::Vector3d &
eval()
const 103 const Eigen::Vector3d &
raw()
const 149 T = std::max(T, 2 *
dt_);
160 for(
unsigned i = 0; i < 3; i++)
174 Eigen::Vector3d
average_ = Eigen::Vector3d::Zero();
Exponential Moving Average.
double timeConstant() const
Get time constant of the filter.
Eigen::Vector3d rawValue_
const Eigen::Vector3d & eval() const
Evaluate the smoothed statistic.
const Eigen::Vector3d & raw() const
Last raw value provided to the integrator.
void append(const Eigen::Vector3d &value)
Append a new reading to the series.
void reset()
Reset average to zero.
void saturation(double limit)
Set output saturation; disable by providing a negative value.
void setZero()
Reset average to zero.
Utility functions and classes.
void timeConstant(double T)
Update time constant.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW ExponentialMovingAverage(double dt, double timeConstant, const Eigen::Vector3d &initValue=Eigen::Vector3d::Zero())
Constructor.