Low Pass Filter for JavaScript
Overview
Lightweight algorithm to for smoothing series of values. Low Pass Filter muffles fast (high-frequency) changes to the signal. For more information visit http://en.wikipedia.org/wiki/Low-pass_filter
Installation
npm install lpf
Examples
// Array of valuesLPFsmoothing = 05;var values = 1089101285010128;LPF// RESULT: [10,9,9,10,11,9,30,20,16,12] // StreamLPFsmoothing = 02;LPF;LPFnext20; // around 12.0LPFnext10; // around 10.3
Testing
Open folder and run:
mocha -R spec
License
Software is licensed under MIT license. For more information check LICENSE file.