anyway this is my location payload .. i used (other than the official loramote) a 32 instead of a 24 bit location, because I think 24 bit is not accure enough, especially for the longitude.
this packet is just 19 bytes which in my opinion is acceptable..
a protocol like this should be standardized inside TTN I think.. using the 3rd and 4th byte is especially important so different kinds of payload can be supported in the same protocol like command 0x001 could be a temperature/humidity packet, 0x002 a water level packet, 0x003 and so on and so on
4 byte header
2 bytes fixed header so I just know that it's my specific payload
2 bytes (bits 0-11 command, bits 12-15 version) .. for now only command 0x000 version 0x0 is implemented
payload for command 0x00 version 0x0 (a GPS package)
4 bytes latitude (uint32, -90=0, 90=2ˆ32-1)
4 bytes longitude (uint32, -180=0, 180=2ˆ32-1)
1 byte accuracy (uint8 in meters)
4 bytes (unix timestamp, uint32)
1 byte time to fix uint8 in sec
1 byte battery percentage (uint 8) 0x00 = external power, 0x01 = 0% / 0xFF = 100%