|
OpenCPN Partial API docs
|
Single order inifinite-impulse-response filter. More...
Go to the source code of this file.
Classes | |
| class | IirFilter |
Enumerations | |
| enum | { IIRFILTER_TYPE_LINEAR = 1 << 0 , IIRFILTER_TYPE_DEG = 1 << 1 , IIRFILTER_TYPE_RAD = 1 << 2 } |
Single order inifinite-impulse-response filter.
How to use:
To create a filter object declare on instance of iirfilter. There are 2 optional parameters to the constructor. The first (Fc) determines the filter cutoff frequency. A value of 0.5 is basically no filtering and smaller values decrease the cutoff frequency. If you think of the filter as being "fast" or "slow" then 0.5 is fastest and smaller values are "slower". The second parameter (tp) selects whether the underlying filtered values represent a linear value (such as speed) or a circular angle such as direction. The angle can be either in radians or degrees. These values can be changed on the "fly" with the setFC() and setType() methods. The main method is filter() which accepts a new unfiltered value and returns a fitered value. To obtain the most recent filter output use the get() method. Lesser used methods are getType (returns tp) and getFC() (returns FC). The reset() method resets the filter to zero.
Definition in file iir_filter.h.
| anonymous enum |
Definition at line 45 of file iir_filter.h.