/*
Copyright(C) 2019- White Noise Team
One dimensional Kalman Filter implementation for
use with BNO055 IMU to filter noisy gyro and
accelerometer measurements.
This software is distributed under the MIT License
This file includes the headers of the Kalman Filter API
*/classKalman{public:float R, Q, A, B, C;float cov;float x;// Signal without noisebool init;Kalman(float r,float q,float a,float b,float c);floatfilter(float z,float u);floatpredict(float u);floatuncertainty();};
Cpp
/*
Copyright(C) 2019- White Noise Team
One dimensional Kalman Filter implementation for
use with BNO055 IMU to filter noisy gyro and
accelerometer measurements.
This software is distributed under the MIT License
This file includes the source of the Kalman Filter API
*/#include"Kalman.h"Kalman::Kalman(float r,float q,float a,float b,float c){
R = r;
Q = q;
A = a;
B = b;
C = c;
init =false;}floatKalman::filter(float z,float u){if(!init){
x =1/ C * z;
cov = Q /(C * C);
init =true;}else{float pred =predict(u);float p_cov =uncertainty();float K = p_cov * C /(C * C * p_cov + Q);
x = pred + K *(z - C * pred);
cov = p_cov - K * C * p_cov;}return x;}floatKalman::predict(float u){return A * x + B * u;}floatKalman::uncertainty(){return A * A * cov + R;}
example
#include"Kalman.h"#include<cstdlib>#include<iostream>usingnamespace std;floatrandn(){return(float)rand()/(float) RAND_MAX;}intmain(){
Kalman *F =newKalman(1,1,1,1,1);float z;for(int i =0; i <1000; i++){
z =randn();
F->filter(z,0);
cout <<"t: "<< i <<" x: "<< F->x <<" z: "<< z << endl;}}
1.研究背景与意义
项目参考AAAI Association for the Advancement of Artificial Intelligence
研究背景与意义
随着科技的不断发展,深度学习技术在各个领域都取得了显著的成果。其中,基于深度学习的图像识别技术在计算机视觉领域具有重要的应用价值。…
antdesign前端一直加载不出来
报错:Module “./querystring” does not exist in container. while loading “./querystring” from webpack/container/reference/mf at mf-va_remoteEntry.js:751:11
解决方案:Error: Module “xxx“ does not exist …