refactored accelerometer.js
fixed bugs of gaussian filter