Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calculating user moving speed in android

I need to calculate Speed with which the user is moving. So we need two things to calculate speed which are GPS and Accelerometer.

But both have their limitations.

1)GPS is not available all the time.While I getting the current location of user always I am getting from Network provider only and not from GPS.

2)Accelerometer is not accurate.

So which approach should I go with?

like image 935
koti Avatar asked Jul 25 '12 06:07

koti


People also ask

How to calculate running speed using accelerometer sensor in Android?

Apparently, it is impossible to measure speed and distance using the accelerometer; it is prohibited by the fundamental physical principles: all phenomena in different reference system moving at uniform speeds go in the same way, so you cannot detect any difference between them from inside the system.

Can we calculate the speed by using accelerometer?

No, accelerometer can sense only the change of the speed. It can't physically detect absolute speed. The most you can do it is to integrate the acceleration from a point where the speed was known. Some time after the speed was known you will have updated speed value.

How does GPS calculate car speed?

Step 1: Using GPS trackers to calculate speed The formula for calculating speed is speed equals distance covered divided by the time taken often represented as x = d/t. By using two GPS points (locations) we can calculate the distance covered.

How do you calculate speed using latitude and longitude?

First we plot the two GPS points on a spherical model of the earth, then calculate the angle between them using a dot product, then calculate the 'Great Circle' distance using this angle and the earth's radius and finally we divide by the elapsed time to approximate the speed.


1 Answers

The most accurate results can be obtained by using both of them, through sensor fusion. See my previous answer to question Using accelerometer to calculate speeds or to another question GPS V.S. accelerometer to calculate distance.

As for the accuracy of the accelerometer, see Get velocity from 3DVector using accelerometer sensor.

If you want to track the user indoor, see what you can actually do at question Android accelerometer accuracy (Inertial navigation).

like image 71
Ali Avatar answered Oct 03 '22 00:10

Ali