test_celestialTwoBodyPoint

test_celestialTwoBodyPoint.computeCelestialTwoBodyPoint(R_P1, v_P1, a_P1, R_P2, v_P2, a_P2)[source]

Compute analytic truth from relative states expressed in N-frame components.

test_celestialTwoBodyPoint.test_celestialTwoBodyPointTestFunction(show_plots)[source]

Module Unit Test

test_celestialTwoBodyPoint.test_reference_derivatives(secondary_mode, sample_time)[source]

Check the published rate and acceleration with central finite differences.

Bodies follow straight-line trajectories, consistent with the module’s zero-relative-acceleration assumption. The moving-secondary case reproduces issue 1618. The remaining cases exercise the fallback reference with an absent, parallel, or antiparallel secondary direction. Each case is sampled at two times with a reference frame that is not aligned with N.

Differentiate the output attitude basis to check omega_RN_N, then differentiate the output rate to check domega_RN_N. Neither check uses the analytic truth helper or the module’s acceleration equations.

test_celestialTwoBodyPoint.test_secBodyCelestialTwoBodyPointTestFunction(show_plots)[source]

Module Unit Test