Page 1 of 1
Location value with data type 8d
Posted: Sun Jan 08, 2023 7:38 pm
by danhicks
I'm running old track files through my homemade trk file parser (now available as an R package at
https://github.com/dhicks/alpineR) and encountering an error with the attached trk file. This file was recorded with APQ 2.2.9b in December 2021. The parser is stumbling when it hits a location value at offset 340 with type 0x8d. The specs don't list such a type. Thanks in advance for any help.
Re: Location value with data type 8d
Posted: Tue Jan 10, 2023 6:29 pm
by Psyberia-Support
Hi,
The first location starts at offset #281 with a size of 46B starting from offset #285, so the second location starts at offset #331. Its longitude is at #335, latitude at #339, and metadata at #343.
So offset #340 is actually in the middle of the second location latitude.
I don't know if you can do this in R, but after reading the size of a location (line 48 of locations.R), you should read this amount of bytes, then decode the location from those bytes copy. You'll also be forward compatible if new types are added.