PosVelEKF.h 443 B

123456789101112131415161718
  1. #pragma once
  2. class PosVelEKF {
  3. public:
  4. void init(float pos, float posVar, float vel, float velVar);
  5. void predict(float dt, float dVel, float dVelNoise);
  6. void fusePos(float pos, float posVar);
  7. void fuseVel(float vel, float velVar);
  8. float getPos() const { return _state[0]; }
  9. float getVel() const { return _state[1]; }
  10. float getPosNIS(float pos, float posVar);
  11. private:
  12. float _state[2];
  13. float _cov[3];
  14. };