android icon indicating copy to clipboard operation
android copied to clipboard

Rogue data points from past locations

Open Terrance opened this issue 6 months ago • 4 comments

I'm seeing occasional rogue points being collected by OT, significant distances away from my current location but recorded with reasonable accuracy. The weird part seems to be that these points to correspond to other locations I've been recently, though not duplicates of any past points.

Example data points

Here's a snippet of a one-time trip I did ~10 days ago (all recorded around 110-120m accuracy), as viewed in the OT frontend:

Accurate locations from 10 days ago

And here are two rogue points from yesterday while I was about 50km away (note that it's about 30m south of the previous data, but with the same recorded accuracy of ~120m):

Inaccurate location yesterday

Here's the real location with the two jumps away and back, along with a third to another different location I've also been recently:

Accurate locations with gaps yesterday

These rogue points were both recorded with zero speed (at the real location I was moving 0-10km so they may have been correct at those times), and the device battery level fits with yesterday's data (as opposed to the location data it aligns with).

This has happened several times now, jumping to different cities as well as shorter distances within the same city when I've got regular activity there.

I'm not sure exactly where the problem actually lies, but I'm assuming it's on the Android capture side as this does seem to be a discrepency between OT and other location-collecting apps on the same device. I'm running μlogger in parallel (having intended to migrate to OT about a month ago) and that hasn't shown any discrepencies like I'm seeing here.

Terrance avatar Jun 14 '25 10:06 Terrance

This smells like it's picked up a location from a lower-accuracy provider (e.g. network). Some other apps take a different approach to filtering these out, so I wonder if there's something that can be done in OT to achieve a similar effect.

Looking at the ulogger source, it seems like they discard network-provided locations if they receiuved a GPS location recently (beneath a threshold), which is a good idea!

I'll add in an option to allow people to do that and let's see if that helps.

growse avatar Aug 17 '25 16:08 growse

What's the recommemdet setting (e.g. used in ulogger)?

mar565 avatar Sep 02 '25 04:09 mar565

I configured it in OwnTracks with 300 and it provides a very good result to me. Thanks for implementing it!

I think it can be the solution for several open tickets like: https://github.com/owntracks/android/issues/1586 https://github.com/owntracks/android/issues/2034

Intenos avatar Sep 18 '25 18:09 Intenos

I've set discardNetworkLocationThresholdSeconds: 120 in v2.5.4 configuration management (not sure what a reasonable value is here) but it doesn't seem to have stopped these rogue points.

To be clear, they are being logged as source: network but claim high accuracy / low acc, which is way off (guessing that's the phone reporting that incorrectly though).

Example recorder logs
2025-10-24T09:10:11Z    *                       {"_type":"location","_id":"60d742de","acc":21,"alt":46,"batt":94,"bs":0,"cog":132,"conn":"m","created_at":1761297010,"lat":51.5xxxxxxx,"lon":-0.1xxxxxxx,"m":1,"source":"gps","tid":"ud","topic":"owntracks/user/device","tst":1761297011,"vac":34,"vel":3,"_http":true}
2025-10-24T09:10:31Z    *                       {"_type":"location","_id":"9f767ede","acc":22,"alt":53,"batt":94,"bs":0,"cog":0,"conn":"m","created_at":1761297034,"lat":52.yyyyyy,"lon":0.yyyyyyy,"m":1,"source":"network","tid":"ud","topic":"owntracks/user/device","tst":1761297031,"vac":3,"vel":0,"_http":true}
2025-10-24T09:10:31Z    *                       {"_type":"location","_id":"d981b7e4","acc":22,"alt":53,"batt":94,"bs":0,"cog":0,"conn":"m","created_at":1761297034,"lat":52.yyyyyy,"lon":0.yyyyyyy,"m":1,"source":"network","tid":"ud","topic":"owntracks/user/device","tst":1761297031,"vac":3,"vel":0,"_http":true}
2025-10-24T09:10:31Z    *                       {"_type":"location","_id":"cf593917","acc":22,"alt":53,"batt":94,"bs":0,"cog":0,"conn":"m","created_at":1761297110,"lat":52.yyyyyy,"lon":0.yyyyyyy,"m":1,"source":"network","t":"p","tid":"ud","topic":"owntracks/user/device","tst":1761297031,"vac":3,"vel":0,"_http":true}
2025-10-24T09:12:42Z    *                       {"_type":"location","_id":"ce4c55ba","acc":3,"alt":53,"batt":93,"bs":0,"cog":149,"conn":"m","created_at":1761297162,"lat":51.5zzzzzz,"lon":-0.1zzzzzz,"m":1,"source":"fused","tid":"ud","topic":"owntracks/user/device","tst":1761297162,"vac":4,"vel":4,"_http":true}

All of the 09:10:31 points report the same location about 50 miles away from my actual location.

Terrance avatar Oct 25 '25 09:10 Terrance