traccar-client-android icon indicating copy to clipboard operation
traccar-client-android copied to clipboard

Ability for request interval to adapt automatically

Open luke-jr opened this issue 8 years ago • 6 comments

Currently, Traccar Client monitors GPS constantly (request interval 1 second) when distance/angle reporting are enabled. This drains battery unnecessarily when not in motion.

Instead, there should be an option to adapt the request interval based on past movement. If the last check showed no movement, the request interval should be the reporting period. When movement begins, the request interval should be 1s until it figures out the rate of movement, and adapt GPS polling as expected.

In other words, for example, while stationary, GPS should only be polled every 5 minutes (or whatever is configured). When moving in a car, perhaps every 15-30 seconds (based on configured distance reporting). When walking, maybe every few minutes.

luke-jr avatar Sep 19 '17 20:09 luke-jr

It means that we can potentially miss some information on transition from stationary to moving state.

tananaev avatar Sep 19 '17 21:09 tananaev

Yes, it does. But that's better than never getting more frequent updates, and better than constantly draining the battery.

luke-jr avatar Sep 19 '17 23:09 luke-jr

It depends on the use case.

tananaev avatar Sep 19 '17 23:09 tananaev

I'm not aware of the technical details, but I guess the transition from stationary to moving state could be easily detected with the help of accelerometer...

Anton-V-K avatar Dec 26 '17 23:12 Anton-V-K

Except for the fact that accelerometer uses a lot of battery power itself.

tananaev avatar Dec 26 '17 23:12 tananaev

I wasn't able to find exact measurements of power consumption for different sensors, but my gut feeling tells me the accelerometer may consume much less power than GPS reciever... And according to API guide: "Almost every Android-powered handset and tablet has an accelerometer, and it uses about 10 times less power than the other motion sensors". See also #128

Anton-V-K avatar Jan 01 '18 15:01 Anton-V-K