What sensor can I use to detect circular motion of an Android device, and how can I detect such motion? Maybe using the accelerometer?
Asked
Active
Viewed 1,720 times
0
-
2Define "circular motion" more precisely. – Sean Owen Feb 03 '12 at 04:48
-
like the earth revolving around Sun..@SeanOwen – hari Feb 03 '12 at 05:35
-
The earth spins as it orbits the sun. Maybe you really mean "like a user waving the phone in a circle". It matters, since those motions looks quite different to an accelerometer. So again, you need to say exactly what motion you are detecting to get help on exactly how to detect it. – Sean Owen Feb 03 '12 at 06:11
-
@SeanOwen The second one .. user waving a phone in a circle .. – hari Feb 03 '12 at 06:14
1 Answers
1
I believe the accelerometer would be able to detect a circular motion.
This answer talks about detecting the direction of movement on the x-y axis. You could probably use some of the things mentioned there to begin working on detecting a circular motion.
You would absolutely have to record a lot of historical movement to help determine if the device is moving in a circle. If you can determine direction on the x-y axis, you could then determine circular motion on that same axis if you consider the historical direction.
E.g. for clockwise circular motion on the x-y axis.
UP and RIGHT -> DOWN and RIGHT -> DOWN and LEFT ->UP and LEFT
This would give you a circle.