1€ filter for Arduino 1.0.0
Algorithm to filter noisy signals for high precision and responsiveness.
Loading...
Searching...
No Matches
Public Member Functions
OneEuroFilter Class Reference

Public Member Functions

 OneEuroFilter (float freq=DEFAULT_FREQUENCY, float mincutoff=DEFAULT_MINCUTOFF, float beta_=DEFAULT_BETA, float dcutoff=DEFAULT_DCUTOFF)
 
void begin (float freq, float mincutoff=1.0, float beta_=0.0, float dcutoff=1.0)
 Creates the filter and set its parameters.
 
void setFrequency (float f)
 Sets the frequency of the signal.
 
void setMinCutoff (float mc)
 Sets the filter min cutoff frequency.
 
void setBeta (float b)
 Sets the Beta parameter.
 
float filter (float value, TimeStamp timestamp=UndefinedTime)
 Filter the noisy signal.
 

Member Function Documentation

◆ begin()

void OneEuroFilter::begin ( float  freq,
float  mincutoff = 1.0,
float  beta_ = 0.0,
float  dcutoff = 1.0 
)

Creates the filter and set its parameters.

Parameters
freqAn estimate of the frequency in Hz of the signal (> 0), if timestamps are not available.
mincutoffMin cutoff frequency in Hz (> 0). Lower values allow to remove more jitter.
beta_Parameter to reduce latency (> 0).
dcutoffUsed to filter the derivates. 1 Hz by default. Change this parameter if you know what you are doing.

◆ filter()

float OneEuroFilter::filter ( float  value,
TimeStamp  timestamp = UndefinedTime 
)

Filter the noisy signal.

Parameters
valueNoisy value to filter
timestamp(optional) timestamp in seconds
Returns
The filtered value

◆ setBeta()

void OneEuroFilter::setBeta ( float  b)

Sets the Beta parameter.

Parameters
bParameter to reduce latency (> 0).

◆ setFrequency()

void OneEuroFilter::setFrequency ( float  f)

Sets the frequency of the signal.

Parameters
fAn estimate of the frequency in Hz of the signal (> 0), if timestamps are not available.

◆ setMinCutoff()

void OneEuroFilter::setMinCutoff ( float  mc)

Sets the filter min cutoff frequency.

Parameters
mcMin cutoff frequency in Hz (> 0). Lower values allow to remove more jitter.

The documentation for this class was generated from the following file: