|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
31 #include "message_pragmas.h"
36 #ifndef INS_FINV_FILTER_ID
37 #define INS_FINV_FILTER_ID 2
46 #if PERIODIC_TELEMETRY && !INS_FINV_USE_UTM
53 pprz_msg_send_INS_REF(trans,
dev, AC_ID,
69 if (t_diff > 50000) { mde = 5; }
70 pprz_msg_send_STATE_FILTER_STATUS(trans,
dev, AC_ID, &
id, &mde, &
val);
79 #ifndef INS_FINV_BARO_ID
81 #define INS_FINV_BARO_ID BARO_BOARD_SENDER_ID
83 #define INS_FINV_BARO_ID ABI_BROADCAST
89 #ifndef INS_FINV_IMU_ID
90 #define INS_FINV_IMU_ID ABI_BROADCAST
96 #ifndef INS_FINV_MAG_ID
97 #define INS_FINV_MAG_ID ABI_BROADCAST
107 #ifndef INS_FINV_GPS_ID
108 #define INS_FINV_GPS_ID GPS_MULTI_ID
139 #if USE_AUTO_INS_FREQ || !defined(INS_PROPAGATE_FREQUENCY)
144 if (last_stamp > 0) {
145 float dt = (float)(stamp - last_stamp) * 1e-6;
150 PRINT_CONFIG_MSG(
"Using fixed INS_PROPAGATE_FREQUENCY for INS float_invariant propagation.")
151 PRINT_CONFIG_VAR(INS_PROPAGATE_FREQUENCY)
152 const float dt = 1. / (INS_PROPAGATE_FREQUENCY);
160 uint32_t stamp __attribute__((unused)),
167 uint32_t stamp __attribute__((unused)),
191 uint32_t stamp __attribute__((unused)),
208 uint32_t stamp __attribute__((unused)),
236 #if PERIODIC_TELEMETRY && !INS_FINV_USE_UTM
static void baro_cb(uint8_t sender_id, uint32_t stamp, float pressure)
#define MAGS_FLOAT_OF_BFP(_ef, _ei)
int32_t lon
in degrees*1e7
void ins_float_invariant_wrapper_init(void)
int32_t alt
in millimeters above WGS84 reference ellipsoid
static void gps_cb(uint8_t sender_id, uint32_t stamp, struct GpsState *gps_s)
struct LtpDef_i ned_origin_i
Definition of the local (flat earth) coordinate system.
static void h(const real32_T x[7], const real32_T q[4], real32_T y[6])
static uint32_t ins_finv_last_stamp
last gyro msg timestamp
#define INS_FINV_MAG_ID
magnetometer
struct EcefCoor_i ecef
Reference point in ecef.
data structure for GPS information
#define INS_FINV_GPS_ID
ABI binding for gps data.
#define RATES_FLOAT_OF_BFP(_rf, _ri)
Event structure to store callbacks in a linked list.
static struct FloatVect3 ins_finv_accel
last accel measurement
#define INS_FINV_IMU_ID
IMU (gyro, accel)
static abi_event aligner_ev
static abi_event body_to_imu_ev
bool ned_initialized_i
true if local int coordinate frame is initialsed
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
int32_t lat
in degrees*1e7
static void body_to_imu_cb(uint8_t sender_id, struct FloatQuat *q_b2i_f)
void ins_float_invariant_init(void)
static abi_event geo_mag_ev
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.
void ins_float_invariant_update_mag(struct FloatVect3 *mag)
void ins_float_invariant_update_gps(struct GpsState *gps_s)
static void send_ins_ref(struct transport_tx *trans, struct link_device *dev)
#define INS_FINV_BARO_ID
baro
PRINT_CONFIG_MSG("USE_INS_NAV_INIT defaulting to TRUE")
#define INS_FINV_FILTER_ID
static void send_filter_status(struct transport_tx *trans, struct link_device *dev)
void ins_float_invariant_align(struct FloatRates *lp_gyro, struct FloatVect3 *lp_accel, struct FloatVect3 *lp_mag)
int32_t hmsl
Height above mean sea level in mm.
static void gyro_cb(uint8_t sender_id, uint32_t stamp, struct Int32Rates *gyro)
Call ins_float_invariant_propagate on new gyro measurements.
static void accel_cb(uint8_t sender_id, uint32_t stamp, struct Int32Vect3 *accel)
static void aligner_cb(uint8_t sender_id, uint32_t stamp, struct Int32Rates *lp_gyro, struct Int32Vect3 *lp_accel, struct Int32Vect3 *lp_mag)
#define ACCELS_FLOAT_OF_BFP(_ef, _ei)
void ins_float_invariant_update_baro(float pressure)
struct InsFloatInv ins_float_inv
void ins_float_invariant_propagate(struct FloatRates *gyro, struct FloatVect3 *accel, float dt)
static abi_event accel_ev
#define ABI_BROADCAST
Broadcast address.
static void geo_mag_cb(uint8_t sender_id, struct FloatVect3 *h)
struct LlaCoor_i lla
Reference point in lla.
#define DefaultPeriodic
Set default periodic telemetry.
static void mag_cb(uint8_t sender_id, uint32_t stamp, struct Int32Vect3 *mag)
void ins_float_inv_set_body_to_imu_quat(struct FloatQuat *q_b2i)
void ahrs_aligner_init(void)