android
android copied to clipboard
Recording accuracy during car travel
- App build number: 2.2.0 (22061)
- Android version: 9 PKQ1.190616.001
- Device: Xiaomi Redmi Note 8
{
"_type": "configuration",
"waypoints": [],
"_build": 22061,
"autostartOnBoot": true,
"cleanSession": false,
"cmd": true,
"debugLog": true,
"deviceId": "000001",
"dontReuseHttpClient": true,
"fusedRegionDetection": true,
"geocodeEnabled": true,
"ignoreInaccurateLocations": 0,
"ignoreStaleLocations": 0,
"locatorDisplacement": 10,
"locatorInterval": 10,
"locatorPriority": 3,
"mode": 3,
"monitoring": 2,
"moveModeLocatorInterval": 10,
"notificationEvents": false,
"notificationHigherPriority": false,
"password": "000001",
"ping": 15,
"pubExtendedData": true,
"tid": "01",
"url": "https://localhost/owntracks/pub",
"username": "000001"
}
Hi, I am using the APP on android, but using it during a car trip, the recorded points are very distant from each other and so the map is with flaws in the route.
Any settings to increase recording accuracy?
(edited above to format JSON)
You're using move mode (monitoring: 2) and locatorDisplacement: 10 with a very small locatorInterval which seems ok to me. I'm assuming you redacted the URL and that it is indeed posting to an available site and that site is actually accepting your POST requests.
I would try increasing the locatorDisplacement to about 50 or 100 and see whether you then get better data.
Thanks for the feedback, I'm going to change the locatorDisplacement to 50 and run some tests.
It has improved over short distances, I will now test over long distances.
If you're able, could you also see if you get a different behaviour if you have an app such as Google Maps open in the foreground whilst driving?
I will perform a test with the Google Maps APP open and closed.
- App build number: 2.2.2 (22202)
- Android version: 5.1.1
- Device: Samsung Galaxy J1 (2016) - SM0J120H
I performed two tests, both with the Google Maps APP closed.
With the APP Owntracks Map open, I got recording failures, but with the APP Map closed, it recorded right, with high accuracy.
I will test again without having the MAPA screen open, see if it influences the recording performance.
The Smartphone used, is old, with limited resources, perhaps because of its low accuracy when the map is open.
| Test | Android version | Google Maps | Owntracks Map Screen | Precision recording of the route |
|---|---|---|---|---|
| 1 | 9 | Closed | Open | Low |
| 2 | 5.1.1 | Closed | Closed | High |
| 3 | 9 | Open | Open | High |
| 4 | 9 | Open | Closed | Low |
| 5 | 5.1.1 | Open | Open | High |
| 6 | 5.1.1 | Open | Closed | Low |
| 7 | 9 | Closed | Closed | Medium |
| 8 | 5.1.1 | Closed | Closed | High |
I carry out the tests and update the table.
Hi, 8 tests were carried out in a car, at an average speed of 80km/h.
According to the tests, the Android version and the open Google Maps APP did not significantly influence the results.
What seems to happen is when the MAPA screen in Owntracks is open, the recording accuracy is compromised, recording only 30% of the points.
@jpmens and @growse, can we validate this hypothesis?
Maybe a setting to disable the Map?
I don't think we'll add an option to disable the map... You can leave the app in the background (no map visible).
When you say "map is open" you mean the OwnTracks map is visible and the app is in the foreground. Is it possible that the device is not powerful enough to handle all this simultaneously?
Another detail that I noticed now, in the last test, was with the map screen open.
The recording of the points was very bad, during part of the journey, the Smartphone screen turned off, it was like that for a few minutes and then I activated it again.
Now looking at the MAP of the route, I noticed that in the part where the screen was off, the dots recorded correctly and after activating the screen, the recording was bad.

Right, and that appears to corroborate the theory that the device cannot cope with updating the map and POSTing the data.
I don't think we'll add an option to disable the map... You can leave the app in the background (no map visible).
When you say "map is open" you mean the OwnTracks map is visible and the app is in the foreground. Is it possible that the device is not powerful enough to handle all this simultaneously?
Exactly, when the map is open, it is because the OwnTracks APP is in the foreground.
The tests were carried out with two devices, the oldest pair obtained better results.
- App build number: 2.2.2 (22202)
- Android version: 5.1.1
- Device: Samsung Galaxy J1 (2016) - SM0J120H
- App build number: 2.2.0 (22061)
- Android version: 9 PKQ1.190616.001
- Device: Xiaomi Redmi Note 8
Right, and that appears to corroborate the theory that the device cannot cope with updating the map and POSTing the data.
I do not rule out this hypothesis.
If you can't send, shouldn't you be waiting in the 'queue'?
New tests were performed yesterday and today, with Google Maps closed and Owntracks running in the background. The recording was highly accurate on both devices.
Has anyone else noticed this behavior, of the accuracy dropping when Owntracks is in the foreground with the map screen open?
Right, and that appears to corroborate the theory that the device cannot cope with updating the map and POSTing the data.
I do not rule out this hypothesis.
If you can't send, shouldn't you be waiting in the 'queue'?
Should be - there was a bug recently fixed where HTTP messages weren't being queued correctly. Can you upgrade to 2.2.2 (#893) to see if that fixes it?
Right, and that appears to corroborate the theory that the device cannot cope with updating the map and POSTing the data.
I do not rule out this hypothesis. If you can't send, shouldn't you be waiting in the 'queue'?
Should be - there was a bug recently fixed where HTTP messages weren't being queued correctly. Can you upgrade to
2.2.2(#893) to see if that fixes it?
Hi, I'm using the latest version (2.2.2), the 'queue' is working perfectly.
I believe that the problem is a priority in the processes, I think the priority should be to save the data and then update the map.
Right, and that appears to corroborate the theory that the device cannot cope with updating the map and POSTing the data.
I do not rule out this hypothesis. If you can't send, shouldn't you be waiting in the 'queue'?
Should be - there was a bug recently fixed where HTTP messages weren't being queued correctly. Can you upgrade to
2.2.2(#893) to see if that fixes it?Hi, I'm using the latest version (2.2.2), the 'queue' is working perfectly.
I believe that the problem is a priority in the processes, I think the priority should be to save the data and then update the map.
Sorry, missed that.
I think the way in which Android prioritises tasks is a little out of our control, especially given that device vendors will likely tweak and customize this to see fit. I wouldn't be surprised if Android deliberately prioritised a foreground activity over and above anything a service was doing, because by the very fact that it's in the foreground means it's something a user specifically is prioritising interacting with.
Has anyone else noticed this behavior, of the accuracy dropping when Owntracks is in the foreground with the map screen open?
There's something in the back of my mind that's ringing a faint bell though, and I'd want to do a couple of tests before ruling this out as an app bug.
Can I help with a test?
If you're able to test to see if you get the same behaviour on the same devices across different versions of the app (the apks should be available on the GH releases page) that would be a useful data point.
I can try, but I will have problems regarding the HTTP queue, when I don't have an internet connection.