 |
Paparazzi UAS
v6.2_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
39 #ifndef AHRS_ALIGNER_SAMPLES_NB
40 #define AHRS_ALIGNER_SAMPLES_NB 100
49 #ifndef AHRS_ALIGNER_IMU_ID
50 #define AHRS_ALIGNER_IMU_ID ABI_BROADCAST
55 uint32_t stamp __attribute__((unused)),
56 struct Int32Rates *gyro __attribute__((unused)))
63 #if PERIODIC_TELEMETRY
68 pprz_msg_send_FILTER_ALIGNER(trans,
dev, AC_ID,
88 #if PERIODIC_TELEMETRY
104 #ifndef LOW_NOISE_THRESHOLD
105 #define LOW_NOISE_THRESHOLD 90000
108 #ifndef LOW_NOISE_TIME
109 #define LOW_NOISE_TIME 5
122 #ifdef AHRS_ALIGNER_LED
123 RunOnceEvery(50, {
LED_TOGGLE(AHRS_ALIGNER_LED);});
128 if (avg_ref_sensor >= 0) {
159 #ifdef AHRS_ALIGNER_LED
#define LOW_NOISE_THRESHOLD
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
#define AHRS_ALIGNER_SAMPLES_NB
static uint32_t samples_idx
#define INT_RATES_ZERO(_e)
struct Int32Vect3 accel
accelerometer measurements in m/s^2 in BFP with INT32_ACCEL_FRAC
int32_t q
in rad/s with INT32_RATE_FRAC
static struct Int32Vect3 mag_sum
Event structure to store callbacks in a linked list.
static void send_aligner(struct transport_tx *trans, struct link_device *dev)
#define VECT3_SDIV(_vo, _vi, _s)
static void gyro_cb(uint8_t sender_id, uint32_t stamp, struct Int32Rates *gyro)
#define VECT3_ADD(_a, _b)
struct Int32Rates lp_gyro
#define AHRS_ALIGNER_LOCKED
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
int32_t p
in rad/s with INT32_RATE_FRAC
#define AHRS_ALIGNER_IMU_ID
static const struct usb_device_descriptor dev
#define AHRS_ALIGNER_RUNNING
struct AhrsAligner ahrs_aligner
Architecture independent timing functions.
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.
arch independent LED (Light Emitting Diodes) API
static struct Int32Rates gyro_sum
#define RATES_ADD(_a, _b)
struct Imu imu
global IMU state
void ahrs_aligner_restart(void)
struct Int32Vect3 lp_accel
#define LOW_NOISE_TIME
Number of cycles (100 samples each) with low noise.
int int32_t
Typedef defining 32 bit int type.
#define RATES_SDIV(_ro, _ri, _s)
struct Int32Vect3 mag
magnetometer measurements scaled to 1 in BFP with INT32_MAG_FRAC
#define INT_VECT3_ZERO(_v)
void ahrs_aligner_run(void)
#define ABI_BROADCAST
Broadcast address.
static int32_t ref_sensor_samples[AHRS_ALIGNER_SAMPLES_NB]
int32_t r
in rad/s with INT32_RATE_FRAC
static struct Int32Vect3 accel_sum
#define DefaultPeriodic
Set default periodic telemetry.
void ahrs_aligner_init(void)
struct Int32Rates gyro
gyroscope measurements in rad/s in BFP with INT32_RATE_FRAC