Skip to content
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

"High" accuracy drains battery and never reports, "medium" accuracy too inaccurate #385

Open
Tyler-2 opened this issue Nov 13, 2018 · 8 comments

Comments

@Tyler-2
Copy link

Tyler-2 commented Nov 13, 2018

For users of the Android client who are using it to track people with phones, obviously those phones spend a lot of time indoors. When indoors on high accuracy, Traccar's behavior seems to be to only use GPS. It will keep GPS on seemingly the entire time it is indoors, never getting a fix. This will drain the battery very quickly as well as not provide useful location data. Medium accuracy is only really useful in populated areas where there is sufficient wifi coverage to give semi-accurate location. And even in heavily populated areas it is sometimes unreliable.

I see two possible fixes for this:
A. Have a timeout for a GPS fix. If it doesn't work, fall back to a "medium" fix until the next location update interval.
B: Rather than high/medium/low implying a type of fix... provide a desired accuracy. If I can get a 100 meter or better fix with wifi, no need to try with GPS. Wifi fixes consume less battery and it's probably worth trying them in most cases, falling back to GPS if you end up with a "1.4 km" radius.

I think it is undesired behavior to have to choose high (which will drain batteries indoors very quickly, won't provide any location info indoors) and medium (which will work pretty well indoors, but often knowingly provide 1 mile or more of inaccuracy).

I understand Traccar is leveraging another library for location data, but that that library is poorly maintained.

@tananaev
Copy link
Member

Traccar doesn't use third party library anymore. The reason is issues in the library and poor support. If you know alternatives, feel free to share.

@oliv3
Copy link
Contributor

oliv3 commented Nov 13, 2018

Still, the algorithm could be improved, whichever the library.

@oliv3
Copy link
Contributor

oliv3 commented Nov 13, 2018

Think of enhancing location updates frequency, adapted in real-time given circumstances, instead of using the basic API, which will work ok in lab cases.

@oliv3
Copy link
Contributor

oliv3 commented Nov 13, 2018

@tananaev https://microg.org/ ?

@tananaev
Copy link
Member

It's not a library that we can include. Also, it doesn't seem to be using standard Google geolocation available on the phone, so I don't think it's a good replacement.

@Tyler-2
Copy link
Author

Tyler-2 commented Nov 13, 2018

MicroG is a replacement for proprietary Google services that I definitely encourage keeping compatibility for. Since I use it on my main phone.

@oliv3, it basically lets you do things like use a third party or on-phone database for Wifi location data so you don't send your location and nearby wifi's to Google etc. But it's something to be used by users, not so much developers. A summary of UnifiedNLP here: https://github.com/microg/android_packages_apps_UnifiedNlp

@tananaev, good news about not using the third party library anymore, but... bummer that there's not another project you can staple to instead of having to develop yourself or with the little bit of contribution I expect you get.

@luke-jr
Copy link

luke-jr commented Dec 10, 2018

This is very much needed. This past trip, I went several hours, often including significant movement, with ZERO reports at all. When I manually switched it to medium, at least it gave me something, but annoyingly inaccurate even when High would have worked.

Alternatively, maybe switch back to the unmaintained library that used to be used? Maintained or not, at least it worked reasonably...

@ghostrider95
Copy link

Is there something new to fix this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants