Common Types¶
Configuration, observation, and record types used by the estimation filters.
Observation ¶
FilterRecord ¶
Record of a single filter update step.
Contains pre-fit and post-fit states, covariances, residuals, and Kalman gain.
Initialize instance.
covariance_predicted property ¶
covariance_predicted: ndarray
Covariance before measurement update (after prediction).
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: Predicted covariance matrix. |
covariance_updated property ¶
covariance_updated: ndarray
Covariance after measurement update.
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: Updated covariance matrix. |
postfit_residual property ¶
postfit_residual: ndarray
Post-fit residual: z - h(x_updated).
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: Post-fit residual vector. |
prefit_residual property ¶
prefit_residual: ndarray
Pre-fit residual: z - h(x_predicted).
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: Pre-fit residual vector. |
EKFConfig ¶
ProcessNoiseConfig ¶
Process noise configuration for sequential filters.
Controls how process noise Q is applied to the predicted covariance.
Example
Initialize instance.
MeasurementModel ¶
Base class for Python-defined measurement models.
Subclass this to define custom measurement models that work with the EKF. You must implement predict(), noise_covariance(), measurement_dim(), and name(). Override jacobian() to provide an analytical Jacobian; return None to use automatic finite-difference computation.
Example
Initialize instance.
jacobian method descriptor ¶
Compute measurement Jacobian H = dh/dx.
Override this method to provide an analytical Jacobian. Return None to use automatic finite-difference computation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epoch | Epoch | Current epoch. | required |
state | ndarray | Current state vector. | required |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray or None: Jacobian matrix, or None for finite-diff. |
measurement_dim method descriptor ¶
measurement_dim() -> int
Get measurement vector dimension.
Override this method in your subclass.
Returns:
| Name | Type | Description |
|---|---|---|
int | int | Measurement dimension. |
name method descriptor ¶
name() -> str
Get human-readable model name.
Override this method in your subclass.
Returns:
| Name | Type | Description |
|---|---|---|
str | str | Model name. |
noise_covariance method descriptor ¶
noise_covariance() -> ndarray
Get measurement noise covariance R.
Override this method in your subclass.
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: Noise covariance matrix (m x m). |
predict method descriptor ¶
See Also¶
- Estimation Guide - Concepts and workflows
- Custom Models Guide - Implementing MeasurementModel in Python