James Hutchinson
/
IMU6050
Header file and functions
Diff: MPU6050.h
- Revision:
- 7:56e591a74939
- Parent:
- 6:502448484f91
- Child:
- 8:b1570b99df9e
diff -r 502448484f91 -r 56e591a74939 MPU6050.h --- a/MPU6050.h Thu Feb 12 21:01:38 2015 +0000 +++ b/MPU6050.h Fri Feb 13 01:04:17 2015 +0000 @@ -80,6 +80,10 @@ #define RADIANS_TO_DEGREES 180/3.1415926536 +#define ALPHA 0.97 //filter constant + +#define GYRO_SCALE 2.31 //scale the gyro + /** MPU6050 IMU library. * * Example: @@ -266,6 +270,7 @@ //added aditional functions void getAcceleroAngle( float *data ); void getOffset(float *accOffset, float *gyroOffset, int sampleSize); + void computeAngle (float *angle, float *accOffset, float *gyroOffset, float *currTime, float *prevTime); private: