0

I have an Android app that uses Fused provider and reports lng,lat,accuracy every 3 seconds.
While driving in a vehicle and building a route from the reported samples we can see that from time to time, the GPS provides bad longitude while accuracy is the same as for valid points (about 20).

It happens on the same device (Huawei P Smart) and in different locations in the world.
Does anyone have an idea what it is?

Example 1:
Zoom In:Zoom In Zoom Out:Zoom Out

Example 2:
Zoom In:Zoom In Zoom Out:Zoom Out

Code:

private lateinit var fusedLocationClient: FusedLocationProviderClient
private val locationRequest by lazy {
        interval = 4000
        fastestInterval = 2000
        priority = LocationRequest.PRIORITY_HIGH_ACCURACY
}
private var locationCallback: LocationCallback = object : LocationCallback() {
        override fun onLocationResult(locationResult: LocationResult) {
            super.onLocationResult(locationResult)
            //take the following:
            locationResult.lastLocation.latitude
            locationResult.lastLocation.longitude
            locationResult.lastLocation.accuracy
        }
    }
...
fusedLocationClient.requestLocationUpdates(locationRequest, locationCallback, null)
Edi
  • 969
  • 3
  • 9
  • 20
  • Can you go into more detail, is it just a single P Smart that this happens on? What about other devices? Also, if your code processes the coordinates in any way, you should post that code. And, are these device screenshots? – greeble31 Aug 05 '19 at 22:11
  • I posted the code, but it doesn't process the coordinates in any way. Didn't test on other devices - focused only on a single device. These are not device screenshots, but a polyline built from the GPS samples that were reported (I verified the logs manually of course). – Edi Aug 06 '19 at 06:03
  • Can you provide a selected coordinate dump around the time this happens, and/or a zoomed-in version of the distant area. Particularly that one in Canada. And please go into more detail about the system that you are viewing these maps on. How are you transferring the coordinate data? How does it get into the logs you mentioned? – greeble31 Aug 06 '19 at 12:30
  • Sorry for late reply.. after some investigation it looks like a bug in Fused. When subscribing to GPS provider location updates, we get good correct GPS coordinates without anomaly. – Edi Aug 30 '19 at 19:59

0 Answers0