30 #include <Eigen/Dense> 48 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
57 inline void add(
const Eigen::Vector3d & value,
double dt)
59 integral_ = (1. - rate_ * dt) * integral_ + dt * value;
69 inline const Eigen::Vector3d &
eval()
const 111 inline void saturate()
113 for(
unsigned i = 0; i < 3; i++)
115 if(integral_(i) < -saturation_)
117 integral_(i) = -saturation_;
119 else if(integral_(i) > saturation_)
121 integral_(i) = saturation_;
127 Eigen::Vector3d integral_ = Eigen::Vector3d::Zero();
129 double saturation_ = -1.;
void setZero()
Reset integral to zero.
double rate() const
Get leak rate.
void saturation(double s)
Set output saturation.
void rate(double rate)
Set the leak rate of the integrator.
const Eigen::Vector3d & eval() const
Evaluate the output of the integrator.
Utility functions and classes.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW void add(const Eigen::Vector3d &value, double dt)
Add constant input for a fixed duration.