mc_filter::StationaryOffset< VectorT > Struct Template Reference

#include <mc_filter/StationaryOffset.h>

Public Member Functions

 StationaryOffset (double dt, double timeConstant, const VectorT &initValue=VectorT::Zero())
 
void update (const VectorT &value)
 
const VectorT & eval () const
 
void reset (const VectorT &initValue)
 
double timeConstant () const
 
void timeConstant (double T)
 
void saturation (double limit)
 

Detailed Description

template<typename VectorT>
struct mc_filter::StationaryOffset< VectorT >

Remove stationary offset from an input signal.

Expects VectorT to act as a vector (typically Eigen::Vector3d), supporting:

  • VectorT::Zero() static member function
  • VectorT::setZero() member
  • VectorT should also respect the requirements of ExponentialMovingAverage

Constructor & Destructor Documentation

◆ StationaryOffset()

template<typename VectorT >
mc_filter::StationaryOffset< VectorT >::StationaryOffset ( double  dt,
double  timeConstant,
const VectorT &  initValue = VectorT::Zero() 
)
inline

Constructor.

Parameters
dtTime in [s] between two readings.
timeConstantLength of recent-past window used to evaluate the stationary offset.
initValueInitial value of the input signal.

Member Function Documentation

◆ eval()

template<typename VectorT >
const VectorT& mc_filter::StationaryOffset< VectorT >::eval ( ) const
inline

Get output value where the stationary offset has been filtered.

◆ reset()

template<typename VectorT >
void mc_filter::StationaryOffset< VectorT >::reset ( const VectorT &  initValue)
inline

Reset everything to an initial value

Parameters
initValueInitial value from which to restart the filter.

◆ saturation()

template<typename VectorT >
void mc_filter::StationaryOffset< VectorT >::saturation ( double  limit)
inline

Set output saturation; disable by providing a negative value.

Parameters
limitOutput will saturate between -limit and +limit.

◆ timeConstant() [1/2]

template<typename VectorT >
double mc_filter::StationaryOffset< VectorT >::timeConstant ( ) const
inline

Get time constant of the filter.

◆ timeConstant() [2/2]

template<typename VectorT >
void mc_filter::StationaryOffset< VectorT >::timeConstant ( double  T)
inline

Update time constant.

Parameters
TNew time constant of the filter.

◆ update()

template<typename VectorT >
void mc_filter::StationaryOffset< VectorT >::update ( const VectorT &  value)
inline

Update input signal value.

Parameters
valueNew value.

The documentation for this struct was generated from the following file: