Madgwick
Dependents: IMU_ethernet IMU_serial_test IMU_serial
MadgwickAHRS.h
00001 //===================================================================================================== 00002 // MadgwickAHRS.h 00003 //===================================================================================================== 00004 // 00005 // Implementation of Madgwick's IMU and AHRS algorithms. 00006 // See: http://www.x-io.co.uk/node/8#open_source_ahrs_and_imu_algorithms 00007 // 00008 // Date Author Notes 00009 // 29/09/2011 SOH Madgwick Initial release 00010 // 02/10/2011 SOH Madgwick Optimised for reduced CPU load 00011 // 00012 //===================================================================================================== 00013 #ifndef MadgwickAHRS_h 00014 #define MadgwickAHRS_h 00015 00016 //---------------------------------------------------------------------------------------------------- 00017 // Variable declaration 00018 00019 extern volatile float beta; // algorithm gain 00020 //extern volatile float q0, q1, q2, q3; // quaternion of sensor frame relative to auxiliary frame 00021 00022 //--------------------------------------------------------------------------------------------------- 00023 // Function declarations 00024 00025 extern void MadgwickAHRSupdate(float gx, float gy, float gz, float ax, float ay, float az, float mx, float my, float mz, float &q0, float &q1, float &q2, float &q3); 00026 extern void MadgwickAHRSupdateIMU(float gx, float gy, float gz, float ax, float ay, float az, float &q0, float &q1, float &q2, float &q3); 00027 00028 #endif 00029 //===================================================================================================== 00030 // End of file 00031 //=====================================================================================================
Generated on Fri Jul 15 2022 02:35:37 by
1.7.2