Package-level declarations

Signal filters: EMAFilter (exponential moving average), MedianFilter (moving-window median), SlewRateLimiter (rate-of-change limiting), and KalmanFilter (fuses a LinearModel with noisy measurements for optimal state estimation).

Types

Link copied to clipboard
class Debouncer @JvmOverloads constructor(var debounceTimeSeconds: Double, var type: Debouncer.DebounceType = DebounceType.RISING)

A simple debounce filter for boolean streams. Requires that the boolean change value from baseline for a specified period of time before the filtered value changes.

Link copied to clipboard
class EdgeCounterFilter(var requiredEdges: Int, var windowTimeSeconds: Double)

A rising edge counter for boolean streams. Requires that the boolean change value to true for a specified number of times within a specified time window after the first rising edge before the filtered value changes.

Link copied to clipboard
class EMAFilter(val alpha: Double)
Link copied to clipboard
class KalmanFilter<States : Nat, Inputs : Nat, Outputs : Nat> @JvmOverloads constructor(val plant: LinearModel<States, Inputs, Outputs>, val stateStdDevs: Vector<States>, val measurementStdDevs: Vector<Outputs>, dt: Double = 0.05)

A Kalman filter for linear state estimation.

Link copied to clipboard
class MedianFilter(size: Int)

A class that implements a moving-window median filter. Useful for reducing measurement noise, especially with processes that generate occasional, extreme outliers (such as values from vision processing, LIDAR, or ultrasonic sensors).

Link copied to clipboard
class SlewRateLimiter @JvmOverloads constructor(var positiveRateLimit: Double, var negativeRateLimit: Double, initialValue: Double = 0.0)

A class that limits the rate of change of an input value. Useful for implementing voltage, setpoint, and/or output ramps. A slew-rate limit is most appropriate when the quantity being controlled is a velocity or a voltage.