ADCS.helpers.plotting.plot_orbit_estimator module

ADCS.helpers.plotting.plot_orbit_estimator.plot_gps_error(time_hist, true_hist, est_hist)[source]

Plot true, estimated, and error time histories for GPS-based position and velocity.

This function generates a 3×2 grid of subplots comparing true and estimated orbital position and velocity components over time. In each subplot, the estimation error (estimated minus true) is also shown, enabling direct assessment of navigation performance.

State Decomposition

The true and estimated orbital state histories are assumed to be structured as

\[\mathbf{x} = \begin{bmatrix} x & y & z & \dot{x} & \dot{y} & \dot{z} \end{bmatrix}^T\]

where:

  • \((x, y, z)\) are Cartesian position components

  • \((\dot{x}, \dot{y}, \dot{z})\) are Cartesian velocity components

Position components are converted from meters to kilometers for plotting, while velocity components are assumed to already be expressed in km/s.

Error Definition

For each state component \(s_i\), the estimation error is defined as

\[e_i(t) = \hat{s}_i(t) - s_i(t)\]

where \(\hat{s}_i\) is the estimated value and \(s_i\) is the true value.

Visualization Layout

The six subplots are arranged as follows:

Position X

Position Y

Position Z

Velocity X

Velocity Y

Velocity Z

Each subplot includes: * True state (solid line) * Estimated state (dashed line) * Estimation error (dotted line)

Intended Use

This visualization is particularly useful for evaluating GPS navigation filters, orbit determination algorithms, and estimator convergence behavior.

param time_hist:

One-dimensional array of time stamps in seconds.

type time_hist:

numpy.ndarray

param true_hist:

True orbital state history with columns [x, y, z, vx, vy, vz].

type true_hist:

numpy.ndarray

param est_hist:

Estimated orbital state history with the same layout as true_hist.

type est_hist:

numpy.ndarray

return:

None. The function generates a Matplotlib figure.

rtype:

None