Clara Keng / Mbed 2 deprecated FreeFlyerROS_clarakhl

Dependencies:   mbed ros_lib_kinetic

Revision:
0:dd126a1080d3
Child:
1:40bdbe1a93b7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilities.h	Tue Feb 14 05:12:54 2017 +0000
@@ -0,0 +1,23 @@
+
+#ifndef UTILITIES_H_INCLUDED
+#define UTILITIES_H_INCLUDED
+
+#include "mbed.h"
+
+namespace utils {
+    // From http://playground.arduino.cc/Main/Smooth
+    /*Details: Smooth takes three parameters, the value to smoothed, the filter value (filterVal), and smoothedVal.
+    
+     float  sensVal - the sensor variable - raw material to be smoothed
+    
+     float  filterVal - The filter value is a float and must be between 0 and .9999 say. 0 is off (no smoothing) and .9999 is maximum smoothing.
+     The actual performance of the filter is going to be dependent on fast you are sampling your sensor (the total loop time), so 
+     some trial and error will probably be necessary to get the desired response.
+    
+     smoothedVal    -  Use this for the output of the sensor and also feed it back into the loop. Each sensor needs its own value.
+     Don't use this variable for any other purpose.*/
+    float smooth(float data, float filterVal, float smoothedVal);
+} // end utils namespace
+
+
+#endif  // End include guard
\ No newline at end of file