Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
Driver for the IMU on the KroozSD board. More...
#include <math.h>
#include "boards/krooz/imu_krooz.h"
#include "subsystems/imu/imu_krooz_sd_arch.h"
#include "mcu_periph/i2c.h"
#include "led.h"
#include "filters/median_filter.h"
#include "subsystems/abi.h"
#include "mcu_periph/uart.h"
#include "messages.h"
#include "subsystems/datalink/downlink.h"
Go to the source code of this file.
Macros | |
#define | KROOZ_LOWPASS_FILTER MPU60X0_DLPF_256HZ |
#define | KROOZ_SMPLRT_DIV 1 |
#define | KROOZ_GYRO_RANGE MPU60X0_GYRO_RANGE_250 |
#define | KROOZ_ACCEL_RANGE MPU60X0_ACCEL_RANGE_2G |
Functions | |
void | imu_impl_init (void) |
must be defined by underlying hardware More... | |
void | imu_periodic (void) |
optional. More... | |
void | imu_krooz_downlink_raw (void) |
void | imu_krooz_event (void) |
Variables | |
struct ImuKrooz | imu_krooz |
struct MedianFilter3Int | median_mag |
Driver for the IMU on the KroozSD board.
Invensense MPU-6050 Honeywell HMC-5883
Definition in file imu_krooz.c.
#define KROOZ_ACCEL_RANGE MPU60X0_ACCEL_RANGE_2G |
Definition at line 57 of file imu_krooz.c.
Referenced by imu_impl_init().
#define KROOZ_GYRO_RANGE MPU60X0_GYRO_RANGE_250 |
Definition at line 52 of file imu_krooz.c.
Referenced by imu_impl_init().
#define KROOZ_LOWPASS_FILTER MPU60X0_DLPF_256HZ |
Definition at line 45 of file imu_krooz.c.
Referenced by imu_impl_init().
#define KROOZ_SMPLRT_DIV 1 |
Definition at line 46 of file imu_krooz.c.
Referenced by imu_impl_init().
void imu_impl_init | ( | void | ) |
must be defined by underlying hardware
Definition at line 68 of file imu_krooz.c.
References Mpu60x0Config::accel_range, ImuKrooz::accel_sum, Mpu60x0_I2c::config, Mpu60x0Config::dlpf_cfg, Mpu60x0Config::drdy_int_enable, FALSE, Mpu60x0Config::gyro_range, ImuKrooz::hmc, HMC58XX_ADDR, hmc58xx_init(), ImuKrooz::hmc_eoc, imu_krooz_sd_arch_init(), InitMedianFilterVect3Int, KROOZ_ACCEL_RANGE, KROOZ_GYRO_RANGE, KROOZ_LOWPASS_FILTER, KROOZ_SMPLRT_DIV, ImuKrooz::meas_nb, median_mag, ImuKrooz::mpu, MPU60X0_ADDR, mpu60x0_i2c_init(), ImuKrooz::mpu_eoc, RATES_ASSIGN, ImuKrooz::rates_sum, Mpu60x0Config::smplrt_div, TRUE, and VECT3_ASSIGN.
void imu_krooz_downlink_raw | ( | void | ) |
Definition at line 137 of file imu_krooz.c.
References Imu::accel_unscaled, DefaultChannel, DefaultDevice, Imu::gyro_unscaled, imu, Int32Rates::p, Int32Rates::q, Int32Rates::r, Int32Vect3::x, Int32Vect3::y, and Int32Vect3::z.
void imu_krooz_event | ( | void | ) |
Definition at line 146 of file imu_krooz.c.
void imu_periodic | ( | void | ) |
optional.
If not provided by implementation, empty function is used
Definition at line 98 of file imu_krooz.c.
References Imu::accel, ImuKrooz::accel_filtered, ImuKrooz::accel_sum, Imu::accel_unscaled, Mpu60x0_I2c::config, get_sys_time_usec(), Imu::gyro, Imu::gyro_unscaled, ImuKrooz::hmc, hmc58xx_start_configure(), imu, IMU_BOARD_ID, IMU_KROOZ_ACCEL_AVG_FILTER, imu_scale_accel(), imu_scale_gyro(), Hmc58xx::initialized, Mpu60x0Config::initialized, ImuKrooz::meas_nb, ImuKrooz::mpu, mpu60x0_i2c_start_configure(), Int32Rates::p, Int32Rates::q, Int32Rates::r, RATES_ASSIGN, ImuKrooz::rates_sum, UpdateMedianFilterVect3Int, VECT3_ADD, VECT3_ASSIGN, VECT3_COPY, VECT3_SDIV, VECT3_SMUL, Int32Vect3::x, Int32Vect3::y, and Int32Vect3::z.
struct ImuKrooz imu_krooz |
Definition at line 61 of file imu_krooz.c.
Referenced by exti9_5_isr().
struct MedianFilter3Int median_mag |
Definition at line 66 of file imu_krooz.c.
Referenced by imu_impl_init(), imu_krooz_event(), and imu_navgo_event().