|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
32 #ifndef AHRS_ICE_OUTPUT_ENABLED
33 #define AHRS_ICE_OUTPUT_ENABLED TRUE
44 #if PERIODIC_TELEMETRY
51 pprz_msg_send_FILTER(trans,
dev, AC_ID,
70 static void send_euler(
struct transport_tx *trans,
struct link_device *
dev)
73 pprz_msg_send_AHRS_EULER_INT(trans,
dev, AC_ID,
83 static void send_bias(
struct transport_tx *trans,
struct link_device *
dev)
85 pprz_msg_send_AHRS_GYRO_BIAS_INT(trans,
dev, AC_ID,
97 if (t_diff > 50000) { mde = 5; }
105 #ifndef AHRS_ICE_IMU_ID
106 #define AHRS_ICE_IMU_ID ABI_BROADCAST
112 #ifndef AHRS_ICE_MAG_ID
113 #define AHRS_ICE_MAG_ID AHRS_ICE_IMU_ID
134 uint32_t stamp __attribute__((unused)),
143 uint32_t stamp __attribute__((unused)),
152 uint32_t stamp __attribute__((unused)),
180 struct Int32RMat ltp_to_imu_rmat, ltp_to_body_rmat;
211 #if PERIODIC_TELEMETRY
struct AhrsIntCmplEuler ahrs_ice
static void set_body_state_from_euler(void)
static void send_filter(struct transport_tx *trans, struct link_device *dev)
int32_t theta
in rad with INT32_ANGLE_FRAC
int32_t q
in rad/s with INT32_RATE_FRAC
static abi_event aligner_ev
static void send_euler(struct transport_tx *trans, struct link_device *dev)
Event structure to store callbacks in a linked list.
static void aligner_cb(uint8_t sender_id, uint32_t stamp, struct Int32Rates *lp_gyro, struct Int32Vect3 *lp_accel, struct Int32Vect3 *lp_mag)
static uint8_t ahrs_ice_id
struct Int32Eulers hi_res_euler
struct Int32Rates imu_rate
#define AHRS_ICE_MAG_ID
ABI binding for magnetometer data.
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
int32_t p
in rad/s with INT32_RATE_FRAC
static void stateSetBodyRates_i(struct Int32Rates *body_rate)
Set vehicle body angular rate (int).
static void send_filter_status(struct transport_tx *trans, struct link_device *dev)
int32_t psi
in rad with INT32_ANGLE_FRAC
int32_t phi
in rad with INT32_ANGLE_FRAC
static const struct usb_device_descriptor dev
Architecture independent timing functions.
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.
static void mag_cb(uint8_t sender_id, uint32_t stamp, struct Int32Vect3 *mag)
void ahrs_ice_update_mag(struct Int32Vect3 *mag)
#define int32_rmat_of_eulers
Rotation matrix from Euler angles.
void int32_rmat_comp_inv(struct Int32RMat *m_a2b, struct Int32RMat *m_a2c, struct Int32RMat *m_b2c)
Composition (multiplication) of two rotation matrices.
struct Int32Rates gyro_bias
static void body_to_imu_cb(uint8_t sender_id, struct FloatQuat *q_b2i_f)
static void send_bias(struct transport_tx *trans, struct link_device *dev)
void ahrs_ice_update_accel(struct Int32Vect3 *accel)
void int32_rmat_transp_ratemult(struct Int32Rates *rb, struct Int32RMat *m_b2a, struct Int32Rates *ra)
rotate anglular rates by transposed rotation matrix.
static abi_event body_to_imu_ev
static bool ahrs_ice_output_enabled
if TRUE with push the estimation results to the state interface
#define AHRS_ICE_OUTPUT_ENABLED
static void accel_cb(uint8_t sender_id, uint32_t stamp, struct Int32Vect3 *accel)
static struct Int32RMat * orientationGetRMat_i(struct OrientationReps *orientation)
Get vehicle body attitude rotation matrix (int).
static bool ahrs_ice_enable_output(bool enable)
struct Int32Eulers measure
static struct Int32Eulers * stateGetNedToBodyEulers_i(void)
Get vehicle body attitude euler angles (int).
static uint32_t ahrs_ice_last_stamp
static void stateSetNedToBodyRMat_i(struct Int32RMat *ned_to_body_rmat)
Set vehicle body attitude from rotation matrix (int).
void ahrs_register_impl(AhrsEnableOutput enable)
Register an AHRS implementation.
struct Int32Eulers ltp_to_imu_euler
#define AHRS_ICE_IMU_ID
ABI binding for IMU data.
void ahrs_ice_register(void)
struct Int32Eulers residual
static void gyro_cb(uint8_t sender_id, uint32_t stamp, struct Int32Rates *gyro)
#define ABI_BROADCAST
Broadcast address.
static abi_event accel_ev
int32_t r
in rad/s with INT32_RATE_FRAC
#define DefaultPeriodic
Set default periodic telemetry.
bool ahrs_ice_align(struct Int32Rates *lp_gyro, struct Int32Vect3 *lp_accel, struct Int32Vect3 *lp_mag)
struct OrientationReps body_to_imu
void ahrs_ice_set_body_to_imu_quat(struct FloatQuat *q_b2i)
void ahrs_ice_propagate(struct Int32Rates *gyro)