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_nps.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 Felix Ruess <felix.ruess@gmail.com
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 
22 #include "subsystems/imu.h"
23 
24 #include "generated/airframe.h"
25 
26 #include "nps_sensors.h"
27 
28 struct ImuNps imu_nps;
29 
30 void imu_impl_init(void) {
31 
35 
36 }
37 
38 void imu_periodic(void) {
39 }
40 
41 
42 void imu_feed_gyro_accel(void) {
43 
44  RATES_ASSIGN(imu.gyro_unscaled, sensors.gyro.value.x, sensors.gyro.value.y, sensors.gyro.value.z);
45  VECT3_ASSIGN(imu.accel_unscaled, sensors.accel.value.x, sensors.accel.value.y, sensors.accel.value.z);
46 
47  // set availability flags...
50 
51 }
52 
53 
54 void imu_feed_mag(void) {
55 
56  VECT3_ASSIGN(imu.mag_unscaled, sensors.mag.value.x, sensors.mag.value.y, sensors.mag.value.z);
58 
59 }
struct Int32Rates gyro_unscaled
unscaled gyroscope measurements
Definition: imu.h:48
#define FALSE
Definition: imu_chimu.h:141
Definition: imu_nps.h:59
void imu_feed_mag(void)
Definition: imu_nps.c:54
uint8_t mag_available
Definition: imu_nps.h:60
struct Int32Vect3 accel_unscaled
unscaled accelerometer measurements
Definition: imu.h:49
struct Imu imu
global IMU state
Definition: imu_aspirin2.c:50
uint8_t accel_available
Definition: imu_nps.h:61
uint8_t gyro_available
Definition: imu_nps.h:62
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_feed_gyro_accel(void)
Definition: imu_nps.c:42
#define RATES_ASSIGN(_ra, _p, _q, _r)
Definition: pprz_algebra.h:294
void imu_periodic(void)
Definition: imu_nps.c:38
void imu_impl_init(void)
Definition: imu_nps.c:30
struct ImuNps imu_nps
Definition: imu_nps.c:28