ICRS Eurobot 2013
Dependencies: mbed mbed-rtos Servo QEI
Kalman.h
00001 #ifndef KALMAN_H 00002 #define KALMAN_H 00003 00004 //#include "globals.h" 00005 #include "rtos.h" 00006 00007 namespace Kalman 00008 { 00009 00010 typedef struct State { 00011 float x; 00012 float y; 00013 float theta; 00014 } State ; 00015 00016 //Accessor function to get the state as one consistent struct 00017 State getState(); 00018 00019 //Main loops (to be attached as a thread in main) 00020 void predictloop(void const *dummy); 00021 void updateloop(void const *dummy); 00022 00023 void start_predict_ticker(Thread* predict_thread_ptr_in); 00024 00025 enum measurement_t {SONAR0 = 0, SONAR1, SONAR2, IR0, IR1, IR2}; 00026 const measurement_t maxmeasure = IR2; 00027 00028 //Call this to run an update 00029 void runupdate(measurement_t type, float value, float variance); 00030 00031 extern float RawReadings[maxmeasure+1]; 00032 extern float IRpahseOffset; 00033 00034 extern bool Kalman_inited; 00035 00036 //Initialises the kalman filter 00037 void KalmanInit(); 00038 00039 } 00040 00041 #endif //KALMAN_H
Generated on Wed Jul 13 2022 18:28:36 by 1.7.2