Class Imu¶
Defined in File imu.h
Inheritance Relationships¶
Base Type¶
public lupnt::Device(Class Device)
Class Documentation¶
-
class Imu : public lupnt::Device¶
Onboard inertial measurement unit (IMU) device: simulates gyro (angular rate) and accelerometer measurements with bias and noise driven by
ImuDynamics.Attached to a satellite/rover
Agent(e.g. as the"imu"device) to generateImuMeasurements that feedImuDynamics-based attitude/state propagation and navigation filters (EKF/UKF) for inertial state estimation.Public Functions
-
Imu()¶
-
virtual void Step(Real t) override¶
Propagate the IMU’s bias/state from the last step to time
tand generate a newImuMeasurement(gyro + accelerometer reading).Called periodically by the
Simulationevent scheduler (perDevice::Setup) at the IMU’s configuredfrequency_. Propagatesstate_viadynamics_->Propagate, looks up noise parameters formodel_viaGetParameters, samples gyro angular-ratew[rad/s] and accelerometer specific-forcea[m/s^2] about the current bias with white-noise scaled by1/sqrt(t - time_), updatestime_, and logs the result. OverridesDevice::Step.- Parameters:
t – Simulation time of this step [s]; must be
>=the time of the previousStep
-
virtual void Setup() override¶
IMU device setup; currently a no-op.
-
ImuMeasurement GetMeasurement(Real t)¶
Get the IMU measurement (gyro angular rate [rad/s] and accelerometer specific force [m/s^2]) at time
t.
-
inline std::vector<ImuMeasurement> GetData() const¶
Get all
ImuMeasurements accumulated since the lastEmptyDatacall.
-
inline void EmptyData()¶
Clear the buffered IMU measurement history.
-
virtual void Log(Real time) override¶
Log the IMU’s current state/measurement to the simulation’s
DataLoggeroutput. OverridesDevice::Log; currently a no-op.
Public Static Functions
-
static ImuParameters GetParameters(ImuModel imu_model)¶
Look up the noise/bias-stability parameters (accelerometer and gyroscope white-noise and bias-random-walk standard deviations) for a given
ImuModel(e.g.LN200S), used byStepto sample measurement noise.- Parameters:
imu_model – IMU hardware model to look up
- Returns:
Noise parameters:
sigma_a[m/s^2 /sqrt(Hz)],sigma_a_bias[m/s^2 sqrt(Hz)],sigma_w[rad/s /sqrt(Hz)],sigma_w_bias[rad/s sqrt(Hz)]
-
Imu()¶