35 #ifdef ADC_CHANNEL_GYRO_P
38 #ifdef ADC_CHANNEL_GYRO_Q
41 #ifdef ADC_CHANNEL_GYRO_R
44 #ifdef ADC_CHANNEL_ACCEL_X
47 #ifdef ADC_CHANNEL_ACCEL_Y
50 #ifdef ADC_CHANNEL_ACCEL_Z
59 static int last_head = 0;
70 #ifdef ADC_CHANNEL_GYRO_P
73 #ifdef ADC_CHANNEL_GYRO_Q
76 #ifdef ADC_CHANNEL_GYRO_R
79 #ifdef ADC_CHANNEL_ACCEL_X
82 #ifdef ADC_CHANNEL_ACCEL_Y
85 #ifdef ADC_CHANNEL_ACCEL_Z
96 #if defined ADC_CHANNEL_GYRO_P && defined ADC_CHANNEL_GYRO_Q && ! defined ADC_CHANNEL_GYRO_R
106 #elif defined ADC_CHANNEL_GYRO_P && ! defined ADC_CHANNEL_GYRO_Q && ! defined ADC_CHANNEL_GYRO_R
117 #if ! defined ADC_CHANNEL_ACCEL_X && ! defined ADC_CHANNEL_ACCEL_Z && ! defined ADC_CHANNEL_ACCEL_Z
#define IMU_GYRO_Q_SENS_DEN
Main include for ABI (AirBorneInterface).
void adc_buf_channel(uint8_t adc_channel, struct adc_buf *s, uint8_t av_nb_sample)
Link between ChibiOS ADC drivers and Paparazzi adc_buffers.
#define IMU_GYRO_Q_SENS_NUM
#define IMU_GYRO_P_SENS_NUM
struct Imu imu
global IMU state
arch independent ADC (Analog to Digital Converter) API
static struct adc_buf analog_imu_adc_buf[NB_ANALOG_IMU_ADC]
struct Int32Rates gyro_neutral
static gyroscope bias from calibration in raw/unscaled units
int32_t r
in rad/s with INT32_RATE_FRAC
struct Int32Rates gyro_unscaled
unscaled gyroscope measurements
Generic interface for all ADC hardware drivers, independent from microcontroller architecture.
void imu_scale_accel(struct Imu *_imu)
struct Int32Vect3 accel
accelerometer measurements in m/s^2 in BFP with INT32_ACCEL_FRAC
#define IMU_GYRO_P_SENS_DEN
void imu_analog_init(void)
void imu_scale_gyro(struct Imu *_imu)
#define NB_ANALOG_IMU_ADC
void imu_analog_periodic(void)
Inertial Measurement Unit using onboard ADCs.
int32_t p
in rad/s with INT32_RATE_FRAC
struct Int32Vect3 accel_unscaled
unscaled accelerometer measurements
abstract IMU interface providing fixed point interface
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
int32_t q
in rad/s with INT32_RATE_FRAC
struct Int32Rates gyro
gyroscope measurements in rad/s in BFP with INT32_RATE_FRAC