ExponentialFilter

class ExponentialFilter(val smoothing: Double)

Basic noise filter. Works by setting the state based on the following equation:

S = S*a + (1-a) * d;

S: State

a: Smoothing coefficient

d: New (noisy) data

Parameters

smoothing

Smoothing coefficient from 0-1. 0 is no smoothing and 1 is flat(data isn't added)

Constructors

Link copied to clipboard
constructor(smoothing: Double)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun update(data: Double)

Update the filter with new data