Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros 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 
21 #ifndef AHRS_FLOAT_DCM_H
22 #define AHRS_FLOAT_DCM_H
23 
24 #include <inttypes.h>
26 
27 struct AhrsFloatDCM {
30  /*
31  Holds float version of IMU alignement
32  in order to be able to run against the fixed point
33  version of the IMU
34  */
37 };
38 extern struct AhrsFloatDCM ahrs_impl;
39 
40 
41 #ifdef AHRS_UPDATE_FW_ESTIMATOR
42 extern float ins_roll_neutral;
43 extern float ins_pitch_neutral;
44 
45 void ahrs_update_fw_estimator(void);
46 #endif
47 
48 
49 // DCM Parameters
50 
51 //#define Kp_ROLLPITCH 0.2
52 #define Kp_ROLLPITCH 0.015
53 #define Ki_ROLLPITCH 0.000010
54 #define Kp_YAW 0.9 //High yaw drift correction gain - use with caution!
55 #define Ki_YAW 0.00005
56 
57 #define GRAVITY 9.81
58 
59 
60 #ifndef OUTPUTMODE
61 #define OUTPUTMODE 1
62 #endif
63 // Mode 0 = DCM integration without Ki gyro bias
64 // Mode 1 = DCM integration with Kp and Ki
65 // Mode 2 = direct accelerometer -> euler
66 
67 
68 #define PERFORMANCE_REPORTING 1
69 #if PERFORMANCE_REPORTING == 1
70 extern int renorm_sqrt_count;
71 extern int renorm_blowup_count;
72 extern float imu_health;
73 #endif
74 
75 #endif // AHRS_FLOAT_DCM_H
rotation matrix
angular rates
struct FloatQuat body_to_imu_quat
float imu_health
int renorm_sqrt_count
Roation quaternion.
Paparazzi floating point algebra.
struct FloatRates rate_correction
struct FloatRMat body_to_imu_rmat
int renorm_blowup_count
float ins_pitch_neutral
Definition: ins_arduimu.c:15
struct FloatRates gyro_bias
void ahrs_update_fw_estimator(void)
float ins_roll_neutral
Definition: ins_arduimu.c:14
struct AhrsFloatDCM ahrs_impl