Closed alfredbaudisch closed 4 years ago
This is not a plugin issue. More likely environment / device related.
The plugin does not manufacture locations, it receives them from the device’s native location API in the same manner as any native app.
But how come it is happening accross different devices, OSs and users? It can't be device related. Not only one, but all of our users are getting this since March, no exception. We got reports from: Android (Huawei, Samsung, OnePlus) and every possible different iPhone.
I suggest you install the SampleApp, linked in the README. Don’t look at the code, just run it on your device(s).
It will upload locations to tracker.transistorsoft.com.
There is no correlation between iOS vs Android. They are completely different. One is written in Obj-c, the other in Java.
I do not experience this on my 12 test devices. I have several years of logs.
Are you observing the accuracy
of these “spikes”. You’ll likely find they’re >= 1000, meaning the location came from a cell tower, where gps or wifi location was not available from the device’s location-services.
There is no correlation between iOS vs Android. They are completely different. One is written in Obj-c, the other in Java.
Still, all of our users got the spikes, both Android and iOS. So by pointing out this, I'm pointing that it seems that we are doing something wrong on the configuration side or even in how we implement the library in React Native.
That's why I was asking for your help or pointers, since you know the library and config from inside out and probably saw every possible scenario related to it.
Are you observing the accuracy of these “spikes”. You’ll likely find they’re >= 1000, meaning the location came from a cell tower, where gps or wifi location was not available from the device’s location-services.
Even in situations like this one from the image, where it shoots all over the place?
Sometimes they are <100 meters, like those ones:
I'm implementing a backend filter for those outliers, the problem is because they are very random and when they are close to the actual location, I may end up deleting the desired location itself. It would be good if this data wasn't coming from the tracking itself.
I suggest you install the SampleApp, linked in the README. Don’t look at the code, just run it on your device(s).
I tested and used the SampleApp when implementing the project and learned a lot with it and got some ideas from it. I know it works, I never questioned it. And I don't think looking at it again will help us, because we already have something running with a lot of production data.
We see this as well and have been struggling with how to deal with it properly for a long time (multiple years). We was our data through an OSRM routing server to clean up tracking to actually have a recording that closely snaps to a route as a result.
We get user reports of this as well when using navigation functionality prompting a re-route. We also set pace manually etc...
We see this as well and have been struggling with how to deal with it properly for a long time (multiple years). We was our data through an OSRM routing server to clean up tracking to actually have a recording that closely snaps to a route as a result.
We get user reports of this as well when using navigation functionality prompting a re-route. We also set pace manually etc...
Thank you for your input. We can't use an OSRM routing server because most of our tracking happens in farming fields, but what I'm implementing is basically an outlier detector. If the next coordinate is >= THRESHOLD than the previous one
, it is going to be deleted.
It will not solve all cases, because we have A LOT of cases like "small triangles":
But it will help solving the extreme cases.
Whoever comes across this issue, the attached PDF quickly describes the result of my experimentation and which solutions I implemented. The solutions are not perfect, but they are simple and straightforward. None of the solutions is related to this library or React Native or geolocation itself.
Basically, the noises will still be captured and they interfere with geofencing greatly, but after a path is finished being captured, it's possible to mask/hide most of the noises.
Tracking path jumps and spikes removal experimentation.pdf
Just be aware that since the solutions are not related to the library, ridiculous "paths" like this will still be registered by the library:
Your Environment
react-native -v
): 0.62.2Plugin config
Expected Behavior
Actual Behavior
Those images illustrate real usage from users and then the tracker goes randomly crazy (iOS, Android, many different brands and versions).
Some of the cases are very extreme and have been happening constantly the past few months:
More images showing spikes
![map2](https://user-images.githubusercontent.com/248383/85558293-e5e29400-b628-11ea-9d28-fdae4351d05f.png) ![image](https://user-images.githubusercontent.com/248383/85560330-d6644a80-b62a-11ea-989f-f05bc3dd951f.png)Steps to Reproduce
Component
changePace(true)
and
Context
activity_id
from the extra params and the tracking should continue.Debug logs
The log emailed from iOS with
emailLog
is 70k lines long, so attaching it here instead of pasting: background-geolocation.log.gzThis log is related to the whole tracking of the 2nd attached image (Activity Map)