2

I want to develop the application with current location plotting on the google map. Here i am getting the location details through onLocationChanged of LocationManager(GPS PROVIDER & NETWORK PROVIDER). I am able to get the location details. But sometimes, The gps drift is received(i.e., Showing my current location in some other place). how to avoid this type of drifting.

  • If you want accuracy, consider using [Location APIs](http://developer.android.com/google/play-services/location.html) – j4rey Dec 05 '14 at 09:10

1 Answers1

1

You can avoid drifiting, by ignoring locations when location.speed is near standstill.

Otherwise you cannot, GPS is the best location technic, it sometimes drift, there is nothing better. There are some technics to avoid incaurate GPS like waiting after intializig GPS for some seconds, and don't us ethe froist few locations, or to check the value of horicontalAccuracyEstimation.

Further your expression "showing my location on some other place" is not very descriptive, You should add how many meters the location (or map) is wrong,

Beeing outdoors in cities a dispalcement of 30m or even more can happen, this is nothing unusual.

AlexWien
  • 28,470
  • 6
  • 53
  • 83
  • Hi Alex. thanks for your answer. yes, i had 100 meter near difference(Drifted) from my current place. And also, I have some distance calculation in onLocationChanged interface using this link http://stackoverflow.com/a/20399045/4073227. If i ignore the locations while getting the speed<10(Near stand still), the walking speed will also be ignored right. – Jayaprakash Marshal Dec 08 '14 at 07:09
  • 100m is much if you are outside with good view to sky. That should nothappen. If you are sitting in a building near a window it may happen. for distance calculation both android and ios have also build in methods. – AlexWien Dec 09 '14 at 19:04