-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
speedJumpFilter feature requested on iOS #2192
Comments
Looking at your logged locations, do you see why you’re experiencing “jumps”? |
No, I'm not sure to understand. Those lines : make me think that this update should be ignored, but it fire my onLocation event. Want to point out that the jumps didn't follow the path, they're erratic. Could you please give me some guidelines if you see something that is not done well, or that I could improve ? Thanks |
Do you see the problem with this location that was provided by the native location API? 2024-10-28 11:53:02.753 |
I can see that it's far away from the previous one ? Don't know what exactly the 19138m is supposed to be, because this location is about 500m far from my real location. |
That is the You should filter that location out. A location is not a dimensionless point in space — it is a circle of radius A location with accuracy ~20000 meters did not come from GPS, it came from a cell tower. |
Ok, I understand better. And is there an easy way to do that within the plugin ? Like a "minimum accuracy" above which onLocation will not fire ? Or what's the best way to filter this when the onLocation event fire ? |
No. Just analyze |
Ok, will do that, thanks for your help. Feel like it could be a parameter in the plugin, as it's better if the plugin is able to filter locations as we want and output only the desired locations. |
It’s highly unusual to see a location with 20000 meters accuracy. I only see that when taking off in an airplane. |
I was just walking for 1hr and continue for 3hrs. I'll check how many peaks I got, and the accuracy of small jumps (I already spot a small jump (less than 50m) and the accuracy was 68m. From what I see, the usual accuracy of normal points is around 35m (but it's really better in reality, probably accurate like 5-10 meters). |
For example, this is a "small jump" : 1st and 4th position are pretty accurate concerning reality, but position 2 and 3 have "jump" few meters. Accuracy is pretty consistent around +-35m. I beg that a speed simulation could show that those points are "too fast". 2024-10-28 11:50:21.215 2024-10-28 11:50:21.215 2024-10-28 11:50:21.215 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 24.0 2024-10-28 11:50:21.215 ℹ️-[PolygonGeofencingService setLocation:] Already updating location 2024-10-28 11:50:24.605 2024-10-28 11:50:24.605 2024-10-28 11:50:24.606 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 24.0 2024-10-28 11:50:24.606 ℹ️-[PolygonGeofencingService setLocation:] Already updating location 2024-10-28 11:50:25.588 2024-10-28 11:50:25.588 2024-10-28 11:50:25.588 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 24.0 2024-10-28 11:50:25.588 ℹ️-[PolygonGeofencingService setLocation:] Already updating location 2024-10-28 11:50:25.653 2024-10-28 11:50:25.653 🔵-[TSLocationManager startMotionTriggerTimer] Motion-trigger timer engaged: Stop-detection will trigger in 10 seconds... 2024-10-28 11:50:26.597 |
This one is a bit more important : position 1 and 3 are fine, position 2 is jumped. Accruacy is worst on position 2, but still not bad +-64m... 2024-10-28 12:07:53.025 2024-10-28 12:07:53.025 2024-10-28 12:07:53.025 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 6.0 2024-10-28 12:07:53.025 ℹ️-[PolygonGeofencingService setLocation:] Already updating location 2024-10-28 12:07:55.706 2024-10-28 12:07:55.706 2024-10-28 12:07:55.707 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 6.0 2024-10-28 12:07:55.707 ℹ️-[TSConfig persist] 2024-10-28 12:07:55.714 🔵-[TSConfig incrementOdometer:] 51812.1 2024-10-28 12:07:55.715 ℹ️-[PolygonGeofencingService setLocation:] Already updating location 2024-10-28 12:07:56.714 |
What do those locations look like plotted on a map? 32 meters is not that bad of an accuracy. |
The ones that I says "goods" are really "on my real path" on my map, and really follows the android ones. The android ones really stays "on my real path", probably thanks to speedjumpfilter. I should say that the accuracy value is probably theoric, because in most of cases, the location looks good at less than 5-10m (instead of the +-35m). That's why we really notice those iOS jumps, that looks innacurate comparatively to android. If the accuracy filter eliminate the most big jumps, it could be fine enough, I'll test that tomorrow. But at the end of the day, it could be better to have the accuracy I have on my android devices also on the iphone. |
these locations you report are not within the realm of A jump of 40 meters in ~ 3 seconds would not be captured by |
I suggest you see API docs |
You're right. Ok, I'll look to upload locations on the demo server, thx. |
Not from my more than 10 years experience. iOS is the more reliable one. |
I use the speedJumpFilter:100 setting in my BackgroundGeolocation.ready parameters, to avoid unexpected jumps of location.
It looks to works really well on my android devices, as I didn't detect major jumps.
On the iphone I'm using to test, there are quite a lot of jumps, as the speedJumpFilter is for Android only.
So, is it possible to build a similar function for iphone ? And if it's not "built in" in the os, is it possible to create it in the plugin ?
Your Environment
react-native -v
):Expected Behavior
No jumps on iOS, like in Android
Actual Behavior
There are jumps on iOS
Steps to Reproduce
Context
Track without jumps
Debug logs
Logs
The text was updated successfully, but these errors were encountered: