Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
imu_nps.h
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 #ifndef IMU_NPS_H
23 #define IMU_NPS_H
24 
25 #include "subsystems/imu.h"
26 
27 #include "generated/airframe.h"
28 
31 #if !defined IMU_GYRO_P_SENS & !defined IMU_GYRO_Q_SENS & !defined IMU_GYRO_R_SENS
32 #define IMU_GYRO_P_SENS 4.359
33 #define IMU_GYRO_P_SENS_NUM 4359
34 #define IMU_GYRO_P_SENS_DEN 1000
35 #define IMU_GYRO_Q_SENS 4.359
36 #define IMU_GYRO_Q_SENS_NUM 4359
37 #define IMU_GYRO_Q_SENS_DEN 1000
38 #define IMU_GYRO_R_SENS 4.359
39 #define IMU_GYRO_R_SENS_NUM 4359
40 #define IMU_GYRO_R_SENS_DEN 1000
41 #endif
42 
43 
46 #if !defined IMU_ACCEL_X_SENS & !defined IMU_ACCEL_Y_SENS & !defined IMU_ACCEL_Z_SENS
47 #define IMU_ACCEL_X_SENS 37.91
48 #define IMU_ACCEL_X_SENS_NUM 3791
49 #define IMU_ACCEL_X_SENS_DEN 100
50 #define IMU_ACCEL_Y_SENS 37.91
51 #define IMU_ACCEL_Y_SENS_NUM 3791
52 #define IMU_ACCEL_Y_SENS_DEN 100
53 #define IMU_ACCEL_Z_SENS 39.24
54 #define IMU_ACCEL_Z_SENS_NUM 3924
55 #define IMU_ACCEL_Z_SENS_DEN 100
56 #endif
57 
58 
59 #if !defined IMU_MAG_X_SENS & !defined IMU_MAG_Y_SENS & !defined IMU_MAG_Z_SENS
60 #define IMU_MAG_X_SENS 3.5
61 #define IMU_MAG_X_SENS_NUM 7
62 #define IMU_MAG_X_SENS_DEN 2
63 #define IMU_MAG_Y_SENS 3.5
64 #define IMU_MAG_Y_SENS_NUM 7
65 #define IMU_MAG_Y_SENS_DEN 2
66 #define IMU_MAG_Z_SENS 3.5
67 #define IMU_MAG_Z_SENS_NUM 7
68 #define IMU_MAG_Z_SENS_DEN 2
69 #endif
70 
71 
72 struct ImuNps {
76 };
77 
78 extern struct ImuNps imu_nps;
79 
80 extern void imu_feed_gyro_accel(void);
81 extern void imu_feed_mag(void);
82 
83 extern void imu_nps_init(void);
84 extern void imu_nps_event(void);
85 
86 #endif /* IMU_NPS_H */
imu_nps_init
void imu_nps_init(void)
Definition: imu_nps.c:30
imu_nps
struct ImuNps imu_nps
Definition: imu_nps.c:28
imu_feed_mag
void imu_feed_mag(void)
Definition: imu_nps.c:53
ImuNps::gyro_available
uint8_t gyro_available
Definition: imu_nps.h:75
imu.h
imu_feed_gyro_accel
void imu_feed_gyro_accel(void)
Definition: imu_nps.c:40
uint8_t
unsigned char uint8_t
Definition: types.h:14
ImuNps::accel_available
uint8_t accel_available
Definition: imu_nps.h:74
ImuNps::mag_available
uint8_t mag_available
Definition: imu_nps.h:73
ImuNps
Definition: imu_nps.h:72
imu_nps_event
void imu_nps_event(void)
Definition: imu_nps.c:61