With the method in this link
http://www.cplusplus.com/forum/general/103788/
I've got the derivative of stream experimental data which represents position(x, y, z). I got x',y',z'. However, from the results that I've got, it seems that the data is corrupted by noise, so I need to smooth them. Fortunately, the device gives me the actual velocities, so I'm able to compare the method with the actual velocities.
Velocities is being captured by the device
http://s21.postimg.org/tcg21xzdj/actual_Velocities.png
Velocities by the aforementioned method
http://s21.postimg.org/7wjc1qzbr/cvelocities.png
filtered Velocities of the aforementioned method by using Matlab ( using Savitzky-Golay method)
http://s22.postimg.org/z9t4a9q5d/filtered.png
I found this method Savitzky-Golay for smoothing the derivative. I'm trying to understand the method and implement it in C++. Also, each position is a function of time x(t_n), y(t_n), z(t_n) and the sampling rate is 1kHz (1msec). The unit of position is millimeter.
Any suggestions will be appreciated.