Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: VelocityTracker.h
- Revision:
- 0:354a8831107d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/VelocityTracker.h Wed Dec 03 22:33:03 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;
+};
\ No newline at end of file