NOT FINISHED YET!!! My first try to get a self built fully working Quadrocopter based on an mbed, a self built frame and some other more or less cheap parts.

Dependencies:   mbed MODI2C

Committer:
maetugr
Date:
Wed Nov 28 12:29:02 2012 +0000
Revision:
27:9e546fa47c33
Parent:
26:96a072233d7a
after inserting RC-calibration (not tested yet)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
maetugr 26:96a072233d7a 1 // by MaEtUgR
maetugr 26:96a072233d7a 2
maetugr 26:96a072233d7a 3 #ifndef IMU_FILTER_H
maetugr 26:96a072233d7a 4 #define IMU_FILTER_H
maetugr 26:96a072233d7a 5
maetugr 26:96a072233d7a 6 #include "mbed.h"
maetugr 26:96a072233d7a 7
maetugr 26:96a072233d7a 8 #define Rad2Deg 57.295779513082320876798154814105 // factor between radians and degrees of angle (180/Pi)
maetugr 26:96a072233d7a 9
maetugr 26:96a072233d7a 10 class IMU_Filter
maetugr 26:96a072233d7a 11 {
maetugr 26:96a072233d7a 12 public:
maetugr 26:96a072233d7a 13 IMU_Filter();
maetugr 26:96a072233d7a 14 void compute(unsigned long dt, const float * gyro_data, const int * acc_data);
maetugr 26:96a072233d7a 15 float angle[3]; // calculated values of the position [0: x,roll | 1: y,pitch | 2: z,yaw]
maetugr 26:96a072233d7a 16 private:
maetugr 26:96a072233d7a 17 float d_Gyro_angle[3];
maetugr 26:96a072233d7a 18 void get_Acc_angle(const int * Acc_data);
maetugr 26:96a072233d7a 19 float Acc_angle[3];
maetugr 26:96a072233d7a 20 };
maetugr 26:96a072233d7a 21
maetugr 26:96a072233d7a 22 #endif