Library version of MPU9250AHRS code.

Fork of MPU9250AHRS by Janek Mann

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers AHRS.h Source File

AHRS.h

00001 #ifndef __AHRS_H_
00002 #define __AHRS_H_
00003 
00004 #ifdef __cplusplus
00005 extern "C" {
00006 #endif // #ifdef __cplusplus
00007 
00008 #define Kp 2.0f * 5.0f // these are the free parameters in the Mahony filter and fusion scheme, Kp for proportional feedback, Ki for integral
00009 #define Ki 0.0f
00010 
00011 void MadgwickQuaternionUpdate(float ax, float ay, float az, float gx, float gy, float gz, float mx, float my, float mz, float deltat, float *q, float beta);
00012 void MahonyQuaternionUpdate(float ax, float ay, float az, float gx, float gy, float gz, float mx, float my, float mz, float deltat, float *q);
00013 
00014 #ifdef __cplusplus
00015 }
00016 #endif // #ifdef __cplusplus
00017 
00018 #endif // __AHRS_H_