Master Thesis
V1.0
Research and Design of Sensor Node for NMSD Treatment
MadgwickAHRS.h
Go to the documentation of this file.
1
/***************************************************************************/
9
//=====================================================================================================
10
// MadgwickAHRS.h
11
//=====================================================================================================
12
//
13
// Implementation of Madgwick's IMU and AHRS algorithms.
14
// See: http://www.x-io.co.uk/node/8#open_source_ahrs_and_imu_algorithms
15
//
16
// Date Author Notes
17
// 29/09/2011 SOH Madgwick Initial release
18
// 02/10/2011 SOH Madgwick Optimised for reduced CPU load
19
//
20
//=====================================================================================================
21
#ifndef MadgwickAHRS_h
22
#define MadgwickAHRS_h
23
24
//----------------------------------------------------------------------------------------------------
25
// Variable declaration
26
27
extern
volatile
float
beta
;
// algorithm gain
28
extern
volatile
float
q0
,
q1
,
q2
,
q3
;
// quaternion of sensor frame relative to auxiliary frame
29
30
31
//---------------------------------------------------------------------------------------------------
32
// Function declarations
33
34
void
MadgwickAHRSupdate
(
float
gx,
float
gy,
float
gz,
float
ax,
float
ay,
float
az,
float
mx,
float
my,
float
mz);
35
void
MadgwickAHRSupdateIMU
(
float
gx,
float
gy,
float
gz,
float
ax,
float
ay,
float
az);
36
37
38
void
QuaternionsToEulerAngles
(
float
*euler_angles );
39
40
#endif
41
//=====================================================================================================
42
// End of file
43
//=====================================================================================================
44
45
beta
volatile float beta
Definition:
main.c:145
q2
volatile float q2
Definition:
MadgwickAHRS.c:45
q3
volatile float q3
Definition:
MadgwickAHRS.c:45
MadgwickAHRSupdate
void MadgwickAHRSupdate(float gx, float gy, float gz, float ax, float ay, float az, float mx, float my, float mz)
Madgwick algorithm.
Definition:
MadgwickAHRS.c:92
q0
volatile float q0
Definition:
MadgwickAHRS.c:45
MadgwickAHRSupdateIMU
void MadgwickAHRSupdateIMU(float gx, float gy, float gz, float ax, float ay, float az)
Madgwick algorithm.
Definition:
MadgwickAHRS.c:217
q1
volatile float q1
Definition:
MadgwickAHRS.c:45
QuaternionsToEulerAngles
void QuaternionsToEulerAngles(float *euler_angles)
Convert quaternions to euler angles.
Definition:
MadgwickAHRS.c:351
sensorfusion
MadgwickAHRS.h
Generated by
1.8.16