I'm trying to decode FIT-files directly, without the FitCSVTool, but have a few bytes I can't make heads or tail of.
Specifically I'm looking to decode and extract all gps_metadata messages corresponding to specific Garmin VIRB Ultra 30 videos. I'm using (read: learning) Rust to do this from scratch with the help of the SDK documentation (no SDK libraries). (For what it's worth I have not found any developer fields or compressed timestamp headers in the VIRB FIT-files.)
So far I have been able to decode all of the above - coordinates, timestamps etc all check out - except for a few unknown values at the end of every gps_metadata message. Each respective gps_metadata message is 45 bytes long, but the SDK documentation does not account for the last 10 bytes. Does anyone know what these might be? Garmin data? Should I perhaps ask Garmin directly? Not important?
According to the definition message, the last 10 bytes are five unsigned 16 bit integers. In a large (18.5MB) FIT-file I'm parsing, the first three are often single digits (or close to) and the final two between 100-250 or so, e.g. 3, 4, 5, 268, 120.
I can extract the values I need anyway, I'm mostly wondering whether these bytes might contain some correlation value(s) I should account for.
Also, for units with GPS, such as the VIRB, can I be absolutely sure that the timestamp_correlation message ALWAYS precedes the first gps_metadata message? I assume the format is designed this way but wasn't sure.
EDIT: I have answered my own question since the fit file attached for another poster below has gps_metadata data messages recorded *before* the timestamp_correlation message. Not a big deal but now I know.
Thanks.
EDIT: I forgot: the enhanced_altitude specifies scale 5 and offset 500m in Profile.xlsx. I assume this means (VALUE/5) - 500, is this correct? This gives me a value that's within 80-90m of what e.g.
https://www.freemaptools.com/elevation-finder.htm estimates for my coordinates and from what I've seen altitude can be a bit tricky due to its model.