Open luke-jr opened 7 years ago
It means that we can potentially miss some information on transition from stationary to moving state.
Yes, it does. But that's better than never getting more frequent updates, and better than constantly draining the battery.
It depends on the use case.
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...
Except for the fact that accelerometer uses a lot of battery power itself.
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
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.