Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
imu_ardrone2_raw.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2013 Dino Hensen, Vincent van Hoek
3  *
4  * This file is part of Paparazzi.
5  *
6  * Paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * Paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with Paparazzi; see the file COPYING. If not, write to
18  * the Free Software Foundation, 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21 
27 #include "subsystems/imu.h"
28 #include "navdata.h"
29 #include "imu_ardrone2_raw.h"
30 #include "mcu_periph/uart.h"
31 
32 void imu_impl_init(void) {
34  navdata_init();
35 }
36 
37 void imu_periodic(void) {
39  //checks if the navboard has a new dataset ready
40  if (navdata_imu_available == TRUE) {
46  }
47  else {
49  }
50 
51 #ifdef USE_UART1
52  uart1_handler();
53 #endif
54 }
int16_t mz
Definition: navdata.h:86
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
IMU implementation for ardrone2-raw.
struct Int32Rates gyro_unscaled
unscaled gyroscope measurements
Definition: imu.h:48
int imu_data_available
int16_t vx
Definition: navdata.h:57
uint16_t ay
Definition: navdata.h:54
#define FALSE
Definition: imu_chimu.h:141
int16_t vz
Definition: navdata.h:59
uint16_t az
Definition: navdata.h:55
struct Int32Vect3 accel_unscaled
unscaled accelerometer measurements
Definition: imu.h:49
int16_t my
Definition: navdata.h:85
struct Imu imu
global IMU state
Definition: imu_aspirin2.c:50
int16_t mx
Definition: navdata.h:84
Inertial Measurement Unit interface.
struct Int32Vect3 mag_unscaled
unscaled magnetometer measurements
Definition: imu.h:50
#define TRUE
Definition: imu_chimu.h:144
#define VECT3_ASSIGN(_a, _x, _y, _z)
Definition: pprz_algebra.h:97
void imu_impl_init(void)
#define RATES_ASSIGN(_ra, _p, _q, _r)
Definition: pprz_algebra.h:294
int16_t vy
Definition: navdata.h:58
void imu_periodic(void)
uint16_t ax
Definition: navdata.h:53