2014 Eurobot fork

Dependencies:   mbed-rtos mbed QEI

Committer:
madcowswe
Date:
Wed Apr 10 19:52:19 2013 +0000
Revision:
33:a49197572737
Parent:
26:7cb3a21d9a2e
Child:
48:254b124cef02
untuned navigation half working

Who changed what in which revision?

UserRevisionLine numberNew contents of line
madcowswe 16:52250d8d8fce 1 #ifndef KALMAN_H
madcowswe 16:52250d8d8fce 2 #define KALMAN_H
madcowswe 16:52250d8d8fce 3
rsavitski 24:50805ef8c499 4 #include "globals.h"
madcowswe 20:70d651156779 5 #include "rtos.h"
madcowswe 16:52250d8d8fce 6
madcowswe 16:52250d8d8fce 7 namespace Kalman
madcowswe 16:52250d8d8fce 8 {
madcowswe 16:52250d8d8fce 9
madcowswe 16:52250d8d8fce 10 //Accessor function to get the state as one consistent struct
madcowswe 20:70d651156779 11 State getState();
madcowswe 16:52250d8d8fce 12
madcowswe 16:52250d8d8fce 13 //Main loops (to be attached as a thread in main)
madcowswe 21:167dacfe0b14 14 void predictloop(void const*);
madcowswe 21:167dacfe0b14 15 void updateloop(void const*);
madcowswe 16:52250d8d8fce 16
madcowswe 20:70d651156779 17 void start_predict_ticker(Thread* predict_thread_ptr_in);
madcowswe 16:52250d8d8fce 18
madcowswe 16:52250d8d8fce 19 enum measurement_t {SONAR0 = 0, SONAR1, SONAR2, IR0, IR1, IR2};
madcowswe 19:4b993a9a156e 20 const measurement_t maxmeasure = IR2;
madcowswe 16:52250d8d8fce 21
madcowswe 16:52250d8d8fce 22 //Call this to run an update
madcowswe 16:52250d8d8fce 23 void runupdate(measurement_t type, float value, float variance);
madcowswe 16:52250d8d8fce 24
madcowswe 16:52250d8d8fce 25 extern float RawReadings[maxmeasure+1];
madcowswe 22:6e3218cf75f8 26 extern float IRphaseOffset;
madcowswe 16:52250d8d8fce 27
madcowswe 20:70d651156779 28 extern bool Kalman_inited;
madcowswe 16:52250d8d8fce 29
madcowswe 16:52250d8d8fce 30 //Initialises the kalman filter
madcowswe 16:52250d8d8fce 31 void KalmanInit();
madcowswe 16:52250d8d8fce 32
madcowswe 16:52250d8d8fce 33 }
madcowswe 16:52250d8d8fce 34
madcowswe 16:52250d8d8fce 35 #endif //KALMAN_H