Class Kalman
Estimates a true value from noisy readings.
public sealed class Kalman : IDisposable
- Inheritance
-
Kalman
- Implements
- Inherited Members
Remarks
The filter trusts the model and the sensor in proportion to how noisy each is, so it settles faster than a plain average without chasing every spike.
Constructors
Kalman(float, float, float)
Creates a filter from the noise levels and a first guess.
public Kalman(float processNoise, float measurementNoise, float initial)
Parameters
processNoisefloatHow much the true value is expected to drift.
measurementNoisefloatHow noisy the sensor is.
initialfloatThe first guess at the true value.
Properties
Estimate
Gets the current estimate.
public float Estimate { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Update(float)
Folds a reading in and returns the new estimate.
public float Update(float reading)
Parameters
readingfloatThe latest raw reading.
Returns
- float
The updated estimate.