Table of Contents

Class Kalman

Namespace
Pamoja.Kit
Assembly
Pamoja.Kit.dll

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

processNoise float

How much the true value is expected to drift.

measurementNoise float

How noisy the sensor is.

initial float

The first guess at the true value.

Properties

Estimate

Gets the current estimate.

public float Estimate { get; }

Property Value

float

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

reading float

The latest raw reading.

Returns

float

The updated estimate.