29 #include "pprzlink/messages.h"
31 #include "generated/airframe.h"
35 #define RM3100_CHAN_X 0
38 #define RM3100_CHAN_Y 1
41 #define RM3100_CHAN_Z 2
43 #ifndef RM3100_CHAN_X_SIGN
44 #define RM3100_CHAN_X_SIGN +
46 #ifndef RM3100_CHAN_Y_SIGN
47 #define RM3100_CHAN_Y_SIGN +
49 #ifndef RM3100_CHAN_Z_SIGN
50 #define RM3100_CHAN_Z_SIGN +
53 #ifndef RM3100_DATA_RATE
54 #define RM3100_DATA_RATE RM3100_TMRC_DEFAULT
58 #define RM3100_ADDR RM3100_ADDR0
61 #if MODULE_RM3100_UPDATE_AHRS
63 #if defined RM3100_MAG_TO_IMU_PHI && defined RM3100_MAG_TO_IMU_THETA && defined RM3100_MAG_TO_IMU_PSI
64 #define USE_MAG_TO_IMU 1
67 #define USE_MAG_TO_IMU 0
77 #if MODULE_RM3100_UPDATE_AHRS && USE_MAG_TO_IMU
97 #if MODULE_RM3100_UPDATE_AHRS
118 #if MODULE_RM3100_SYNC_SEND
121 #if MODULE_RM3100_UPDATE_AHRS || MODULE_RM3100_SYNC_SEND
Main include for ABI (AirBorneInterface).
#define MAG_RM3100_SENDER_ID
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
Common code for AP and FBW telemetry.
#define VECT3_COPY(_a, _b)
#define ANGLE_BFP_OF_REAL(_af)
#define int32_rmat_of_eulers
Rotation matrix from Euler angles.
void int32_rmat_vmult(struct Int32Vect3 *vb, struct Int32RMat *m_a2b, struct Int32Vect3 *va)
rotate 3D vector by rotation matrix.
void mag_rm3100_module_init(void)
void mag_rm3100_module_periodic(void)
#define RM3100_CHAN_X_SIGN
void mag_rm3100_report(void)
#define RM3100_CHAN_Z_SIGN
void mag_rm3100_module_event(void)
#define RM3100_CHAN_Y_SIGN
Module wrapper for PNI RM3100 magnetometers.
void rm3100_init(struct Rm3100 *mag, struct i2c_periph *i2c_p, uint8_t addr, uint8_t data_rate)
void rm3100_event(struct Rm3100 *mag)
static void rm3100_periodic(struct Rm3100 *mag)
convenience function: read or start configuration if not already initialized
volatile bool data_available
data ready flag
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
int int32_t
Typedef defining 32 bit int type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.