Package org.apache.commons.math3.filter
Class DefaultMeasurementModel
- java.lang.Object
-
- org.apache.commons.math3.filter.DefaultMeasurementModel
-
- All Implemented Interfaces:
MeasurementModel
public class DefaultMeasurementModel extends java.lang.Object implements MeasurementModel
Default implementation of aMeasurementModel
for the use with aKalmanFilter
.- Since:
- 3.0
-
-
Field Summary
Fields Modifier and Type Field Description private RealMatrix
measurementMatrix
The measurement matrix, used to associate the measurement vector to the internal state estimation vector.private RealMatrix
measurementNoise
The measurement noise covariance matrix.
-
Constructor Summary
Constructors Constructor Description DefaultMeasurementModel(double[][] measMatrix, double[][] measNoise)
Create a newMeasurementModel
, taking double arrays as input parameters for the respective measurement matrix and noise.DefaultMeasurementModel(RealMatrix measMatrix, RealMatrix measNoise)
Create a newMeasurementModel
, takingRealMatrix
objects as input parameters for the respective measurement matrix and noise.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RealMatrix
getMeasurementMatrix()
Returns the measurement matrix.RealMatrix
getMeasurementNoise()
Returns the measurement noise matrix.
-
-
-
Field Detail
-
measurementMatrix
private RealMatrix measurementMatrix
The measurement matrix, used to associate the measurement vector to the internal state estimation vector.
-
measurementNoise
private RealMatrix measurementNoise
The measurement noise covariance matrix.
-
-
Constructor Detail
-
DefaultMeasurementModel
public DefaultMeasurementModel(double[][] measMatrix, double[][] measNoise) throws NullArgumentException, NoDataException, DimensionMismatchException
Create a newMeasurementModel
, taking double arrays as input parameters for the respective measurement matrix and noise.- Parameters:
measMatrix
- the measurement matrixmeasNoise
- the measurement noise matrix- Throws:
NullArgumentException
- if any of the input matrices isnull
NoDataException
- if any row / column dimension of the input matrices is zeroDimensionMismatchException
- if any of the input matrices is non-rectangular
-
DefaultMeasurementModel
public DefaultMeasurementModel(RealMatrix measMatrix, RealMatrix measNoise)
Create a newMeasurementModel
, takingRealMatrix
objects as input parameters for the respective measurement matrix and noise.- Parameters:
measMatrix
- the measurement matrixmeasNoise
- the measurement noise matrix
-
-
Method Detail
-
getMeasurementMatrix
public RealMatrix getMeasurementMatrix()
Returns the measurement matrix.- Specified by:
getMeasurementMatrix
in interfaceMeasurementModel
- Returns:
- the measurement matrix
-
getMeasurementNoise
public RealMatrix getMeasurementNoise()
Returns the measurement noise matrix. This method is called by theKalmanFilter
every correction step, so implementations of this interface may return a modified measurement noise depending on the current iteration step.- Specified by:
getMeasurementNoise
in interfaceMeasurementModel
- Returns:
- the measurement noise matrix
- See Also:
KalmanFilter.correct(double[])
,KalmanFilter.correct(org.apache.commons.math3.linear.RealVector)
-
-