Library version of MPU9250AHRS code.
Fork of MPU9250AHRS by
AHRS.h@5:ea541d293095, 2014-09-08 (annotated)
- Committer:
- janekm
- Date:
- Mon Sep 08 21:50:33 2014 +0000
- Revision:
- 5:ea541d293095
- Parent:
- 4:404c35f32ce3
N/A
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
janekm | 4:404c35f32ce3 | 1 | #ifndef __AHRS_H_ |
janekm | 4:404c35f32ce3 | 2 | #define __AHRS_H_ |
janekm | 4:404c35f32ce3 | 3 | |
janekm | 5:ea541d293095 | 4 | #ifdef __cplusplus |
janekm | 5:ea541d293095 | 5 | extern "C" { |
janekm | 5:ea541d293095 | 6 | #endif // #ifdef __cplusplus |
janekm | 5:ea541d293095 | 7 | |
janekm | 4:404c35f32ce3 | 8 | #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 |
janekm | 4:404c35f32ce3 | 9 | #define Ki 0.0f |
janekm | 4:404c35f32ce3 | 10 | |
janekm | 4:404c35f32ce3 | 11 | 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); |
janekm | 4:404c35f32ce3 | 12 | void MahonyQuaternionUpdate(float ax, float ay, float az, float gx, float gy, float gz, float mx, float my, float mz, float deltat, float *q); |
janekm | 4:404c35f32ce3 | 13 | |
janekm | 5:ea541d293095 | 14 | #ifdef __cplusplus |
janekm | 5:ea541d293095 | 15 | } |
janekm | 5:ea541d293095 | 16 | #endif // #ifdef __cplusplus |
janekm | 5:ea541d293095 | 17 | |
janekm | 4:404c35f32ce3 | 18 | #endif // __AHRS_H_ |