mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
iir_filter.h
Go to the documentation of this file.
1 
4 #ifndef IIR_FILTER_H
5 #define IIR_FILTER_H
6 
7 #include <ros/ros.h>
8 
9 namespace mrs_lib
10 {
11 
12 class IirFilter {
13 
14 public:
21  IirFilter(const std::vector<double>& a, const std::vector<double>& b);
22  IirFilter();
23 
24  double iterate(const double input);
25 
26  std::tuple<std::vector<double>,std::vector<double>> getCoeffs();
27  std::vector<double> getBuffer();
28 
29 private:
30  std::vector<double> a_;
31  std::vector<double> b_;
32  size_t order_;
33  std::vector<double> buffer_;
34 };
35 
36 } // namespace mrs_lib
37 
38 #endif
mrs_lib::IirFilter
Definition: iir_filter.h:12
mrs_lib
All mrs_lib functions, classes, variables and definitions are contained in this namespace.
Definition: attitude_converter.h:29