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.
Fork of PosVelFilter_7_14 by
PosVelFilter.hpp@2:992e774dc62a, 2017-07-17 (annotated)
- Committer:
- tnhnrl
- Date:
- Mon Jul 17 14:24:27 2017 +0000
- Revision:
- 2:992e774dc62a
- Parent:
- 0:82f27e7e99f0
- Child:
- 3:8107bb13278b
7 14 commit
;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| tzyoung | 0:82f27e7e99f0 | 1 | #ifndef MBED_DEPTHFILTER_H |
| tzyoung | 0:82f27e7e99f0 | 2 | #define MBED_DEPTHFILTER_H |
| tzyoung | 0:82f27e7e99f0 | 3 | |
| tzyoung | 0:82f27e7e99f0 | 4 | #include "mbed.h" |
| tzyoung | 0:82f27e7e99f0 | 5 | |
| tzyoung | 0:82f27e7e99f0 | 6 | class PosVelFilter |
| tzyoung | 0:82f27e7e99f0 | 7 | { |
| tzyoung | 0:82f27e7e99f0 | 8 | public: |
| tzyoung | 0:82f27e7e99f0 | 9 | PosVelFilter(); |
| tzyoung | 0:82f27e7e99f0 | 10 | |
| tzyoung | 0:82f27e7e99f0 | 11 | void update(); |
| tzyoung | 0:82f27e7e99f0 | 12 | |
| tzyoung | 0:82f27e7e99f0 | 13 | void init(); |
| tzyoung | 0:82f27e7e99f0 | 14 | |
| tzyoung | 0:82f27e7e99f0 | 15 | float getPosition(); |
| tzyoung | 0:82f27e7e99f0 | 16 | float getVelocity(); |
| tzyoung | 0:82f27e7e99f0 | 17 | float getDt(); |
| tzyoung | 0:82f27e7e99f0 | 18 | |
| tnhnrl | 2:992e774dc62a | 19 | //NEW TROY |
| tnhnrl | 2:992e774dc62a | 20 | float get_conv_distance(); |
| tnhnrl | 2:992e774dc62a | 21 | float get_curr_time(); |
| tnhnrl | 2:992e774dc62a | 22 | float get_last_time(); |
| tnhnrl | 2:992e774dc62a | 23 | float get_x1_dot(); |
| tnhnrl | 2:992e774dc62a | 24 | float get_x2_dot(); |
| tnhnrl | 2:992e774dc62a | 25 | float get_x1(); |
| tnhnrl | 2:992e774dc62a | 26 | float get_x2(); |
| tnhnrl | 2:992e774dc62a | 27 | |
| tzyoung | 0:82f27e7e99f0 | 28 | // void setConfigFlag(); |
| tzyoung | 0:82f27e7e99f0 | 29 | void writeWn(float wn); |
| tzyoung | 0:82f27e7e99f0 | 30 | |
| tzyoung | 0:82f27e7e99f0 | 31 | protected: |
| tzyoung | 0:82f27e7e99f0 | 32 | float x1; |
| tzyoung | 0:82f27e7e99f0 | 33 | float x2; |
| tzyoung | 0:82f27e7e99f0 | 34 | float x2_dot; |
| tzyoung | 0:82f27e7e99f0 | 35 | float x1_dot; |
| tzyoung | 0:82f27e7e99f0 | 36 | float w_n; |
| tzyoung | 0:82f27e7e99f0 | 37 | |
| tzyoung | 0:82f27e7e99f0 | 38 | float last_time; |
| tzyoung | 0:82f27e7e99f0 | 39 | float curr_time; |
| tzyoung | 0:82f27e7e99f0 | 40 | float dt; |
| tzyoung | 0:82f27e7e99f0 | 41 | |
| tzyoung | 0:82f27e7e99f0 | 42 | float conv_distance; |
| tzyoung | 0:82f27e7e99f0 | 43 | float position; |
| tzyoung | 0:82f27e7e99f0 | 44 | float velocity; |
| tzyoung | 0:82f27e7e99f0 | 45 | |
| tzyoung | 0:82f27e7e99f0 | 46 | // bool readConfiguration(); |
| tzyoung | 0:82f27e7e99f0 | 47 | // bool configFlag; |
| tzyoung | 0:82f27e7e99f0 | 48 | // int count; |
| tzyoung | 0:82f27e7e99f0 | 49 | }; |
| tzyoung | 0:82f27e7e99f0 | 50 | |
| tzyoung | 0:82f27e7e99f0 | 51 | #endif |
