2014 Eurobot fork
Dependencies: mbed-rtos mbed QEI
Processes/Kalman/Kalman.h
- Committer:
- madcowswe
- Date:
- 2013-04-07
- Revision:
- 16:52250d8d8fce
- Child:
- 19:4b993a9a156e
File content as of revision 16:52250d8d8fce:
#ifndef KALMAN_H #define KALMAN_H //#include "globals.h" namespace Kalman { typedef struct state { float x; float y; float theta; } state ; //Accessor function to get the state as one consistent struct state getState(); //Main loops (to be attached as a thread in main) void predictloop(void* dummy); void updateloop(void* dummy); enum measurement_t {SONAR0 = 0, SONAR1, SONAR2, IR0, IR1, IR2}; const measurement_t maxmeasure = IR3; //Call this to run an update void runupdate(measurement_t type, float value, float variance); extern float RawReadings[maxmeasure+1]; extern float SensorOffsets[maxmeasure+1]; extern bool Kalman_init; //Initialises the kalman filter void KalmanInit(); // reset kalman states void KalmanReset(); } #endif //KALMAN_H