Quantcast
Channel: The Things Network - Latest posts
Viewing all articles
Browse latest Browse all 116439

Best practices when sending GPS location data

$
0
0

Today I was thinking of a binary coordinate "compression" system I was looking at last year. The method I used was to see the earth as a rectangle divided into a grid. Longitude being the index of the location on the x-axis, and latitude being the index on the y-axis. With this in mind I recreated this grid to consist of 2^(bits) squares. This is a naive system as it provides a high resolution at the poles, but a low resolution at the equator, just like normal coordinates. Optimising the system to have a uniform "low" resolution only saved me one bit. The mathematics became a lot more complicated, so I decided to stick with the naive approach.

I initially looked at using 48 bits, giving a resolution of 0.00002° (±2.2m at equator). Adjusting the formulas to use 24 bits gave a resolution of 0.06° (±6.6km at equator). 24 bits is therefore not enough to store longitude and latitude, but 48 bits seems decent.

I'm linking a spreadsheet containing the formulas and a few test calculations for my system.
I wanted to type out the equations here, but it will be unreadable without formatting.

Play around with the number of bits and the formulas, and please let me know if there is a better way to do it.


Viewing all articles
Browse latest Browse all 116439

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>