According to apple documentation , the accelerometer measures acceleration along the axis, and gyro measure the rotation rate around the axis .
In reality , things are very strange .
When using the accelerometer function:
- (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration
it seems that the gyro and accelerometer are working together .
When fast moving along the x axis, i get values bigger then 1 like 1.5-2 ,which is ok cause i get acceleration. but when rotating the iphone AROUND its x axis, the values also changing between 0-1, for example , if i hold it and the value is 0.3 ,and the i rotate it a little bit, i see 0.6, if i rotate more its 0.8. but this is a behavior of a gyro , because when velocity is 0 (i stop the rotation) i should see acceleration -0 and not 0.6 . it seems to show me the gyro angle position .
Whats happen here anyway ? the values should be 0, till i move it fast ALONG the axis not around it .
I couldnt find any answer and it seems that many people dont really understand that .
Before All we must agree on terms:
In my opinion APPLE is wrong when it calls acceleration the values you get from sensor.
Acceleration in the second derivative of translation, so d(dx)/d(dt), so when an iphone is steady, should be zero.
in my opinion these values are simply angles.
See apple samples, the use a “2nd order filter” to get acceleration.. “2nd” order filter means 2nd derivate, if I remember correctly what I studied.
Hope this can help.