0

I tried various examples for measuring speed using accelerometer, but it is not giving proper output.

I used below formula for calculating speed

final double mph = (Math.round(100 * velocity / 1.6 * 3.6)) / 100;

but it is not giving proper output. Does anybody know how to calculate speed using accelerometer?

Sumit Bijvani
  • 8,154
  • 17
  • 50
  • 82
user1134427
  • 111
  • 1
  • 8

2 Answers2

0

Theoretically saying, since accelerometer measures the acceleration (which it derives from Force experienced), it will not be able to measure speed unless the initial speed is known.

So, if you know the initial speed (or speed of the frame of reference, which you might assume as 0) you can get the speed. But I'm not sure if getting speed from accelerometer is a practical idea. You might want to rely on the APIs which provide you with locations.

jaibatrik
  • 6,770
  • 9
  • 33
  • 62
0

A = Delta V/T.

OR A is proportional to V but we cannot get V initial or final.

you can get it by approximating or assuming the initial speed as 0