..
Embed:
(wiki syntax)
Show/hide line numbers
MahonyAHRS.h
00001 //===================================================================================================== 00002 // MahonyAHRS.h 00003 //===================================================================================================== 00004 // 00005 // Madgwick's implementation of Mayhony's AHRS algorithm. 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 MahonyAHRS_h 00014 #define MahonyAHRS_h 00015 00016 //---------------------------------------------------------------------------------------------------- 00017 00018 class MahonyAHRS{ 00019 00020 public: 00021 00022 MahonyAHRS(float Freq); 00023 00024 //Function declarations 00025 void update(float gx, float gy, float gz, float ax, float ay, float az, float mx, float my, float mz); 00026 void updateIMU(float gx, float gy, float gz, float ax, float ay, float az); 00027 void getEuler(); 00028 int16_t getRoll(); 00029 int16_t getPitch(); 00030 int16_t getYaw(); 00031 00032 00033 private: 00034 00035 // Variable declaration 00036 float sampleFreq; 00037 float roll; 00038 float pitch; 00039 float yaw; 00040 }; 00041 00042 #endif 00043 //===================================================================================================== 00044 // End of file 00045 //=====================================================================================================
Generated on Sun Jul 17 2022 01:44:57 by 1.7.2