Quantcast
Channel: User kubi - Stack Overflow
Viewing all articles
Browse latest Browse all 39

Answer by kubi for How can I detect if an iPhone is rotating while being face up in a table?

$
0
0

When the phone is stationary the sum of the acceleration vectors should be +1. When the phone is rotating (assuming the sensor is off-center) the sum of the vectors should be more than 1 and (hopefully) somewhat constant.

If you look at the decay of that curve, I wouldn't be surprised if that shape is distinctive enough to be used to determine whether the phone is rotating or not.

alt text

This is the AccelerometerGraph sample app from Apple.


Viewing all articles
Browse latest Browse all 39

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>