ADCS.helpers.plot.control.targetplot module¶
- class ADCS.helpers.plot.control.targetplot.TargetHistogram(*, title='Final Tracking Error Distribution', units='deg', threshold=1.0, bin_width=0.5, show_stats=True)[source]¶
Bases:
SubplotHistogram of final target tracking errors across simulation runs.
This subplot aggregates the final angular tracking error from each run in a simulation ensemble and displays their distribution as a histogram. Errors are computed using the final entry of
state_histandtarget_histfor each run.Both quaternion targets and vector direction targets are supported. For quaternion targets, the attitude error angle is computed. For vector targets, the angular separation between the spacecraft boresight and the target direction in ECI is used.
Optional summary statistics may be displayed directly on the plot, including minimum, maximum, mean, median, and the percentage of runs below a specified error threshold.
This class integrates with the ADCS plotting framework via
Subplot.- Parameters:
title (str) – Title displayed at the top of the histogram.
units (str) – Units used for angular error display.
threshold (float) – Error threshold used for percentage statistics.
bin_width (float) – Width of histogram bins.
show_stats (bool) – If True, display summary statistics on the plot.
- Returns:
None
- Return type:
None
- class ADCS.helpers.plot.control.targetplot.TargetPlot(*, time='time_s', title='Target Tracking', units='deg', modes=None, sample_index=-1)[source]¶
Bases:
SubplotComparison plot for spacecraft target tracking performance.
This subplot visualizes angular errors between spacecraft attitude or boresight directions and commanded targets over time. Targets are read from
sim.target_histand may encode either desired directions or full attitude quaternions.Two target encodings are supported:
Target row format
Interpretation
[nan, tx, ty, tz]
Direction target expressed in ECI
[q0, q1, q2, q3]
Desired attitude quaternion (Body to ECI)
Depending on the selected modes, the plot computes one or more angular error time series:
real_target compares the true spacecraft state against the target.
est_target compares the estimated spacecraft state against the target.
real_est compares true and estimated spacecraft boresight directions.
directions3d renders a 3D snapshot of directions at a selected sample.
This class integrates with the ADCS plotting framework via
Subplotand supports multi-run Monte Carlo simulations by overlaying individual runs with reduced opacity.- Parameters:
time (str) – Name of the simulation attribute containing the time vector.
title (str) – Title displayed at the top of the plot.
units (str) – Units used for angular error display.
modes (list[str] or None) – List of comparison modes to display.
sample_index (int) – Sample index used for the 3D direction snapshot.
- Returns:
None
- Return type:
None