3 ms·
You would only need to store the relative differences between the coordinates, so the actual precision is much lower than 12 bytes, even for a naive scheme.
by zarzavat 5y ago
You would only need to store the relative differences between the coordinates, so the actual precision is much lower than 12 bytes, even for a naive scheme.
- chrismorgan 5y agoFor correctness, I must note that if you’re using the usual static-size data types like floating- or fixed-point numbers, deltas take up roughly the same amount of space unless you impose speed limits, which allow you to get a bit cleverer about the space consumed, though it’s still complicated by the world being a sphere rather than flat. Notwithstanding that, when you get to compression, delta encoding does make it losslessly compress a bit better, though not as much as you might think, especially with the better compression algorithms. I simulated some stuff for this last year, but didn’t keep the answers I came up with. My extremely vague notion is that zip or gzip got something like a 10% improvement, but LZMA only saved another 1–2%. Don’t trust my numbers, though. And yeah, if you’re caring about this stuff you can do way better by a more deliberate encoding.
- zarzavat 5y agoIf you have a list of coordinates, then you know a priori what the maximum precision of the deltas is. If your delivery driver doesn't teleport at any point in the journey it's likely that you can shave quite a few bits off the top of each delta. For example, if your coordinates are precise to 1 angular meter, and the maximum delta in the list is 200 angular meters, then you only need 2x1 bytes for each coordinate.