Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
Driver for the IMU on the NavGo board. More...
#include <math.h>
#include "imu_navgo.h"
#include "mcu_periph/i2c.h"
#include "led.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 | NAVGO_ACCEL_RATE ADXL345_RATE_25HZ |
#define | NAVGO_GYRO_LOWPASS ITG3200_DLPF_10HZ |
#define | NAVGO_GYRO_SMPLRT_DIV 1 |
Functions | |
void | imu_impl_init (void) |
must be defined by underlying hardware More... | |
void | imu_periodic (void) |
optional. More... | |
void | imu_navgo_downlink_raw (void) |
void | imu_navgo_event (void) |
Variables | |
struct ImuNavgo | imu_navgo |
Driver for the IMU on the NavGo board.
Definition in file imu_navgo.c.
#define NAVGO_ACCEL_RATE ADXL345_RATE_25HZ |
Definition at line 46 of file imu_navgo.c.
Referenced by imu_impl_init(), and imu_periodic().
#define NAVGO_GYRO_LOWPASS ITG3200_DLPF_10HZ |
Definition at line 52 of file imu_navgo.c.
Referenced by imu_impl_init().
#define NAVGO_GYRO_SMPLRT_DIV 1 |
Definition at line 53 of file imu_navgo.c.
Referenced by imu_impl_init().
void imu_impl_init | ( | void | ) |
must be defined by underlying hardware
Definition at line 66 of file imu_navgo.c.
References ImuNavgo::adxl, ADXL345_ADDR_ALT, adxl345_i2c_init(), Adxl345_I2c::config, Itg3200::config, Itg3200Config::dlpf_cfg, ImuNavgo::hmc, HMC58XX_ADDR, hmc58xx_init(), imu_navgo, InitMedianFilterRatesInt, InitMedianFilterVect3Int, ImuNavgo::itg, ITG3200_ADDR_ALT, itg3200_init(), median_mag, NAVGO_ACCEL_RATE, NAVGO_GYRO_LOWPASS, NAVGO_GYRO_SMPLRT_DIV, Adxl345Config::rate, and Itg3200Config::smplrt_div.
void imu_navgo_downlink_raw | ( | void | ) |
Definition at line 111 of file imu_navgo.c.
References Imu::accel_unscaled, DefaultChannel, DefaultDevice, Imu::gyro_unscaled, imu, Imu::mag_unscaled, Int32Rates::p, Int32Rates::q, Int32Rates::r, Int32Vect3::x, Int32Vect3::y, and Int32Vect3::z.
void imu_navgo_event | ( | void | ) |
Definition at line 120 of file imu_navgo.c.
References Imu::accel, Imu::accel_unscaled, ImuNavgo::adxl, adxl345_i2c_event(), Adxl345_I2c::data, Hmc58xx::data, Itg3200::data, Adxl345_I2c::data_available, Hmc58xx::data_available, Itg3200::data_available, FALSE, get_sys_time_usec(), Imu::gyro, Imu::gyro_unscaled, ImuNavgo::hmc, hmc58xx_event(), imu, IMU_BOARD_ID, imu_navgo, imu_scale_accel(), imu_scale_gyro(), imu_scale_mag(), ImuNavgo::itg, itg3200_event(), Imu::mag, Imu::mag_unscaled, median_mag, RATES_ASSIGN, UpdateMedianFilterRatesInt, UpdateMedianFilterVect3Int, VECT3_ASSIGN, and VECT3_COPY.
void imu_periodic | ( | void | ) |
optional.
If not provided by implementation, empty function is used
Definition at line 93 of file imu_navgo.c.
References ImuNavgo::adxl, adxl345_i2c_periodic(), ImuNavgo::hmc, hmc58xx_periodic(), imu_navgo, ImuNavgo::itg, itg3200_periodic(), NAVGO_ACCEL_RATE, and PERIODIC_FREQUENCY.
struct ImuNavgo imu_navgo |
Definition at line 64 of file imu_navgo.c.
Referenced by imu_impl_init(), imu_navgo_event(), and imu_periodic().