17#ifdef SAFETY_CHECKS_ENABLED
18 static bool imuInstanceCreated;
39 void read(
float* accel,
float* gyro,
float* magneto)
override;
void read(float *accel, float *gyro, float *magneto) override
Read accel, gyro, and magnetometer data into caller-owned buffers.
bool waitForReady(int timeout_ms=1000) override
Wait for the platform to report that initial orientation data is ready.
void getAngularVelocity(float *gyro) override
Read angular velocity in radians per second into a caller-owned buffer.
static std::shared_ptr< IMU > instance()
void resetIntegratedVelocity() override
Reset the platform's integrated-velocity accumulator if supported.
float getHeading() override
Return the current heading in radians using libstp sign conventions.
void getLinearAcceleration(float *linear_accel) override
Read gravity-compensated acceleration into a caller-owned buffer.
void getQuaternion(float *quat) override
Read the DMP fused orientation quaternion [w,x,y,z] into a buffer.
IMU()
Construct the platform IMU implementation.
void getIntegratedVelocity(float *vel) override
Read firmware-integrated velocity when the platform provides it.
void calibrate() override
Run whatever calibration behavior the active platform exposes.
Interface for IMU abstraction.