CSSE4011_BLE_IMU IMU Seeed Tiny Ble

Dependencies:   BLE_API_Tiny_BLE MPU6050-DMP-Seeed-Tiny-BLE mbed

Committer:
flywind
Date:
Wed Jun 10 09:46:16 2015 +0000
Revision:
0:f90c3452d779
CSSE4011_Seed-Tiny-BLE

Who changed what in which revision?

UserRevisionLine numberNew contents of line
flywind 0:f90c3452d779 1 #ifndef __KALMAN_H__
flywind 0:f90c3452d779 2 #define __KALMAN_H__
flywind 0:f90c3452d779 3
flywind 0:f90c3452d779 4 #define DT 0.01f // 100Hz
flywind 0:f90c3452d779 5
flywind 0:f90c3452d779 6 // Q diagonal 3x3 with these elements on diagonal
flywind 0:f90c3452d779 7 #define Q1 5.0f
flywind 0:f90c3452d779 8 #define Q2 100.0f
flywind 0:f90c3452d779 9 #define Q3 0.01f
flywind 0:f90c3452d779 10
flywind 0:f90c3452d779 11 // R diagonal 2x2 with these elements on diagonal
flywind 0:f90c3452d779 12 #define R1 1000.0f
flywind 0:f90c3452d779 13 #define R2 1000.0f
flywind 0:f90c3452d779 14
flywind 0:f90c3452d779 15
flywind 0:f90c3452d779 16
flywind 0:f90c3452d779 17
flywind 0:f90c3452d779 18 struct _kalman_data
flywind 0:f90c3452d779 19 {
flywind 0:f90c3452d779 20 float x1, x2, x3;
flywind 0:f90c3452d779 21 float p11, p12, p13, p21, p22, p23, p31, p32, p33;
flywind 0:f90c3452d779 22 float q1, q2, q3;
flywind 0:f90c3452d779 23 float r1, r2;
flywind 0:f90c3452d779 24 };
flywind 0:f90c3452d779 25
flywind 0:f90c3452d779 26 typedef struct _kalman_data kalman_data;
flywind 0:f90c3452d779 27
flywind 0:f90c3452d779 28 void kalman_innovate(kalman_data *data, float z1, float z2);
flywind 0:f90c3452d779 29 //void kalman_init(void);
flywind 0:f90c3452d779 30 void kalman_init(kalman_data *data);
flywind 0:f90c3452d779 31
flywind 0:f90c3452d779 32 #endif
flywind 0:f90c3452d779 33
flywind 0:f90c3452d779 34
flywind 0:f90c3452d779 35
flywind 0:f90c3452d779 36