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.
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 Mon Jul 18 2022 18:17:56 by
1.7.2