|
Fang-Robotics-MCB
Fang Robotics Team Codebase
|
DiscreteFilter class implements a discrete-time filter using the finite difference equation. More...
#include <discrete_filter.hpp>
Public Member Functions | |
| DiscreteFilter (std::array< T, SIZE > &naturalResponseCoefficients, std::array< T, SIZE > &forcedResponseCoefficients) | |
| Constructor for the DiscreteFilter class. | |
| T | filterData (float dat) |
| Filters the input data using the finite difference equation. | |
| T | getLastFiltered () |
| Returns the last filtered value. | |
| T | reset () |
| Resets the filter's state to zero, keeps the coefficients | |
DiscreteFilter class implements a discrete-time filter using the finite difference equation.
| SIZE | The size of the filter coefficients. |
This class provides methods to filter input data using the finite difference equation and maintain the internal state of the filter.
|
inline |
Constructor for the DiscreteFilter class.
| [in] | naturalResponseCoefficients | The coefficients for the natural response (a). |
| [in] | forcedResponseCoefficients | The coefficients for the forced response (b). |
This constructor initializes the filter with the given coefficients and resets the filter state to zero.
|
inline |
Filters the input data using the finite difference equation.
| [in] | dat | The input data to be filtered. |
This function implements a discrete-time filter using the finite difference equation. It updates the internal state of the filter based on the input data and returns the filtered output.
|
inline |
Returns the last filtered value.
|
inline |
Resets the filter's state to zero, keeps the coefficients