Receiver code for SLVM

Dependencies:   mbed-rtos mbed

Revision:
0:fd289b2e6b74
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/VelocityTracker.h	Tue Dec 09 01:15:37 2014 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+
+#include "LSM9DS0.h"
+
+class VelocityTracker {
+
+public:
+    VelocityTracker(PinName sda, PinName scl, float updateRate, float biasRate);
+    
+    void updateBias();
+    
+    void updateVelocity();
+    
+    float getVelocity();
+    
+private:
+    LSM9DS0 *imu;
+    Ticker biasTicker, updateTicker;
+    float _bias[3];
+    float _vx, _vy, _vz;
+    float _velocity;
+    float _biasRate, _updateRate;
+    int sampleCount;
+};