|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
30 #ifndef AHRS_INT_UTILS_H
31 #define AHRS_INT_UTILS_H
44 const float fphi = atan2f(-accel->
y, -accel->
z);
51 const float ftheta = atan2f(-cphi_ax, -accel->
z);
66 const int32_t mn = ctheta * mag->
x + sphi_stheta * mag->
y + cphi_stheta * mag->
z;
67 const int32_t me = 0 * mag->
x + cphi * mag->
y - sphi * mag->
z;
73 const float mag_dec = atan2(-AHRS_H_Y, AHRS_H_X);
74 const float fpsi = atan2f(-me, mn) - mag_dec;
int32_t theta
in rad with INT32_ANGLE_FRAC
#define MAGS_FLOAT_OF_BFP(_ef, _ei)
#define PPRZ_ITRIG_COS(_c, _a)
Paparazzi fixed point algebra.
int32_t psi
in rad with INT32_ANGLE_FRAC
int32_t phi
in rad with INT32_ANGLE_FRAC
#define ANGLE_BFP_OF_REAL(_af)
#define INT_MULT_RSHIFT(_a, _b, _r)
#define QUAT_BFP_OF_REAL(_qi, _qf)
static void ahrs_int_get_quat_from_accel_mag(struct Int32Quat *q, struct Int32Vect3 *accel, struct Int32Vect3 *mag)
static void ahrs_float_get_quat_from_accel(struct FloatQuat *q, struct FloatVect3 *accel)
Compute a quaternion representing roll and pitch from an accelerometer measurement.
static void ahrs_int_get_euler_from_accel_mag(struct Int32Eulers *e, struct Int32Vect3 *accel, struct Int32Vect3 *mag)
#define ACCELS_FLOAT_OF_BFP(_ef, _ei)
static void ahrs_float_get_quat_from_accel_mag(struct FloatQuat *q, struct FloatVect3 *accel, struct FloatVect3 *mag)
static void ahrs_int_get_quat_from_accel(struct Int32Quat *q, struct Int32Vect3 *accel)
#define INT32_ANGLE_NORMALIZE(_a)
#define PPRZ_ITRIG_SIN(_s, _a)