Click or drag to resize
Accord.NET (logo)

KalmanFilter2D Class

Kalman filter for 2D coordinate systems.
Inheritance Hierarchy
SystemObject
  Accord.Statistics.RunningKalmanFilter2D

Namespace:  Accord.Statistics.Running
Assembly:  Accord.Statistics (in Accord.Statistics.dll) Version: 3.8.0
Syntax
[SerializableAttribute]
public class KalmanFilter2D : IRunning<DoublePoint>, 
	IRunning<double[]>
Request Example View Source

The KalmanFilter2D type exposes the following members.

Constructors
  NameDescription
Public methodKalmanFilter2D
Initializes a new instance of the KalmanFilter2D class.
Public methodKalmanFilter2D(Double, Double, Double)
Initializes a new instance of the KalmanFilter2D class.
Top
Properties
  NameDescription
Public propertyNoiseX
Gets or sets the observational noise of the current object's in the X axis.
Public propertyNoiseY
Gets or sets the observational noise of the current object's in the Y axis.
Public propertyX
Gets or sets the current X position of the object.
Public propertyXAxisVelocity
Gets or sets the current object's velocity in the X axis.
Public propertyY
Gets or sets the current Y position of the object.
Public propertyYAxisVelocity
Gets or sets the current object's velocity in the Y axis.
Top
Methods
  NameDescription
Public methodClear
Clears all measures previously computed.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodPush(Double)
Registers the occurrence of a value.
Public methodPush(DoublePoint)
Registers the occurrence of a value.
Public methodPush(Double, Double)
Registers the occurrence of a value.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodIsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Public Extension MethodTo(Type)Overloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Public Extension MethodToTOverloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Top
Remarks
Examples
// Let's say we have the following sequence of coordinate points:
double[] x = Vector.Range(0.0, 100.0); // z(t) = (t, 4.2*t + noise)
double[] y = x.Apply(x_i => 4.2 * x_i + Generator.Random.NextDouble());

// Create a new Kalman filter
var kf = new KalmanFilter2D();

// Push the points into the filter
for (int i = 0; i < x.Length; i++)
    kf.Push(x[i], y[i]);

// Estimate the points location
double newX = kf.X; // should be 99.004000000912569
double newY = kf.Y; // should be 415.99224675780607

// Estimate the points velocity
double velX = kf.XAxisVelocity; // should be 1.0020000004925984
double velY = kf.YAxisVelocity; // should be 4.1356394152821094
See Also