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.
VelocityTracker.h
- Committer:
- jerziboi732
- Date:
- 2014-12-03
- Revision:
- 0:354a8831107d
File content as of revision 0:354a8831107d:
#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;
};