Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BLE_API_Tiny_BLE MPU6050-DMP-Seeed-Tiny-BLE mbed
kalman.h
00001 #ifndef __KALMAN_H__ 00002 #define __KALMAN_H__ 00003 00004 #define DT 0.01f // 100Hz 00005 00006 // Q diagonal 3x3 with these elements on diagonal 00007 #define Q1 5.0f 00008 #define Q2 100.0f 00009 #define Q3 0.01f 00010 00011 // R diagonal 2x2 with these elements on diagonal 00012 #define R1 1000.0f 00013 #define R2 1000.0f 00014 00015 00016 00017 00018 struct _kalman_data 00019 { 00020 float x1, x2, x3; 00021 float p11, p12, p13, p21, p22, p23, p31, p32, p33; 00022 float q1, q2, q3; 00023 float r1, r2; 00024 }; 00025 00026 typedef struct _kalman_data kalman_data; 00027 00028 void kalman_innovate(kalman_data *data, float z1, float z2); 00029 //void kalman_init(void); 00030 void kalman_init(kalman_data *data); 00031 00032 #endif 00033 00034 00035 00036
Generated on Tue Jul 12 2022 18:38:30 by
1.7.2