这是indexloc提供的服务,不要输入任何密码
Skip to content

Flexible update interval based on speed #107

@licaon-kter

Description

@licaon-kter

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions