ADCS.estimators.orbit_estimators.orbit_EKF module

class ADCS.estimators.orbit_estimators.orbit_EKF.Orbit_EKF(est_sat, J2000, os_hat, P_hat, Q_hat, dt=1.0)[source]

Bases: Orbit_Estimator

Extended Kalman Filter (EKF) for Satellite Orbit Determination.

This class implements a continuous-discrete Extended Kalman Filter to estimate the satellite’s state vector \(\mathbf{x} \in \mathbb{R}^6\) (ECI Position and Velocity).

The filter linearizes the non-linear orbital dynamics \(f(\mathbf{x}, t)\) (including J2 perturbations) to propagate the error covariance matrix \(\mathbf{P}\).

Parameters:
est_sat

Satellite model containing sensor specifications.

Type:

EstimatedSatellite

R

Measurement noise covariance matrix \(\mathbf{R}\).

Type:

np.ndarray

os_hat

Current state estimate \(\hat{\mathbf{x}}\) and covariance \(\mathbf{P}\).

Type:

EstimatedOrbital_State

reset(est_sat, J2000, os_hat, P_hat, Q_hat, dt=1.0)[source]

Reset the filter state and matrices.

Initializes the estimate \(\hat{\mathbf{x}}\) and constructs the measurement noise matrix \(\mathbf{R}\) based on the standard deviation of the onboard GPS sensors.

\[\mathbf{R} = \text{block\_diag}(\sigma_{GPS,1}^2 \mathbf{I}, \dots)\]
Parameters:
  • est_sat (EstimatedSatellite) – Satellite hardware model.

  • J2000 (float) – Current J2000 epoch.

  • os_hat (Orbital_State) – Initial state guess.

  • P_hat (ndarray) – Initial covariance \(\mathbf{P}\) (must be 6x6).

  • Q_hat (ndarray) – Process noise \(\mathbf{Q}\) (must be 6x6).

  • dt (float) – Time step.

Return type:

None

update(GPS_measurements, J2000)[source]

Perform the EKF Time Update and Measurement Update steps.

1. Time Update (Prediction):

Propagates the state using RK4 integration and the covariance using the state transition matrix approximation:

\[\begin{split}\hat{\mathbf{x}}_k^- &= f(\hat{\mathbf{x}}_{k-1}, u_{k-1}) \\ \mathbf{P}_k^- &= \mathbf{F}_k \mathbf{P}_{k-1} \mathbf{F}_k^T + \mathbf{Q}\end{split}\]

2. Measurement Update (Correction):

Updates the estimate using the Kalman Gain \(\mathbf{K}\) derived from the measurement residual (innovation) \(\mathbf{y}\):

\[\begin{split}\mathbf{K}_k &= \mathbf{P}_k^- \mathbf{H}^T (\mathbf{H} \mathbf{P}_k^- \mathbf{H}^T + \mathbf{R})^{-1} \\ \hat{\mathbf{x}}_k &= \hat{\mathbf{x}}_k^- + \mathbf{K}_k (\mathbf{z}_k - \mathbf{H}\hat{\mathbf{x}}_k^-) \\ \mathbf{P}_k &= (\mathbf{I} - \mathbf{K}_k \mathbf{H}) \mathbf{P}_k^-\end{split}\]
param GPS_measurements:

List of sensor measurements (Position or PV) in ECEF frame.

param J2000:

Current epoch time [s].

return:

The updated EstimatedOrbital_State.

Parameters:
  • GPS_measurements (List[ndarray])

  • J2000 (float)

Return type:

EstimatedOrbital_State