Horizontal and vertical amount of shaking using accelerometer in iPhone / iPad

I want to count the amount of jitter horizontally and vertically, I mentioned UIAcceleration

I also referred to Traffic Events

But could not find a better approach. Any help is much appreciated, code, link or any type.

I just want to count the number of users shaking by shaking the iphone device, shaking can be vertical or horizontal, holding the iphone in the usual way (home key at the bottom)

+4
source share
1 answer

Try DiceShaker . You will need to use the "Instant Motion Isolation from Acceleration Data" code in Listing 4-6 of the motion events (also called high -pass filter computation) to detect the acceleration provided by the user.

EDIT: The accelerometer constantly provides gravity readings as the accelerometer works with a bunch of springs that determine the force component (in the direction of each spring length) by increasing / decreasing the spring length. Therefore, simply remove the constant gravity component (the labor force that ALWAYS works) to detect the change provided by the user (hence the name high-pass). Fortunately, we do not need to figure out how this happened because Apple did the hard work and gave the equations in its documentation!

+4
source

All Articles