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

Flexible update interval based on speed #107

Closed
licaon-kter opened this issue Dec 15, 2019 · 2 comments
Closed

Flexible update interval based on speed #107

licaon-kter opened this issue Dec 15, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@licaon-kter
Copy link
Contributor

Default Update interval, make it longer eg. 3-5 seconds, users might not bother setting it up and 1 sec is rather aggressive, battery wise.

The device will use a lot of battery power for location services if the interval is set to 3 seconds too (maintaining a fix). 1 second was chosen because it provides the smoothest real-time view on the map given that there is currently no movement prediction on the frontend. I'm not really inclined to change this default right now

It's complicated, 1 sec is smooth in a car/train/bus where the position changes a lot so precision is needed, but...

  • walking speed, 1-2-3-4 sec are not that different (what is the GPS precision anyway, 1-2 meters?), the position changes rather slow
  • stopped/no gps lock, you're consuming energy without any benefit by continuously sending network data

What crossed my mind writing this is that, based on speed maybe you can vary the interval

Eg. Say walking speed is 5km/h, have interval set at 1s

  • if speed >=5 then use interval 1s
  • if 0< speed <5 then use between 5s and 1s
  • if speed=0 or no lock then use 10s or 30s

...if interval 3s then maybe multiply, 3s, between 15s and 3s, 30s or 90s etc albeit this doesn't scale that nice, maybe use a lower factor than actual interval (eg. numbers would go awry fast for 10s)

@bilde2910
Copy link
Owner

It's possible to set the GPS provider to not receive updates if the device hasn't moved at least X meters since the last update. I can make this a configurable option. That way if the device stops moving, location updates aren't sent unless the device has moved at least e.g. 5 meters since the last update, regardless of the update interval.

@bilde2910 bilde2910 added the enhancement New feature or request label Dec 16, 2019
@bilde2910
Copy link
Owner

bilde2910 commented Dec 16, 2019

Minimum distance is now configurable in settings.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants