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
ahrs_float_dcm.h
Go to the documentation of this file.
1 /*
2  * Released under Creative Commons License
3  *
4  * 2010 The Paparazzi Team
5  *
6  *
7  * Based on Code by Jordi Munoz and William Premerlani, Supported by Chris Anderson (Wired) and Nathan Sindle (SparkFun).
8  * Version 1.0 for flat board updated by Doug Weibel and Jose Julio
9  *
10  * Modified at Hochschule Bremen, Germany
11  * 2010 Heinrich Warmers, Christoph Niemann, Oliver Riesener
12  *
13  */
14 
24 #ifndef AHRS_FLOAT_DCM_H
25 #define AHRS_FLOAT_DCM_H
26 
27 #include <inttypes.h>
29 
30 struct AhrsFloatDCM {
33 
37 
38  float gps_speed;
40  float gps_course;
43 };
44 extern struct AhrsFloatDCM ahrs_impl;
45 
46 
47 // FIXME neutrals should be a feature of state interface ?
48 extern float ins_roll_neutral;
49 extern float ins_pitch_neutral;
50 
51 
52 // DCM Parameters
53 
54 //#define Kp_ROLLPITCH 0.2
55 #define Kp_ROLLPITCH 0.015
56 #define Ki_ROLLPITCH 0.000010
57 #define Kp_YAW 0.9 //High yaw drift correction gain - use with caution!
58 #define Ki_YAW 0.00005
59 
60 #define GRAVITY 9.81
61 
62 
63 #ifndef OUTPUTMODE
64 #define OUTPUTMODE 1
65 #endif
66 // Mode 0 = DCM integration without Ki gyro bias
67 // Mode 1 = DCM integration with Kp and Ki
68 // Mode 2 = direct accelerometer -> euler
69 
70 
71 #define PERFORMANCE_REPORTING 1
72 #if PERFORMANCE_REPORTING == 1
73 extern int renorm_sqrt_count;
74 extern int renorm_blowup_count;
75 extern float imu_health;
76 #endif
77 
78 #endif // AHRS_FLOAT_DCM_H
rotation matrix
angular rates
euler angles
float ins_pitch_neutral
Definition: ins_arduimu.c:15
float gps_acceleration
float imu_health
int renorm_sqrt_count
Paparazzi floating point algebra.
struct FloatRates rate_correction
struct FloatRMat body_to_imu_rmat
int renorm_blowup_count
uint8_t gps_age
struct FloatRates gyro_bias
unsigned char uint8_t
Definition: types.h:14
struct FloatEulers ltp_to_imu_euler
float ins_roll_neutral
Definition: ins_arduimu.c:14
bool_t gps_course_valid
struct AhrsFloatDCM ahrs_impl
Definition: ahrs_ardrone2.c:40
struct FloatRates imu_rate