Lib_Misc
Diff: DiffCounter.h
- Revision:
- 0:3312872854c4
diff -r 000000000000 -r 3312872854c4 DiffCounter.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/DiffCounter.h Mon Mar 04 11:03:51 2019 +0000 @@ -0,0 +1,29 @@ +#ifndef DIFFCOUNTER_H_ +#define DIFFCOUNTER_H_ + +class DiffCounter +{ +public: + + DiffCounter(float T, float Ts); + + float operator()(short inc) { + return doStep(inc); + } + + virtual ~DiffCounter(); + + void reset(float initValue, short inc); + float doStep(short inc); + +private: + + double b; + double a; + short incPast; + double vel; + double inc2rad; + +}; + +#endif /* DIFFCOUNTER_H_ */ \ No newline at end of file