AveragingFilter

abstract class AveragingFilter

Base class for an averaging filter that can be used to filter sensor data in estimators, such as accelerometer samples to obtain gravity by low-pass filtering.

Inheritors

Constructors

Link copied to clipboard
constructor(timeConstant: Double = DEFAULT_TIME_CONSTANT)

Constructor.

Types

Link copied to clipboard
object Companion

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
fun filter(valueX: Double, valueY: Double, valueZ: Double, output: DoubleArray, timestamp: Long): Boolean

Filters provided values.

Link copied to clipboard
open fun reset()

Resets this filter to its initial state.