class
EmaFilter
Contents
Base classes
- class Filter
Constructors, destructors, conversion operators
- EmaFilter(double ialpha) explicit
- Exponential moving average filter.
Public functions
Protected variables
- double alpha
- double output
- double lastOutput
Function documentation
okapi:: EmaFilter:: EmaFilter(double ialpha) explicit
Exponential moving average filter.
Parameters | |
---|---|
ialpha | alpha gain |
double okapi:: EmaFilter:: filter(double ireading) override
Filters a value, like a sensor reading.
Returns | filtered result |
---|
double okapi:: EmaFilter:: getOutput() const override
Returns the previous output from filter.
Returns | the previous output from filter |
---|
void okapi:: EmaFilter:: setGains(double ialpha) virtual
Set filter gains.
Parameters | |
---|---|
ialpha | alpha gain |