CSSE

Dependencies:   BLE_API eMPL_MPU6050 mbed nRF51822

Committer:
tmushie
Date:
Thu Jun 04 06:06:28 2015 +0000
Revision:
4:0bb9b3bf75ba
Parent:
3:88db44c43914
kk

Who changed what in which revision?

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