1

I tried the Location.getSpeed() method and I tried calculating speed using distance/time. I am using GPS (high accuracy) so I started driving around. The calculated one was way more accurate than the getSpeed one. I am talking driving at 30 Km/hr, the calculated would be like 28 but the getSpeed would be like 8

Is this normal? I thought getSpeed is more accurate but apparently not.

Let me know if I am missing something please

Snake
  • 13,734
  • 22
  • 106
  • 242

1 Answers1

4

Location.getSpeed() returns meters/second, not km/h.

8 m/s is 28.8 km/h, which matches your speed.

http://developer.android.com/reference/android/location/Location.html#getSpeed%28%29

Antonio MG
  • 20,296
  • 3
  • 42
  • 62