Kalman

open class Kalman

A basic 1D Kalman filter that estimates state from a model and sensor over time.

Constructors

Link copied to clipboard
constructor(R: Double, Q: Double)
Construct a new 1D Kalman filter.

Properties

Link copied to clipboard
open var Q: Double
Higher values of Q trusts the external sensor more.
Link copied to clipboard
open var R: Double
Higher values of R puts more trust in the model.

Functions

Link copied to clipboard
open fun calculate(absModel: Double, sensor: Double): Double
Calculate a new Kalman filter estimate.
Link copied to clipboard
open fun calculateFromDelta(incModel: Double, sensor: Double): Double
Calculate a new Kalman filter estimate.
Link copied to clipboard
open fun reset()
Resets the accumulated system state to zero.
Link copied to clipboard
open fun resetVariance()
Reset the projected model variance to 1.
Link copied to clipboard
Sets the accumulated running value.
Link copied to clipboard
open fun setVariance(var: Double)
Set an initial guess of the model's variance.