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?
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.
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.
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.
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.
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With