MahonyAHRS.h 1.1 KB

123456789101112131415161718192021222324252627
  1. //=============================================================================================
  2. // MahonyAHRS.h
  3. //=============================================================================================
  4. //
  5. // Madgwick's implementation of Mayhony's AHRS algorithm.
  6. // See: http://www.x-io.co.uk/open-source-imu-and-ahrs-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. void Mahony_update(float gx, float gy, float gz, float ax, float ay, float az, float mx, float my, float mz);
  16. void updateIMU(float gx, float gy, float gz, float ax, float ay, float az);
  17. void Mahony_Init(float sampleFrequency);
  18. void Mahony_computeAngles(void);
  19. float getRoll(void);
  20. float getPitch(void);
  21. float getYaw(void);
  22. float getRollRadians(void);
  23. float getPitchRadians(void);
  24. float getYawRadians(void);
  25. void accel_BConvertToN(float accel_s[3], float accel_d[3], float q[4]);
  26. #endif