|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
41 #if !defined KROOZ_LOWPASS_FILTER && !defined KROOZ_SMPLRT_DIV
42 #define KROOZ_LOWPASS_FILTER MPU60X0_DLPF_256HZ
43 #define KROOZ_SMPLRT_DIV 1
50 #ifndef KROOZ_ACCEL_RANGE
51 #define KROOZ_ACCEL_RANGE MPU60X0_ACCEL_RANGE_2G
57 #if IMU_KROOZ_USE_ACCEL_MEDIAN_FILTER
81 #if IMU_KROOZ_USE_ACCEL_MEDIAN_FILTER
141 #if IMU_KROOZ_USE_ACCEL_MEDIAN_FILTER
155 RunOnceEvery(128, {
axis_nb = 5;});
struct Int32Rates gyro_unscaled
unscaled gyroscope measurements
void imu_krooz_periodic(void)
enum SPIClockDiv cdiv
prescaler of main clock to use as SPI clock
uint8_t smplrt_div
Sample rate divider.
struct Int32Vect3 accel_sum
volatile uint8_t ad7689_spi_tx_buffer[2]
void hmc58xx_start_configure(struct Hmc58xx *hmc)
void hmc58xx_event(struct Hmc58xx *hmc)
enum SPIClockPolarity cpol
clock polarity control
#define VECT3_SMUL(_vo, _vi, _s)
void imu_krooz_init(void)
struct Uint8Vect3 meas_nb_acc
enum Mpu60x0GyroRanges gyro_range
deg/s Range
struct Int32Vect3 accel
accelerometer measurements in m/s^2 in BFP with INT32_ACCEL_FRAC
uint16_t output_length
number of data words to write
bool drdy_int_enable
Enable Data Ready Interrupt.
int32_t q
in rad/s with INT32_RATE_FRAC
#define IMU_KROOZ_ACCEL_AVG_FILTER
#define VECT3_SDIV(_vo, _vi, _s)
void mpu60x0_i2c_start_configure(struct Mpu60x0_I2c *mpu)
void imu_krooz_sd_arch_init(void)
enum Mpu60x0AccelRanges accel_range
g Range
enum Mpu60x0DLPF dlpf_cfg
Digital Low Pass Filter.
#define VECT3_ADD(_a, _b)
@ SPISelectUnselect
slave is selected before transaction and unselected after
enum SPIBitOrder bitorder
MSB/LSB order.
struct Int32Vect3 accel_unscaled
unscaled accelerometer measurements
volatile uint8_t * output_buf
pointer to transmit buffer for DMA
enum SPISlaveSelect select
slave selection behavior
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
#define KROOZ_LOWPASS_FILTER
int32_t p
in rad/s with INT32_RATE_FRAC
#define RATES_ASSIGN(_ra, _p, _q, _r)
@ SPICpolIdleLow
CPOL = 0.
#define KROOZ_ACCEL_RANGE
enum SPIClockPhase cpha
clock phase control
SPICallback after_cb
NULL or function called after the transaction.
bool spi_submit(struct spi_periph *p, struct spi_transaction *t)
Submit SPI transaction.
struct spi_transaction ad7689_trans
void mpu60x0_i2c_init(struct Mpu60x0_I2c *mpu, struct i2c_periph *i2c_p, uint8_t addr)
Architecture independent timing functions.
struct ImuKrooz imu_krooz
struct MedianFilter3Int median_mag
void imu_scale_gyro(struct Imu *_imu)
void mpu60x0_i2c_event(struct Mpu60x0_I2c *mpu)
void imu_krooz_event(void)
void hmc58xx_read(struct Hmc58xx *hmc)
arch independent LED (Light Emitting Diodes) API
struct Mpu60x0Config config
void mpu60x0_i2c_read(struct Mpu60x0_I2c *mpu)
#define RATES_ADD(_a, _b)
struct Imu imu
global IMU state
void hmc58xx_init(struct Hmc58xx *hmc, struct i2c_periph *i2c_p, uint8_t addr)
Initialize Hmc58xx struct and set default config options.
volatile uint8_t ad7689_spi_rx_buffer[2]
static uint32_t ad7689_event_timer
uint16_t input_length
number of data words to read
enum SPIDataSizeSelect dss
data transfer word size
uint8_t slave_idx
slave id: SPI_SLAVE0 to SPI_SLAVE4
struct Int32Vect3 accel_filtered
void imu_scale_mag(struct Imu *_imu)
volatile uint8_t * input_buf
pointer to receive buffer for DMA
union Mpu60x0_I2c::@332 data_rates
struct Int32Vect3 mag
magnetometer measurements scaled to 1 in BFP with INT32_MAG_FRAC
struct Int32Vect3 mag_unscaled
unscaled magnetometer measurements
volatile bool data_available
data ready flag
#define INT_VECT3_ZERO(_v)
SPICallback before_cb
NULL or function called before the transaction.
#define VECT3_ASSIGN(_a, _x, _y, _z)
volatile bool data_available
data ready flag
#define SysTimeTimerStart(_t)
enum SPITransactionStatus status
int32_t r
in rad/s with INT32_RATE_FRAC
void imu_scale_accel(struct Imu *_imu)
bool initialized
config done flag
#define VECT3_COPY(_a, _b)
struct Int32Rates gyro
gyroscope measurements in rad/s in BFP with INT32_RATE_FRAC
bool initialized
config done flag
struct Int32Rates rates_sum