Skip to content

structs.ekf_data

Settings of the extended Kalman filter.

EKFSettings

Settings of the extended Kalman filter.

The state is propagated with the nonlinear dynamics fx, the covariance with their Jacobian A.

create(A, H, Q, R, fx, hx) classmethod

Create the settings from the Jacobians, the noise covariances, and the model.

Parameters:

Name Type Description Default
A Array

The Jacobian of the continuous dynamics w.r.t. the state.

required
H Array

The Jacobian of the observation function w.r.t. the state.

required
Q Array

The process noise covariance.

required
R Array

The measurement noise covariance.

required
fx Callable[[Array, Array, Array, Array, Array, Array, Array | None, Array | None], tuple[Array, Array, Array, Array, Array | None]]

The continuous dynamics function.

required
hx Callable[[Array, Array, Array, Array, Array, Array, Array | None, Array | None], Array]

The observation function.

required

Returns:

Type Description
EKFSettings

The settings.

Source code in drone_estimators/structs/ekf_data.py
@classmethod
def create(
    cls,
    A: Array,
    H: Array,
    Q: Array,
    R: Array,
    fx: Callable[
        [Array, Array, Array, Array, Array, Array, Array | None, Array | None],
        tuple[Array, Array, Array, Array, Array | None],
    ],
    hx: Callable[[Array, Array, Array, Array, Array, Array, Array | None, Array | None], Array],
) -> EKFSettings:
    """Create the settings from the Jacobians, the noise covariances, and the model.

    Args:
        A: The Jacobian of the continuous dynamics w.r.t. the state.
        H: The Jacobian of the observation function w.r.t. the state.
        Q: The process noise covariance.
        R: The measurement noise covariance.
        fx: The continuous dynamics function.
        hx: The observation function.

    Returns:
        The settings.
    """
    return cls(A, H, Q, R, fx, hx)