test_magneticFieldStepLag

Test that the magnetic field base class evaluates the spacecraft state extrapolated to the step midpoint.

test_magneticFieldStepLag.test_field_is_evaluated_at_extrapolated_position()[source]

Verify the field uses the state advanced by half of the message age.

A state with a radial velocity, written at the start of the simulation and rewritten one step later, must give the field of the position advanced by v * dt / 2; the field decays with the cube of the radius so the advanced and static fields differ measurably.

test_magneticFieldStepLag.test_translating_planet_does_not_change_the_field()[source]

Verify the spacecraft and the planet are evaluated at the same epoch.

The spacecraft and the planet move together at 30 km/s, so the relative position and the field are constant.