Hospital Analyser  1.0
MahonyAHRS.h
1 //=====================================================================================================
2 // MahonyAHRS.h
3 //=====================================================================================================
4 //
5 // Madgwick's implementation of Mayhony's AHRS algorithm.
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 MahonyAHRS_h
14 #define MahonyAHRS_h
15 
16 //----------------------------------------------------------------------------------------------------
17 // Variable declaration
18 
19 extern volatile float twoKp; // 2 * proportional gain (Kp)
20 extern volatile float twoKi; // 2 * integral gain (Ki)
21 //extern volatile float q0, q1, q2, q3; // quaternion of sensor frame relative to auxiliary frame
22 
23 //---------------------------------------------------------------------------------------------------
24 // Function declarations
25 
26 void MahonyAHRSupdate(float gx, float gy, float gz, float ax, float ay, float az, float mx, float my, float mz);
27 void MahonyAHRSupdateIMU(float gx, float gy, float gz, float ax, float ay, float az, float *q_0, float *q_1, float *q_2, float *q_3);
28 
29 #endif
30 //=====================================================================================================
31 // End of file
32 //=====================================================================================================