cuboid strong
Dependencies: mbed
DiffCounter.h
00001 /* DiffCounter Class, differentiate encoder counts for cuboid based on LP filter 00002 and unwrapping 00003 00004 1/tau*(z-1) 00005 G(z) = ------------ 00006 z - a0 00007 */ 00008 00009 class DiffCounter{ 00010 public: 00011 DiffCounter(float a,float b); 00012 float operator()(short inc){ 00013 return doStep(inc); 00014 } 00015 virtual ~DiffCounter(); 00016 void reset(float,short); 00017 float doStep(short inc); 00018 float Ts; 00019 00020 private: 00021 00022 float alpha; 00023 float a0; 00024 short inc_old; 00025 float v_old; 00026 long del; 00027 float inc2rad; 00028 };
Generated on Fri Jul 15 2022 09:11:08 by
1.7.2