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: mbed MODSERIAL filter mbed-rtos ConfigFile PID PPM FreeIMU_external_magnetometer TinyGPS
Kalman.h
00001 #include "mbed.h" 00002 #include "Global.h" 00003 00004 #ifndef Kalman_H 00005 #define Kalman_H 00006 00007 class Kalman 00008 { 00009 public: 00010 Kalman(double q, double r, double p, double intialValue); 00011 ~Kalman(); 00012 00013 struct KalmanState 00014 { 00015 double q; //process noise covariance 00016 double r; //measurement noise covariance 00017 double x; //value 00018 double p; //estimation error covariance 00019 double k; //kalman gain 00020 }; 00021 00022 double update(double predicted, double measurement); 00023 double getEstimated(); 00024 00025 private: 00026 KalmanState _kalmanState; 00027 00028 }; 00029 #endif
Generated on Fri Jul 15 2022 00:21:58 by
1.7.2