..

Committer:
zollecy1
Date:
Wed Apr 29 10:53:03 2020 +0000
Revision:
1:0d456c561eab
Parent:
0:da9dac34fd93
..

Who changed what in which revision?

UserRevisionLine numberNew contents of line
b50559 0:da9dac34fd93 1 //=====================================================================================================
b50559 0:da9dac34fd93 2 // MahonyAHRS.h
b50559 0:da9dac34fd93 3 //=====================================================================================================
b50559 0:da9dac34fd93 4 //
b50559 0:da9dac34fd93 5 // Madgwick's implementation of Mayhony's AHRS algorithm.
b50559 0:da9dac34fd93 6 // See: http://www.x-io.co.uk/node/8#open_source_ahrs_and_imu_algorithms
b50559 0:da9dac34fd93 7 //
b50559 0:da9dac34fd93 8 // Date Author Notes
b50559 0:da9dac34fd93 9 // 29/09/2011 SOH Madgwick Initial release
b50559 0:da9dac34fd93 10 // 02/10/2011 SOH Madgwick Optimised for reduced CPU load
b50559 0:da9dac34fd93 11 //
b50559 0:da9dac34fd93 12 //=====================================================================================================
b50559 0:da9dac34fd93 13 #ifndef MahonyAHRS_h
b50559 0:da9dac34fd93 14 #define MahonyAHRS_h
b50559 0:da9dac34fd93 15
b50559 0:da9dac34fd93 16 //----------------------------------------------------------------------------------------------------
b50559 0:da9dac34fd93 17
b50559 0:da9dac34fd93 18 class MahonyAHRS{
b50559 0:da9dac34fd93 19
b50559 0:da9dac34fd93 20 public:
b50559 0:da9dac34fd93 21
b50559 0:da9dac34fd93 22 MahonyAHRS(float Freq);
b50559 0:da9dac34fd93 23
b50559 0:da9dac34fd93 24 //Function declarations
b50559 0:da9dac34fd93 25 void update(float gx, float gy, float gz, float ax, float ay, float az, float mx, float my, float mz);
b50559 0:da9dac34fd93 26 void updateIMU(float gx, float gy, float gz, float ax, float ay, float az);
b50559 0:da9dac34fd93 27 void getEuler();
b50559 0:da9dac34fd93 28 int16_t getRoll();
b50559 0:da9dac34fd93 29 int16_t getPitch();
b50559 0:da9dac34fd93 30 int16_t getYaw();
b50559 0:da9dac34fd93 31
b50559 0:da9dac34fd93 32
b50559 0:da9dac34fd93 33 private:
b50559 0:da9dac34fd93 34
b50559 0:da9dac34fd93 35 // Variable declaration
b50559 0:da9dac34fd93 36 float sampleFreq;
b50559 0:da9dac34fd93 37 float roll;
b50559 0:da9dac34fd93 38 float pitch;
b50559 0:da9dac34fd93 39 float yaw;
b50559 0:da9dac34fd93 40 };
b50559 0:da9dac34fd93 41
b50559 0:da9dac34fd93 42 #endif
b50559 0:da9dac34fd93 43 //=====================================================================================================
b50559 0:da9dac34fd93 44 // End of file
b50559 0:da9dac34fd93 45 //=====================================================================================================