navlie.filters.CubatureKalmanFilter¶
- class navlie.filters.CubatureKalmanFilter(process_model: ProcessModel, reject_outliers=False, iterate_mean=True)¶
Bases:
SigmaPointKalmanFilter
- Parameters:
process_model (ProcessModel) – process model to be used in the prediction step
method (str) –
- method to generate the sigma points. Options are
’unscented’: unscented sigma points ‘cubature’: cubature sigma points ‘gh’: Gauss-hermite sigma points
reject_outliers (bool, optional) – whether to apply the NIS test to measurements, by default False
iterate_mean (bool, optional) – whether to compute the mean state with sigma points or by propagating check {x_{k-1}} on the process model
- process_model¶
- method¶
- reject_outliers¶
- iterate_mean¶
- correct(x: StateWithCovariance, y: Measurement, u: Input, reject_outlier: bool | None = None) → StateWithCovariance¶
Fuses an arbitrary measurement to produce a corrected state estimate.
- Parameters:
x (StateWithCovariance) – The current state estimate.
u (VectorInput) – Most recent input, to be used to predict the state forward if the measurement stamp is larger than the state stamp.
y (Measurement) – Measurement to be fused into the current state estimate.
reject_outlier (bool, optional) – Whether to apply the NIS test to this measurement, by default None, in which case the value of
self.reject_outliers
will be used.
- Returns:
The corrected state estimate
- Return type:
- predict(x: StateWithCovariance, u: Input, dt: float | None = None, input_covariance: ndarray | None = None) → StateWithCovariance¶
Propagates the state forward in time using a process model. The user must provide the current state, input, and time interval
Note
If the time interval
dt
is not provided in the arguments, it will be taken as the difference between the input stamp and the state stamp.- Parameters:
x (StateWithCovariance) – The current state estimate.
u (Input) – Input measurement to be given to process model
dt (float, optional) – Duration to next time step. If not provided, dt will be calculated with
dt = u.stamp - x.state.stamp
.input_covariance (np.ndarray, optional) – Covariance associated to the inpu measurement. If not provided, it will be grabbed from u.covariance
- Returns:
New predicted state
- Return type: