IMU filter
Fork of IMUfilter by
Diff: IMUfilter.h
- Revision:
- 3:a2f4c5c123e6
- Parent:
- 2:fae851819c43
--- a/IMUfilter.h Fri Jul 05 04:17:19 2013 +0000 +++ b/IMUfilter.h Sun Mar 23 22:06:54 2014 +0000 @@ -4,16 +4,6 @@ #include "mbed.h" #define PI 3.1415926536 -#define g0 9.812865328//Gravity at Earth's surface in m/s/s -#define SAMPLES 4//Number of samples to average. -#define CALIBRATION_SAMPLES 64//128//Number of samples to be averaged for a null bias calculation//during calibration. -#define toDegrees(x) (x * 57.2957795)//Convert from radians to degrees. -#define toRadians(x) (x * 0.01745329252)//Convert from degrees to radians. -#define GYROSCOPE_GAIN (1 / 14.375)//ITG-3200 sensitivity is 14.375 LSB/(degrees/sec). -#define ACCELEROMETER_GAIN (0.004 * g0)//Full scale resolution on the ADXL345 is 4mg/LSB. -#define GYRO_RATE 0.005//Sampling gyroscope at 200Hz. -#define ACC_RATE 0.005//Sampling accelerometer at 200Hz. -#define FILTER_RATE 0.1//Updating filter at 40Hz. class IMUfilter {