Public Member Functions | Private Attributes | List of all members
sr_math_utils::filters::LowPassFilter Class Reference

#include <sr_math_utils.hpp>

Public Member Functions

std::pair< double, double > compute (double q, double timestamp)
 
 LowPassFilter (double tau=0.05)
 

Private Attributes

double dt
 
bool is_first
 
double q_prev
 
double tau
 
double timestamp_1
 
std::pair< double, double > value_derivative
 

Detailed Description

Definition at line 158 of file sr_math_utils.hpp.

Constructor & Destructor Documentation

sr_math_utils::filters::LowPassFilter::LowPassFilter ( double  tau = 0.05)
inlineexplicit

Definition at line 161 of file sr_math_utils.hpp.

Member Function Documentation

std::pair<double, double> sr_math_utils::filters::LowPassFilter::compute ( double  q,
double  timestamp 
)
inline

Computes the filtered value and its derivative.

Parameters
qthe newly received value.
timestampthe time at which the last measurement was made (in sec).
Returns
a pair containing the filtered value first, then the derivative.

Definition at line 178 of file sr_math_utils.hpp.

Member Data Documentation

double sr_math_utils::filters::LowPassFilter::dt
private

Definition at line 210 of file sr_math_utils.hpp.

bool sr_math_utils::filters::LowPassFilter::is_first
private

Definition at line 206 of file sr_math_utils.hpp.

double sr_math_utils::filters::LowPassFilter::q_prev
private

Definition at line 210 of file sr_math_utils.hpp.

double sr_math_utils::filters::LowPassFilter::tau
private

Definition at line 210 of file sr_math_utils.hpp.

double sr_math_utils::filters::LowPassFilter::timestamp_1
private

Definition at line 210 of file sr_math_utils.hpp.

std::pair<double, double> sr_math_utils::filters::LowPassFilter::value_derivative
private

Definition at line 212 of file sr_math_utils.hpp.


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


sr_utilities
Author(s): Ugo Cupcic
autogenerated on Tue Oct 13 2020 03:55:49