OneEuroFilter provides a mechanism for filtering noisy signals with a one euro filter algorithm. It extends the OneEuroFilterBase class.

Hierarchy

  • OneEuroFilterBase
    • OneEuroFilter

Constructors

Properties

beta: number
dcutoff: number
dx: LowPassFilter
frequency: number
lastcutoff: number
lasttime: number
minCutoff: number
x: LowPassFilter

Methods

  • Calculates the alpha value used for smoothing in the filter, based on a cutoff frequency.

    Parameters

    • cutoff: number

      The cutoff frequency at which the filter should attenuate the signal.

    Returns number

    The calculated alpha value for the filter.

  • Applies the filter to the given value using the current filter configuration and updates the internal state.

    Parameters

    • value: number

      The new value to be filtered.

    • timestamp: number

      The timestamp associated with the value, used to calculate the dynamic parameters of the filter.

    Returns number

    The filtered value after applying the filter's algorithm.

  • Resets the internal state to uninitialized.

    Returns void