Hospital Analyser  1.0
MadgwickAHRS.h
1 //=====================================================================================================
2 // MadgwickAHRS.h
3 //=====================================================================================================
4 //
5 // Implementation of Madgwick's IMU and AHRS algorithms.
6 // See: http://www.x-io.co.uk/node/8#open_source_ahrs_and_imu_algorithms
7 //
8 // Date Author Notes
9 // 29/09/2011 SOH Madgwick Initial release
10 // 02/10/2011 SOH Madgwick Optimised for reduced CPU load
11 //
12 //=====================================================================================================
13 #ifndef MadgwickAHRS_h
14 #define MadgwickAHRS_h
15 
16 #include "Fusion/Fusion.h"
17 
18 //----------------------------------------------------------------------------------------------------
19 // Variable declaration
20 
21 extern volatile float beta; // algorithm gain
22 //extern volatile float q0, q1, q2, q3; // quaternion of sensor frame relative to auxiliary frame
23 
24 //---------------------------------------------------------------------------------------------------
25 // Function declarations
26 
27 void MadgwickAHRSupdate(float gx, float gy, float gz, float ax, float ay, float az, float mx, float my, float mz);
28 void MadgwickAHRSupdateIMU(float gx, float gy, float gz, float ax, float ay, float az, Quaternion *Q);
29 
30 #endif
31 //=====================================================================================================
32 // End of file
33 //=====================================================================================================
Structure for holding Quaternion [w, x, y, z].
Definition: Fusion.h:29