33 #include "generated/airframe.h"
81 #if !defined IMU_BODY_TO_IMU_PHI && !defined IMU_BODY_TO_IMU_THETA && !defined IMU_BODY_TO_IMU_PSI
82 #define IMU_BODY_TO_IMU_PHI 0
83 #define IMU_BODY_TO_IMU_THETA 0
84 #define IMU_BODY_TO_IMU_PSI 0
87 #if !defined IMU_GYRO_P_NEUTRAL && !defined IMU_GYRO_Q_NEUTRAL && !defined IMU_GYRO_R_NEUTRAL
88 #define IMU_GYRO_P_NEUTRAL 0
89 #define IMU_GYRO_Q_NEUTRAL 0
90 #define IMU_GYRO_R_NEUTRAL 0
93 #if !defined IMU_ACCEL_X_NEUTRAL && !defined IMU_ACCEL_Y_NEUTRAL && !defined IMU_ACCEL_Z_NEUTRAL
94 #define IMU_ACCEL_X_NEUTRAL 0
95 #define IMU_ACCEL_Y_NEUTRAL 0
96 #define IMU_ACCEL_Z_NEUTRAL 0
99 #if !defined IMU_GYRO_P_SIGN & !defined IMU_GYRO_Q_SIGN & !defined IMU_GYRO_R_SIGN
100 #define IMU_GYRO_P_SIGN 1
101 #define IMU_GYRO_Q_SIGN 1
102 #define IMU_GYRO_R_SIGN 1
104 #if !defined IMU_ACCEL_X_SIGN & !defined IMU_ACCEL_Y_SIGN & !defined IMU_ACCEL_Z_SIGN
105 #define IMU_ACCEL_X_SIGN 1
106 #define IMU_ACCEL_Y_SIGN 1
107 #define IMU_ACCEL_Z_SIGN 1
109 #if !defined IMU_MAG_X_SIGN & !defined IMU_MAG_Y_SIGN & !defined IMU_MAG_Z_SIGN
110 #define IMU_MAG_X_SIGN 1
111 #define IMU_MAG_Y_SIGN 1
112 #define IMU_MAG_Z_SIGN 1
void imu_SetBodyToImuCurrent(float set)
void imu_SetBodyToImuTheta(float theta)
struct Int32Vect3 accel_neutral
accelerometer bias
struct Int32Rates gyro_prev
previous gyroscope measurements
void imu_SetBodyToImuPsi(float psi)
bool_t b2i_set_current
flag for adjusting body_to_imu via settings.
void imu_ResetBodyToImu(float reset)
struct Int32Rates gyro_neutral
gyroscope bias
struct Int32Vect3 mag_unscaled
unscaled magnetometer measurements
struct Int32Rates gyro_unscaled
unscaled gyroscope measurements
struct Int32Vect3 accel
accelerometer measurements in m/s^2 in BFP with INT32_ACCEL_FRAC
void imu_scale_gyro(struct Imu *_imu)
Paparazzi floating point algebra.
struct Imu imu
global IMU state
void imu_scale_mag(struct Imu *_imu)
struct Int32Vect3 mag_neutral
magnetometer neutral readings (bias)
struct Int32Vect3 mag
magnetometer measurements scaled to 1 in BFP with INT32_MAG_FRAC
struct OrientationReps body_to_imu
rotation from body to imu frame
void imu_SetBodyToImuPhi(float phi)
struct Int32Vect3 accel_prev
previous accelerometer measurements
void imu_periodic(void)
optional.
struct Int32Vect3 accel_unscaled
unscaled accelerometer measurements
void imu_scale_accel(struct Imu *_imu)
abstract IMU interface providing fixed point interface
Generic orientation representation and conversions.
void imu_impl_init(void)
must be defined by underlying hardware
Paparazzi fixed point algebra.
struct Int32Rates gyro
gyroscope measurements in rad/s in BFP with INT32_RATE_FRAC