MedianAveragingFilter

class MedianAveragingFilter(timeConstant: Double = DEFAULT_TIME_CONSTANT) : AveragingFilter

Median averaging filter. Computes median values using a filter with a length equal to: ceil(1.0 / dt * timeConstant), where dt is the time interval between samples. For typical default values: dt = 0.02 (%0Hz) and timeConstant = 0.1. Consequently FIR length is 5 samples.

Constructors

Link copied to clipboard
constructor(input: MedianAveragingFilter)

Copy constructor.

constructor(timeConstant: Double = DEFAULT_TIME_CONSTANT)

Properties

Link copied to clipboard

Gets a constant relative to the period between consecutive samples to determine the cut frequency of the low-pass filter. If not specified by default this is 0.1

Functions

Link copied to clipboard

Makes a deep copy from provided filter into this instance.

Link copied to clipboard

Makes a deep copy to provided filter from this instance.

Link copied to clipboard
fun filter(valueX: Double, valueY: Double, valueZ: Double, output: DoubleArray, timestamp: Long): Boolean

Filters provided values.

Link copied to clipboard
open override fun reset()

Resets this filter to its initial state.