Reputation: 10971
is it possible to detect the device motion direction (up/down/left/right) and displacement from an initial position based on the values read from the accelerometer?
Upvotes: 2
Views: 2947
Reputation: 39406
The accelerometer gives you … accelerations. Theorically, by knowing the initial speed and position, the constant background accelerations (gravity, mostly), you could integrate and get speed and movement. You would however end up with large incertainties due to integrating the sensor incertainty.
You would need more measurements to filter out errors (the camera may help you, for instance)
Basically, it is not really possible.
Upvotes: 3