sweepOrbitDt

Integrator-step sweep for scenarioCompareOrbit.

Repeats the approximately two-orbit Keplerian comparison over a ladder of RK4 steps at one common, exactly aligned final epoch to separate the two error sources the base scenario reports at a single dt:

  1. the per-engine error against the analytic Kepler solution, expected to shrink as \(dt^4\) (RK4 truncation); and

  2. the cross-engine BSM-vs-MuJoCo difference, expected to be dt-independent (formulation/round-off seeded, not time-stepping).

Results are written to results/sweepOrbitDt.json.

sweepOrbitDt.comparisonRow(dt, tf, recordDt, bsmTimes, mujocoTimes, posBSM, posMujoco, truth)[source]

Validate one sweep rung and compute its position-error metrics.

Parameters:
  • dt (float) – RK4 integration step [s].

  • tf (float) – requested propagation horizon [s].

  • recordDt (float) – recorder sampling interval [s].

  • bsmTimes (array-like) – BSM sample timestamps [s].

  • mujocoTimes (array-like) – MuJoCo sample timestamps [s].

  • posBSM (array-like) – BSM inertial positions [m].

  • posMujoco (array-like) – MuJoCo inertial positions [m].

  • truth (array-like) – analytic inertial positions at bsmTimes [m].

Returns:

integration step and maximum analytic/cross-engine position errors.

Return type:

dict

Raises:

ValueError – if either history is incomplete, malformed, or sampled at timestamps different from the other engine.

sweepOrbitDt.run(dts=(40.0, 20.0, 10.0, 5.0, 2.5), simDuration=None, recordDt=60.0, saveJson=True, resultsDir=None)[source]

Run the step-size sweep and return the generated metrics.

Parameters:
  • dts (sequence, optional) – RK4 integration steps [s].

  • simDuration (float, optional) – propagation horizon [s]. Defaults to two periods of the configured orbit.

  • recordDt (float, optional) – recorder sampling interval [s].

  • saveJson (bool, optional) – write sweepOrbitDt.json. Defaults to True.

  • resultsDir (str, optional) – explicit artifact directory. Defaults to the scenario results folder.

Returns:

sweep configuration, error rows, and fitted truncation orders.

Return type:

dict