2014 Eurobot fork

Dependencies:   mbed-rtos mbed QEI

Revision:
16:52250d8d8fce
Child:
19:4b993a9a156e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Processes/Kalman/Kalman.h	Sun Apr 07 16:50:36 2013 +0000
@@ -0,0 +1,41 @@
+#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
\ No newline at end of file