Hi,
I am working on an Android Application where I am trying to track movement of the device from a service. The service registers itself for the location updates, here we are making sure that we are asking for "GPS Provider" and not a network provider (which can be inaccurate.)
While calling
public void requestLocationUpdates (String provider, long minTime, float minDistance, LocationListener listener)
provider is "gps"
and minTime and minDistance are both set zero to get best possible results.
Yet when the device is stationary lying on the desk it gets GPS updates which are different from each other so much so that we actually get an average speed (measured by dividing distance by time interval between location updates) more than 5 miles/hr averaged on last 5 location updates.
This totally wrecks the application logic. What can be the reason for the android device (EVO 4, HTC MyTouch) to give different location updates while being completely stationary? Can anybody suggest a way to weed out these wrong location update from the correct ones?
Will appreciate your feedback greatly.
Thanks.
Pritam.
Update:
Finally ended up monitoring the GPS input for 30 seconds for regularity of updates, and stable average speed and time difference between the GPS updates.