mc_filter::LowPassCompose< T > Struct Template Reference

#include <mc_filter/LowPassCompose.h>

Public Member Functions

 LowPassCompose (double dt, double period=0)
 
double cutoffPeriod () const
 
void cutoffPeriod (double period)
 
void reset (const T &value)
 
void update (const T &newValue_hp, const T &newValue_lp)
 
const T & eval () const
 
const T & input_lp () const
 
const T & input_hp () const
 
double dt () const
 
void dt (double dt)
 

Protected Attributes

double dt_ = 0.005
 

Detailed Description

template<typename T>
struct mc_filter::LowPassCompose< T >

Compose filter of Low-pass and High-pass filter from two series of measurements.

Expects T to have:

  • T::Zero() static method (e.g Eigen::Vector3d, etc)

Constructor & Destructor Documentation

◆ LowPassCompose()

template<typename T >
mc_filter::LowPassCompose< T >::LowPassCompose ( double  dt,
double  period = 0 
)
inline

Constructor with cutoff period.

Parameters
dtSampling period.
periodCutoff period.

Member Function Documentation

◆ cutoffPeriod() [1/2]

template<typename T >
double mc_filter::LowPassCompose< T >::cutoffPeriod ( ) const
inline

Get cutoff period of the high pass filter.

◆ cutoffPeriod() [2/2]

template<typename T >
void mc_filter::LowPassCompose< T >::cutoffPeriod ( double  period)
inline

Set cutoff period.

Parameters
periodNew cutoff period.
Note
period is explicitely enforced to respect the Nyquist–Shannon sampling theorem, that is T is at least 2*timestep.

◆ dt() [1/2]

template<typename T >
double mc_filter::LowPassCompose< T >::dt ( ) const
inline

Get sampling period.

◆ dt() [2/2]

template<typename T >
void mc_filter::LowPassCompose< T >::dt ( double  dt)
inline

Set sampling period.

Parameters
dtSampling period.
Note
the cutoff period is updated to satisfy the Nyquist–Shannon sampling theorem according the new sampling period.

◆ eval()

template<typename T >
const T& mc_filter::LowPassCompose< T >::eval ( ) const
inline

Get filtered velocity.

◆ input_hp()

template<typename T >
const T& mc_filter::LowPassCompose< T >::input_hp ( ) const
inline

◆ input_lp()

template<typename T >
const T& mc_filter::LowPassCompose< T >::input_lp ( ) const
inline

◆ reset()

template<typename T >
void mc_filter::LowPassCompose< T >::reset ( const T &  value)
inline

Reset position to an initial rest value.

Parameters
posNew position.

◆ update()

template<typename T >
void mc_filter::LowPassCompose< T >::update ( const T &  newValue_hp,
const T &  newValue_lp 
)
inline

Update estimate from new two sources

Parameters
newValue_hpNew observed value filtered throught high pass.
newValue_lpNew observed value filtered throught low pass.

Member Data Documentation

◆ dt_

template<typename T >
double mc_filter::LowPassCompose< T >::dt_ = 0.005
protected

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