digitalFilter.h
Go to the documentation of this file.
1 /*
2  * ----------------------------------------------------------------------------
3  * "THE BEER-WARE LICENSE" (Revision 42):
4  * As long as you retain this notice you can do whatever you want with this
5  * stuff. If we meet some day, and you think this stuff is worth it, you can
6  * buy me a beer in return.
7  * - Joe Romano and Will McMahan
8  * ----------------------------------------------------------------------------
9  */
10 //@author Joe Romano
11 //@author Will McMahan
12 //@email joeromano@gmail.com
13 //@brief digitalFilter.h - class to create IIR and FIR digital filter
14 // coefficients in the Matlab (2010) style. This style being vectors
15 // of coefficients for the numberator (b) and denominator (a)
16 // respectively.
17 // Please refer to the matlab documentation page for implementation
18 // details: http://www.mathworks.com/access/helpdesk/help/techdoc/ref/filter.html
19 
20 #ifndef _DIGITALFILTER_H_
21 #define _DIGITALFILTER_H_
22 
24 {
25 
26 public:
27  // Constructors
28  digitalFilter(int filterOrder_userdef, bool isIIR);
29  digitalFilter(int filterOrder_userdef, bool isIIR, float *b_userdef, float *a_userdef);
30 
31  ~digitalFilter(void); // Destructor
32 
33  float getNextFilteredValue(float u_current);
34 
35 protected:
36  float *a, *b; // filter coefficients
37  float *u, *x; // filter input and output states
38 
39 private:
41  bool IIR;
42 
43 };
44 
45 #endif
46 
digitalFilter(int filterOrder_userdef, bool isIIR)
float getNextFilteredValue(float u_current)


pr2_gripper_sensor_controller
Author(s): Joe Romano
autogenerated on Wed Apr 1 2020 03:58:23