FSG / PosVelFilter

Fork of PosVelFilter_7_14 by Troy Holley

Revision:
0:82f27e7e99f0
Child:
2:992e774dc62a
diff -r 000000000000 -r 82f27e7e99f0 PosVelFilter.hpp
--- /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