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
Diff: PosVelFilter.hpp
- Revision:
- 0:82f27e7e99f0
- Child:
- 2:992e774dc62a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/PosVelFilter.hpp Thu Apr 27 13:15:55 2017 +0000
@@ -0,0 +1,42 @@
+#ifndef MBED_DEPTHFILTER_H
+#define MBED_DEPTHFILTER_H
+
+#include "mbed.h"
+
+class PosVelFilter
+{
+public:
+ PosVelFilter();
+
+ void update();
+
+ void init();
+
+ float getPosition();
+ float getVelocity();
+ float getDt();
+
+ // void setConfigFlag();
+ void writeWn(float wn);
+
+protected:
+ float x1;
+ float x2;
+ float x2_dot;
+ float x1_dot;
+ float w_n;
+
+ float last_time;
+ float curr_time;
+ float dt;
+
+ float conv_distance;
+ float position;
+ float velocity;
+
+ // bool readConfiguration();
+ // bool configFlag;
+ // int count;
+};
+
+#endif
\ No newline at end of file
