ssapy_toolkit.Orbital_Mechanics.orbital_accel_model_comparisons

SSAPy acceleration-ladder runner + accel-ladder-specific divergence dashboard.

Design in this file:
  • calculate_accel_comparisons(): the ONE function that does all propagation + math

  • make_accel_ladder_dashboard_figures(): plotting only (always called)

  • compare_models(): workflow wrapper that calls exactly:
    1. calculate_accel_comparisons()

    2. make_accel_ladder_dashboard_figures()

    (no optional plotting; make_plots is always True)

Early-stop behavior:
  • If SSAPy terminates early (e.g., collision/event), r_hist/v_hist will be shorter than times.

  • We truncate all rungs to the common prefix length (minimum length across rungs) so comparisons remain aligned. We also return per-rung stop indices/times.

Dashboard:
  • Figure 1: time-domain comparisons (divergence vs ref, incremental per rung, worst-rung NTW)
    • time-domain model lines alternate solid/dashed to help reveal overlaps

    • includes a top-left text box with the initial Keplerian elements (in ax[0])

  • Figure 2: rung-summary with:
    1. final ||dr|| vs ref by rung (colored points + colored rung index annotations)

    2. final ||dr_inc|| by rung (colored points + colored rung index annotations)

    3. heatmap of log10(||dr|| vs ref) with color-coded rung index y-tick labels

    plus a header area above the subplots:
    • LEFT: accel ladder key with color-coded indices (figure-level, left aligned)

    • RIGHT: initial Keplerian elements (figure-level, top-right)

Notes:
  • Log plots use a floor epsilon_m (default 1 mm = 1e-3 m).

  • Heatmap colorbar is capped at max_error_m (default 1e7 m).

Functions

calculate_accel_comparisons([orbit, r, v, ...])

All propagation + all divergence math in ONE function.

compare_models([orbit, r, v, t0, times, ...])

Workflow wrapper:

make_accel_ladder_dashboard_figures(calc[, ...])

Plot-only: builds the two dashboard figures from calculate_accel_comparisons() output.

ssapy_toolkit.Orbital_Mechanics.orbital_accel_model_comparisons.calculate_accel_comparisons(orbit=None, r=None, v=None, t0=None, times=None, assume_times='auto', ode_kwargs=None, reference=None, mu_m3s2=398600441800000.0)[source]

All propagation + all divergence math in ONE function.

Returns a dict containing:
  • labels, reference

  • times_ssapy, t_rel_s (aligned to common prefix), t_rel_s_full

  • r_list, v_list (aligned)

  • early-stop metadata: stop_idx, stop_t_s, common_len

  • orbit elements + text

  • divergence arrays/metrics: drn_vs_ref, drn_inc, final_drn_vs_ref, final_drn_inc, worst_idx, ntw_worst, final_ntw_abs

ssapy_toolkit.Orbital_Mechanics.orbital_accel_model_comparisons.compare_models(orbit=None, r=None, v=None, t0=None, times=None, assume_times='auto', ode_kwargs=None, reference=None, plot_title='SSAPy accel ladder divergences', show_legend=True, epsilon_m=0.001, max_error_m=10000000.0, mu_m3s2=398600441800000.0)[source]
Workflow wrapper:
  • always computes

  • always plots

  • only calls:
    1. calculate_accel_comparisons()

    2. make_accel_ladder_dashboard_figures()

ssapy_toolkit.Orbital_Mechanics.orbital_accel_model_comparisons.make_accel_ladder_dashboard_figures(calc, plot_title='SSAPy accel ladder divergences', show_legend=True, epsilon_m=0.001, max_error_m=10000000.0)[source]

Plot-only: builds the two dashboard figures from calculate_accel_comparisons() output.