... the user friendly GPS tool


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bushnell Backtrack D-Tour
#21
Yep. It's a binary file. It uses little-endian encoding (least significant byte in the smallest address). The coordinates are 64-bit floats (i.e. double-precision) The three least-significant bytes of them are always null.

Here's a short python script that would modify the Waypoint.gtk file with new coordinates. I haven't been able to write over the other Waypoint.gtk file, but I don't know if it's the GPSr or my computer preventing it.

Code:
import struct
# 0x18 0x30 0x48 0x60 0x78
coords = {
    0x18: (31.49685, 65.8421), # some geocache in afghanistan
    0x30: (42.86268, 0.60267), # some geocache in france
    0x48: (-23.12289, 43.62993), # some geocache in madagascar
    0x60: (-33.81278, 24.89653), # some geocache in south africa
    0x78: (45.27842, -74.0926) # some geocache in canada
}
with open('Waypoint.gtk', 'r+b') as file:
    for addr in coords:
        lat, lng = coords[addr]
        file.seek(addr)
        file.write('\0\0\0' + struct.pack('<d', lat)[3:])
        file.write('\0\0\0' + struct.pack('<d', lng)[3:])

(27.04.2014, 12:52)Oluffen Wrote: Sorry for my limited knowledge in this area, but what does this mean? Does it gives us a clue of how to interpreat the file to get us the waypoints in a standard format?

Regards,

(26.04.2014, 18:21)throwaway Wrote: I don't know about the file you specified, but I have been trying to figure out how I could edit Waypoint.gtk to use this thing for geocaching. Made a breakthrough today, and decided I didn't want my top Google result for trying to figure this out to not to have any good info. It uses a 64 bit floating point format for latitude and longitude.

Lat-Lng pairs are (relative addresses in that file):

* 0x18, 0x20
* 0x30, 0x38
* 0x48, 0x50
* 0x60, 0x68
* 0x78, 0x80

The four bytes (out of eight) that immediately follow each pair look like they could be a 32-bit UNIX timestamp, but for some reason they're all the same for me, at least in the Waypoint.btk file.
Reply


Messages In This Thread
Bushnell Backtrack D-Tour - by Lorry - 25.11.2012, 04:33
RE: Bushnell Backtrack D-Tour - by Oluffen - 05.11.2013, 14:02
RE: Bushnell Backtrack D-Tour - by kumo - 05.11.2013, 23:32
RE: Bushnell Backtrack D-Tour - by Lorry - 06.11.2013, 01:11
RE: Bushnell Backtrack D-Tour - by Oluffen - 06.11.2013, 09:16
RE: Bushnell Backtrack D-Tour - by Oluffen - 07.11.2013, 18:23
RE: Bushnell Backtrack D-Tour - by Lorry - 06.11.2013, 01:08
RE: Bushnell Backtrack D-Tour - by Lorry - 06.11.2013, 16:54
RE: Bushnell Backtrack D-Tour - by Lorry - 06.11.2013, 01:48
RE: Bushnell Backtrack D-Tour - by Oluffen - 06.11.2013, 09:31
RE: Bushnell Backtrack D-Tour - by kumo - 06.11.2013, 09:42
RE: Bushnell Backtrack D-Tour - by kumo - 07.11.2013, 22:24
RE: Bushnell Backtrack D-Tour - by throwaway - 26.04.2014, 18:21
RE: Bushnell Backtrack D-Tour - by Oluffen - 27.04.2014, 12:52
RE: Bushnell Backtrack D-Tour - by throwaway - 27.04.2014, 17:46
RE: Bushnell Backtrack D-Tour - by throwaway - 27.04.2014, 19:27
RE: Bushnell Backtrack D-Tour - by Stanmannus - 06.05.2015, 23:23
RE: Bushnell Backtrack D-Tour - by feima - 23.09.2015, 15:23
RE: Bushnell Backtrack D-Tour - by feima - 23.09.2015, 15:21
RE: Bushnell Backtrack D-Tour - by chuckk - 04.12.2015, 02:44

Forum Jump:


Users browsing this thread: 1 Guest(s)