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_navgo.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2011 Gautier Hattenberger
3  * Derived from Aspirin and ppzuavimu drivers
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 
33 #ifndef IMU_NAVGO_H
34 #define IMU_NAVGO_H
35 
36 #include "std.h"
37 #include "generated/airframe.h"
38 #include "subsystems/imu.h"
39 
40 #include "peripherals/itg3200.h"
42 #include "peripherals/hmc58xx.h"
43 
44 // Default configuration
45 #if !defined IMU_GYRO_P_SIGN & !defined IMU_GYRO_Q_SIGN & !defined IMU_GYRO_R_SIGN
46 #define IMU_GYRO_P_SIGN 1
47 #define IMU_GYRO_Q_SIGN 1
48 #define IMU_GYRO_R_SIGN 1
49 #endif
50 #if !defined IMU_ACCEL_X_SIGN & !defined IMU_ACCEL_Y_SIGN & !defined IMU_ACCEL_Z_SIGN
51 #define IMU_ACCEL_X_SIGN 1
52 #define IMU_ACCEL_Y_SIGN 1
53 #define IMU_ACCEL_Z_SIGN 1
54 #endif
55 #if !defined IMU_MAG_X_SIGN & !defined IMU_MAG_Y_SIGN & !defined IMU_MAG_Z_SIGN
56 #define IMU_MAG_X_SIGN 1
57 #define IMU_MAG_Y_SIGN 1
58 #define IMU_MAG_Z_SIGN 1
59 #endif
60 
61 
62 struct ImuNavgo {
63  struct Itg3200 itg;
64  struct Adxl345_I2c adxl;
65  struct Hmc58xx hmc;
66 };
67 
68 extern struct ImuNavgo imu_navgo;
69 
70 extern void imu_navgo_init(void);
71 extern void imu_navgo_periodic(void);
72 extern void imu_navgo_event(void);
73 extern void imu_navgo_downlink_raw(void);
74 
75 #endif // IMU_NAVGO_H
void imu_navgo_init(void)
Definition: imu_navgo.c:66
void imu_navgo_downlink_raw(void)
Definition: imu_navgo.c:111
void imu_navgo_periodic(void)
Definition: imu_navgo.c:93
Driver for the gyro ITG3200 from InvenSense.
struct Itg3200 itg
Definition: imu_navgo.h:63
Inertial Measurement Unit interface.
struct Hmc58xx hmc
Definition: imu_navgo.h:65
void imu_navgo_event(void)
Definition: imu_navgo.c:120
struct Adxl345_I2c adxl
Definition: imu_navgo.h:64
Driver for the accelerometer ADXL345 from Analog Devices using I2C.
struct ImuNavgo imu_navgo
Definition: imu_navgo.c:64