Public Member Functions | Protected Attributes | List of all members
sr_math_utils::filters::AlphaBetaFilter Class Reference

#include <sr_math_utils.hpp>

Public Member Functions

 AlphaBetaFilter (double alpha=0.85, double beta=0.05)
 
std::pair< double, double > compute (double xm, double timestamp)
 

Protected Attributes

double a
 
double b
 
double dt
 
double rk
 
double timestamp_1
 
std::pair< double, double > value_derivative
 
double vk
 
double vk_1
 
double xk
 
double xk_1
 

Detailed Description

An alpha beta filter as described on: http://en.wikipedia.org/wiki/Alpha_beta_filter

Definition at line 220 of file sr_math_utils.hpp.

Constructor & Destructor Documentation

sr_math_utils::filters::AlphaBetaFilter::AlphaBetaFilter ( double  alpha = 0.85,
double  beta = 0.05 
)
inlineexplicit

Definition at line 223 of file sr_math_utils.hpp.

Member Function Documentation

std::pair<double, double> sr_math_utils::filters::AlphaBetaFilter::compute ( double  xm,
double  timestamp 
)
inline

Computes the filtered value and its derivative.

Parameters
xmthe 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 240 of file sr_math_utils.hpp.

Member Data Documentation

double sr_math_utils::filters::AlphaBetaFilter::a
protected

Definition at line 260 of file sr_math_utils.hpp.

double sr_math_utils::filters::AlphaBetaFilter::b
protected

Definition at line 260 of file sr_math_utils.hpp.

double sr_math_utils::filters::AlphaBetaFilter::dt
protected

Definition at line 265 of file sr_math_utils.hpp.

double sr_math_utils::filters::AlphaBetaFilter::rk
protected

Definition at line 264 of file sr_math_utils.hpp.

double sr_math_utils::filters::AlphaBetaFilter::timestamp_1
protected

Definition at line 265 of file sr_math_utils.hpp.

std::pair<double, double> sr_math_utils::filters::AlphaBetaFilter::value_derivative
protected

Definition at line 267 of file sr_math_utils.hpp.

double sr_math_utils::filters::AlphaBetaFilter::vk
protected

Definition at line 264 of file sr_math_utils.hpp.

double sr_math_utils::filters::AlphaBetaFilter::vk_1
protected

Definition at line 264 of file sr_math_utils.hpp.

double sr_math_utils::filters::AlphaBetaFilter::xk
protected

Definition at line 264 of file sr_math_utils.hpp.

double sr_math_utils::filters::AlphaBetaFilter::xk_1
protected

Definition at line 264 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