Paparazzi UAS  v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
imu_ppzuav.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010 Antoine Drouin <poinix@gmail.com>
3  * 2013 Felix Ruess <felix.ruess@gmail.com>
4  *
5  * This file is part of paparazzi.
6  *
7  * paparazzi is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2, or (at your option)
10  * any later version.
11  *
12  * paparazzi is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with paparazzi; see the file COPYING. If not, write to
19  * the Free Software Foundation, 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */
22 
32 #ifndef IMU_PPZUAV_H
33 #define IMU_PPZUAV_H
34 
35 #include "generated/airframe.h"
36 #include "subsystems/imu.h"
37 
38 #include "peripherals/itg3200.h"
39 #include "peripherals/hmc58xx.h"
41 
42 #if !defined IMU_GYRO_P_SENS & !defined IMU_GYRO_Q_SENS & !defined IMU_GYRO_R_SENS
43 
48 #define IMU_GYRO_P_SENS 4.973
49 #define IMU_GYRO_P_SENS_NUM 4973
50 #define IMU_GYRO_P_SENS_DEN 1000
51 #define IMU_GYRO_Q_SENS 4.973
52 #define IMU_GYRO_Q_SENS_NUM 4973
53 #define IMU_GYRO_Q_SENS_DEN 1000
54 #define IMU_GYRO_R_SENS 4.973
55 #define IMU_GYRO_R_SENS_NUM 4973
56 #define IMU_GYRO_R_SENS_DEN 1000
57 #endif
58 
59 
60 #if !defined IMU_ACCEL_X_SENS & !defined IMU_ACCEL_Y_SENS & !defined IMU_ACCEL_Z_SENS
61 
70 #define IMU_ACCEL_X_SENS 37.91
71 #define IMU_ACCEL_X_SENS_NUM 3791
72 #define IMU_ACCEL_X_SENS_DEN 100
73 #define IMU_ACCEL_Y_SENS 37.91
74 #define IMU_ACCEL_Y_SENS_NUM 3791
75 #define IMU_ACCEL_Y_SENS_DEN 100
76 #define IMU_ACCEL_Z_SENS 39.24
77 #define IMU_ACCEL_Z_SENS_NUM 3924
78 #define IMU_ACCEL_Z_SENS_DEN 100
79 #endif
80 
81 
82 struct ImuPpzuav {
84  struct Itg3200 gyro_itg;
85  struct Hmc58xx mag_hmc;
86 };
87 
88 extern struct ImuPpzuav imu_ppzuav;
89 
90 extern void imu_ppzuav_init(void);
91 extern void imu_ppzuav_periodic(void);
92 extern void imu_ppzuav_event(void);
93 
94 #endif /* IMU_PPZUAV_H */
void imu_ppzuav_periodic(void)
Definition: imu_ppzuav.c:101
struct Adxl345_I2c acc_adxl
Definition: imu_ppzuav.h:83
void imu_ppzuav_init(void)
Definition: imu_ppzuav.c:81
struct Hmc58xx mag_hmc
Definition: imu_ppzuav.h:85
void imu_ppzuav_event(void)
Definition: imu_ppzuav.c:112
Driver for the gyro ITG3200 from InvenSense.
Inertial Measurement Unit interface.
struct ImuPpzuav imu_ppzuav
Definition: imu_ppzuav.c:79
struct Itg3200 gyro_itg
Definition: imu_ppzuav.h:84
Driver for the accelerometer ADXL345 from Analog Devices using I2C.