|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
30 #include "pprzlink/messages.h"
32 #include "generated/airframe.h"
34 #ifndef HMC58XX_CHAN_X
35 #define HMC58XX_CHAN_X 0
37 #ifndef HMC58XX_CHAN_Y
38 #define HMC58XX_CHAN_Y 1
40 #ifndef HMC58XX_CHAN_Z
41 #define HMC58XX_CHAN_Z 2
43 #ifndef HMC58XX_CHAN_X_SIGN
44 #define HMC58XX_CHAN_X_SIGN +
46 #ifndef HMC58XX_CHAN_Y_SIGN
47 #define HMC58XX_CHAN_Y_SIGN +
49 #ifndef HMC58XX_CHAN_Z_SIGN
50 #define HMC58XX_CHAN_Z_SIGN +
53 #if MODULE_HMC58XX_UPDATE_AHRS
57 #if defined HMC58XX_MAG_TO_IMU_PHI && defined HMC58XX_MAG_TO_IMU_THETA && defined HMC58XX_MAG_TO_IMU_PSI
58 #define USE_MAG_TO_IMU 1
61 #define USE_MAG_TO_IMU 0
71 #if MODULE_HMC58XX_UPDATE_AHRS && USE_MAG_TO_IMU
91 #if MODULE_HMC58XX_UPDATE_AHRS
117 #if MODULE_HMC58XX_SYNC_SEND
120 #if MODULE_HMC58XX_UPDATE_AHRS || MODULE_HMC58XX_SYNC_SEND
void mag_hmc58xx_module_periodic(void)
struct Hmc58xx mag_hmc58xx
void hmc58xx_event(struct Hmc58xx *hmc)
#define HMC58XX_CHAN_Z_SIGN
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
void mag_hmc58xx_report(void)
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
#define ANGLE_BFP_OF_REAL(_af)
static void hmc58xx_periodic(struct Hmc58xx *hmc)
convenience function: read or start configuration if not already initialized
#define HMC58XX_CHAN_X_SIGN
#define int32_rmat_of_eulers
Rotation matrix from Euler angles.
#define MAG_HMC58XX_SENDER_ID
struct Imu imu
global IMU state
Common code for AP and FBW telemetry.
void hmc58xx_init(struct Hmc58xx *hmc, struct i2c_periph *i2c_p, uint8_t addr)
Initialize Hmc58xx struct and set default config options.
void int32_rmat_vmult(struct Int32Vect3 *vb, struct Int32RMat *m_a2b, struct Int32Vect3 *va)
rotate 3D vector by rotation matrix.
void imu_scale_mag(struct Imu *_imu)
void mag_hmc58xx_module_event(void)
struct Int32Vect3 mag
magnetometer measurements scaled to 1 in BFP with INT32_MAG_FRAC
struct Int32Vect3 mag_unscaled
unscaled magnetometer measurements
volatile bool data_available
data ready flag
void mag_hmc58xx_module_init(void)
#define HMC58XX_CHAN_Y_SIGN
#define VECT3_COPY(_a, _b)