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 a `MeasurementModel` for the use with a `KalmanFilter`.

Since:
  3.0
Version:
  $Id: DefaultMeasurementModel.java 1416643 2012-12-03 19:37:14Z tn $

### Field Summary

Fields
`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 and Description
`DefaultMeasurementModel(double[][] measMatrix, double[][] measNoise)` Create a new `MeasurementModel`, taking double arrays as input parameters for the respective measurement matrix and noise.
`DefaultMeasurementModel(RealMatrix measMatrix, RealMatrix measNoise)` Create a new `MeasurementModel`, taking `RealMatrix` objects as input parameters for the respective measurement matrix and noise.

### Method Summary

Methods
`RealMatrix` `getMeasurementMatrix()` Returns the measurement matrix.
`RealMatrix` `getMeasurementNoise()` Returns the measurement noise matrix.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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 new `MeasurementModel`, taking double arrays as input parameters for the respective measurement matrix and noise.

Parameters:
  `measMatrix` - the measurement matrix
  `measNoise` - the measurement noise matrix
Throws:
  `NullArgumentException` - if any of the input matrices is `null`
  `NoDataException` - if any row / column dimension of the input matrices is zero
  `DimensionMismatchException` - if any of the input matrices is non-rectangular

#### DefaultMeasurementModel

    public DefaultMeasurementModel(RealMatrix measMatrix,
                           RealMatrix measNoise)

Create a new `MeasurementModel`, taking `RealMatrix` objects as input parameters for the respective measurement matrix and noise.

Parameters:
  `measMatrix` - the measurement matrix
  `measNoise` - the measurement noise matrix

### Method Detail

#### getMeasurementMatrix

    public RealMatrix getMeasurementMatrix()

Returns the measurement matrix.

Specified by:
  `getMeasurementMatrix` in interface `MeasurementModel`
Returns:
  the measurement matrix

#### getMeasurementNoise

    public RealMatrix getMeasurementNoise()

Returns the measurement noise matrix. This method is called by the `KalmanFilter` every correction step, so implementations of this interface may return a modified measurement noise depending on the current iteration step.

Specified by:
  `getMeasurementNoise` in interface `MeasurementModel`
Returns:
  the measurement noise matrix
See Also:
  `KalmanFilter.correct(double[])`, `KalmanFilter.correct(org.apache.commons.math3.linear.RealVector)`