0

What sensor can I use to detect circular motion of an Android device, and how can I detect such motion? Maybe using the accelerometer?

Peter O.
  • 32,158
  • 14
  • 82
  • 96
hari
  • 2,639
  • 3
  • 16
  • 14
  • 2
    Define "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 Answers1

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.

Community
  • 1
  • 1
Louth
  • 11,401
  • 5
  • 28
  • 37