Receiver code for SLVM

Dependencies:   mbed-rtos mbed

VelocityTracker.h

Committer:
jnagendran3
Date:
2014-12-09
Revision:
0:fd289b2e6b74

File content as of revision 0:fd289b2e6b74:

#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;
};