test_imu_sensor

test_imu_sensor.test_imuDeltaVIgnoresRotationOfAccumulatedDeltaV()[source]

A rotation of the spacecraft must not turn the delta v accumulated before the last IMU call into a new delta v.

The input message holds 100 m/s of delta v accumulated before the first IMU call, filled the way spacecraft fills it. The spacecraft then rotates by 10 deg without any new delta v, so the IMU must output zero. In a third call the spacecraft gains 2 m/s along the inertial y axis, which the IMU must output in the current platform frame.

test_imu_sensor.test_imuDeltaVWithSpacecraft(r_BcB_B, sensorPos_B, accuracy)[source]

The IMU delta v must match the non-gravitational change of the sensor velocity when it runs slower than spacecraft.

A spinning spacecraft in LEO is pushed by a constant inertial force and then coasts. The IMU runs every 10 s and the dynamics every 1 s. The truth over each IMU interval is the analytic delta v of the force, F/m times the burn time in the interval, plus the change of the sensor velocity relative to the center of mass, resolved in the current platform frame. With the sensor at the center of mass the output must be zero during the coast. The accuracy [m/s] of the offset case is set by the RK4 integration error of the spacecraft states.

Parameters:
  • r_BcB_B (list) – [m] hub center of mass location in the body frame

  • sensorPos_B (list) – [m] IMU location in the body frame

  • accuracy (float) – [m/s] accuracy of the delta v of each IMU interval

test_imu_sensor.test_imuResetDiscardsPreviousState()[source]

After a call to Reset() the IMU must not difference the new state against the state recorded before the reset.

The IMU runs twice on a state with 100 m/s of accumulated delta v, a rotated attitude and a sensor velocity relative to the center of mass. The state is then set back to zero, as after a restart of the simulation, and the IMU is reset. The first call after the reset must output a zero message, and the next call must only see the delta v accumulated after the reset.

test_imu_sensor.test_unitSimIMU(show_plots, testCase, stopTime, procRate, gyroLSBIn, accelLSBIn, senRotMaxIn, senTransMaxIn, senRotNoiseStd, senTransNoiseStd, errorBoundsGyroIn, errorBoundsAccelIn, senRotBiasIn, senTransBiasIn, accuracy)[source]

Module Unit Test