Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ins_float_invariant_wrapper.c File Reference

Paparazzi specific wrapper to run INVARIANT filter. More...

#include "subsystems/ins/ins_float_invariant_wrapper.h"
#include "subsystems/abi.h"
#include "mcu_periph/sys_time.h"
#include "message_pragmas.h"
+ Include dependency graph for ins_float_invariant_wrapper.c:

Go to the source code of this file.

Macros

#define INS_FINV_FILTER_ID   2
 
#define INS_FINV_BARO_ID   ABI_BROADCAST
 baro More...
 
#define INS_FINV_IMU_ID   ABI_BROADCAST
 IMU (gyro, accel) More...
 
#define INS_FINV_MAG_ID   ABI_BROADCAST
 magnetometer More...
 

Functions

static void baro_cb (uint8_t sender_id, float pressure)
 
static void gyro_cb (uint8_t sender_id, uint32_t stamp, struct Int32Rates *gyro)
 Call ins_float_invariant_propagate on new gyro measurements. More...
 
static void accel_cb (uint8_t sender_id, uint32_t stamp, struct Int32Vect3 *accel)
 
static void mag_cb (uint8_t sender_id, uint32_t stamp, struct Int32Vect3 *mag)
 
static void aligner_cb (uint8_t sender_id, uint32_t stamp, struct Int32Rates *lp_gyro, struct Int32Vect3 *lp_accel, struct Int32Vect3 *lp_mag)
 
static void body_to_imu_cb (uint8_t sender_id, struct FloatQuat *q_b2i_f)
 
static void geo_mag_cb (uint8_t sender_id, struct FloatVect3 *h)
 
static void gps_cb (uint8_t sender_id, uint32_t stamp, struct GpsState *gps_s)
 
void ins_float_invariant_register (void)
 

Variables

static struct Int32Vect3 ins_finv_accel
 last accel measurement More...
 
static uint32_t ins_finv_last_stamp = 0
 last gyro msg timestamp More...
 
static abi_event baro_ev
 
static abi_event mag_ev
 
static abi_event gyro_ev
 
static abi_event accel_ev
 
static abi_event aligner_ev
 
static abi_event body_to_imu_ev
 
static abi_event geo_mag_ev
 
static abi_event gps_ev
 

Detailed Description

Paparazzi specific wrapper to run INVARIANT filter.

Definition in file ins_float_invariant_wrapper.c.

Macro Definition Documentation

#define INS_FINV_BARO_ID   ABI_BROADCAST

baro

Definition at line 80 of file ins_float_invariant_wrapper.c.

Referenced by ins_float_invariant_register().

#define INS_FINV_FILTER_ID   2

Definition at line 34 of file ins_float_invariant_wrapper.c.

#define INS_FINV_IMU_ID   ABI_BROADCAST

IMU (gyro, accel)

Definition at line 87 of file ins_float_invariant_wrapper.c.

Referenced by ins_float_invariant_register().

#define INS_FINV_MAG_ID   ABI_BROADCAST

magnetometer

Definition at line 93 of file ins_float_invariant_wrapper.c.

Referenced by ins_float_invariant_register().

Function Documentation

static void accel_cb ( uint8_t  sender_id,
uint32_t  stamp,
struct Int32Vect3 accel 
)
static

Definition at line 139 of file ins_float_invariant_wrapper.c.

References ins_finv_accel.

Referenced by ins_float_invariant_register().

+ Here is the caller graph for this function:

static void aligner_cb ( uint8_t  sender_id,
uint32_t  stamp,
struct Int32Rates lp_gyro,
struct Int32Vect3 lp_accel,
struct Int32Vect3 lp_mag 
)
static

Definition at line 155 of file ins_float_invariant_wrapper.c.

References ins_float_inv, ins_float_invariant_align(), and InsFloatInv::is_aligned.

Referenced by ins_float_invariant_register().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void baro_cb ( uint8_t  sender_id,
float  pressure 
)
static

Definition at line 106 of file ins_float_invariant_wrapper.c.

References ins_float_invariant_update_baro().

Referenced by ins_float_invariant_register().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void body_to_imu_cb ( uint8_t  sender_id,
struct FloatQuat q_b2i_f 
)
static

Definition at line 165 of file ins_float_invariant_wrapper.c.

References ins_float_inv_set_body_to_imu_quat().

Referenced by ins_float_invariant_register().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void geo_mag_cb ( uint8_t  sender_id,
struct FloatVect3 h 
)
static

Definition at line 171 of file ins_float_invariant_wrapper.c.

References ins_float_inv, and InsFloatInv::mag_h.

Referenced by ins_float_invariant_register().

+ Here is the caller graph for this function:

static void gps_cb ( uint8_t  sender_id,
uint32_t  stamp,
struct GpsState gps_s 
)
static

Definition at line 176 of file ins_float_invariant_wrapper.c.

References ins_float_invariant_update_gps().

Referenced by ins_float_invariant_register().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void gyro_cb ( uint8_t  sender_id,
uint32_t  stamp,
struct Int32Rates gyro 
)
static

Call ins_float_invariant_propagate on new gyro measurements.

Since acceleration measurement is also needed for propagation, use the last stored accel from ins_finv_accel.

Definition at line 116 of file ins_float_invariant_wrapper.c.

References ins_finv_accel, ins_finv_last_stamp, ins_float_invariant_propagate(), and PRINT_CONFIG_MSG().

Referenced by ins_float_invariant_register().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mag_cb ( uint8_t  sender_id,
uint32_t  stamp,
struct Int32Vect3 mag 
)
static

Definition at line 146 of file ins_float_invariant_wrapper.c.

References ins_float_inv, ins_float_invariant_update_mag(), and InsFloatInv::is_aligned.

Referenced by ins_float_invariant_register().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

abi_event accel_ev
static

Definition at line 100 of file ins_float_invariant_wrapper.c.

Referenced by ins_float_invariant_register().

abi_event aligner_ev
static

Definition at line 101 of file ins_float_invariant_wrapper.c.

Referenced by ins_float_invariant_register().

abi_event baro_ev
static

Definition at line 97 of file ins_float_invariant_wrapper.c.

Referenced by ins_float_invariant_register().

abi_event body_to_imu_ev
static

Definition at line 102 of file ins_float_invariant_wrapper.c.

Referenced by ins_float_invariant_register().

abi_event geo_mag_ev
static

Definition at line 103 of file ins_float_invariant_wrapper.c.

Referenced by ins_float_invariant_register().

abi_event gps_ev
static

Definition at line 104 of file ins_float_invariant_wrapper.c.

Referenced by ins_float_invariant_register().

abi_event gyro_ev
static

Definition at line 99 of file ins_float_invariant_wrapper.c.

Referenced by ins_float_invariant_register().

struct Int32Vect3 ins_finv_accel
static

last accel measurement

Definition at line 38 of file ins_float_invariant_wrapper.c.

Referenced by accel_cb(), and gyro_cb().

uint32_t ins_finv_last_stamp = 0
static

last gyro msg timestamp

Definition at line 41 of file ins_float_invariant_wrapper.c.

Referenced by gyro_cb().

abi_event mag_ev
static

Definition at line 98 of file ins_float_invariant_wrapper.c.

Referenced by ins_float_invariant_register().