Android Speed based on accelerometer values

Posted by fraguas on Stack Overflow See other posts from Stack Overflow or by fraguas
Published on 2010-04-19T23:47:05Z Indexed on 2010/04/19 23:53 UTC
Read the original article Hit count: 173

Filed under:
|

Hi.

I need to obtain the velocity of an android device, based on the accelerometer values. I made a code that allows me to get the accelerometer values, and then I calculate the velocity, using the formula: v = v0 + at. (vector calculation)

My problem is that my velocity only increases and never decreases. I think the problem is that the device never gets an negative acceleration.

Can you help me with this?

© Stack Overflow or respective owner

Related posts about android

Related posts about java