29 #include "pprzlink/messages.h"
31 #include "generated/airframe.h"
33 #ifndef IST8310_CHAN_X
34 #define IST8310_CHAN_X 1
36 #ifndef IST8310_CHAN_Y
37 #define IST8310_CHAN_Y 0
39 #ifndef IST8310_CHAN_Z
40 #define IST8310_CHAN_Z 2
42 #ifndef IST8310_CHAN_X_SIGN
43 #define IST8310_CHAN_X_SIGN +
45 #ifndef IST8310_CHAN_Y_SIGN
46 #define IST8310_CHAN_Y_SIGN +
48 #ifndef IST8310_CHAN_Z_SIGN
49 #define IST8310_CHAN_Z_SIGN +
52 #if MODULE_IST8310_UPDATE_AHRS
56 #if defined IST8310_MAG_TO_IMU_PHI && defined IST8310_MAG_TO_IMU_THETA && defined IST8310_MAG_TO_IMU_PSI
57 #define USE_MAG_TO_IMU 1
60 #define USE_MAG_TO_IMU 0
70 #if MODULE_IST8310_UPDATE_AHRS && USE_MAG_TO_IMU
90 #if MODULE_IST8310_UPDATE_AHRS
116 #if MODULE_IST8310_SYNC_SEND
119 #if MODULE_IST8310_UPDATE_AHRS || MODULE_IST8310_SYNC_SEND
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
#define VECT3_COPY(_a, _b)
Main include for ABI (AirBorneInterface).
struct Imu imu
global IMU state
void ist8310_init(struct IST8310 *ist, struct i2c_periph *i2c_p, uint8_t addr)
Initialize IST8310 struct.
Default IST8310 structure.
#define IST8310_CHAN_X_SIGN
struct Int32Vect3 mag_unscaled
unscaled magnetometer measurements
void int32_rmat_vmult(struct Int32Vect3 *vb, struct Int32RMat *m_a2b, struct Int32Vect3 *va)
rotate 3D vector by rotation matrix.
void mag_ist8310_module_init(void)
void ist8310_event(struct IST8310 *ist)
void mag_ist8310_report(void)
struct Int32Vect3 mag
magnetometer measurements scaled to 1 in BFP with INT32_MAG_FRAC
Inertial Measurement Unit interface.
#define ANGLE_BFP_OF_REAL(_af)
#define IST8310_CHAN_Y_SIGN
static void ist8310_periodic(struct IST8310 *ist)
convenience function: read or start configuration if not already initialized
void imu_scale_mag(struct Imu *_imu)
struct IST8310 mag_ist8310
#define MAG_IST8310_SENDER_ID
Common code for AP and FBW telemetry.
volatile bool data_available
data ready flag
void mag_ist8310_module_event(void)
#define IST8310_CHAN_Z_SIGN
void mag_ist8310_module_periodic(void)
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
#define int32_rmat_of_eulers
Rotation matrix from Euler angles.
Module wrapper for Isentek IST8310 magnetometers.