The support forum is temporarily read-only. For urgent requests, please email contact[at]psyberia.net
Location value with data type 8d
Location value with data type 8d
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.
- Attachments
-
- track_20211220_123518.trk
- (86.87 KiB) Downloaded 336 times
-
- Site Admin
- Posts: 6389
- Joined: Wed Apr 14, 2010 9:41 pm
Re: Location value with data type 8d
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.
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.
Do you like AlpineQuest ? Leave a small comment on Google Play !