You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 29, 2020. It is now read-only.
You take a direct difference between accelerations (https://github.com/alexgibson/shake.js/blob/master/shake.js#L100) without accounting for the sampling frequency. That means that any variance in sampling frequency will change the effective threshold. You should at a minimum divide the difference by e.interval, and ideally perform smoothing on the values to simulate a consistent low sampling rate.
Those changes should make this perform near-identically on all devices.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I noticed that threshold needs to be adjusted from device to device. There isn't a way to calibrate it?
The text was updated successfully, but these errors were encountered: