A phone can produce a GPS fix every second. For a delivery or ride-hailing app, the obvious thing is to post each one to the server. The README of this package explains why that is a bad deal: sending every fix wastes battery, mobile data and server writes, and it still leaves a gap on the map as soon as the courier drives into a tunnel.
What the map needs is different from what the GPS produces. On a highway, a point every few seconds draws the route well. While the courier is parked, one point every few minutes is enough to say "still here". At a turn, a point should go out early so the line does not cut the corner. And when the network drops, the points should wait and be replayed in order.
throttled_location puts that policy between the GPS and your API. It decides when to send a position, what to send, and what to do while offline . It works with any location plugin, because it never reads the GPS itself.
What it does
The pieces.…