Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Garmin VIRB, last bytes of gps_metadata

Rank

Total Posts: 14

Joined 2017-04-10

PM

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. smile

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.      
RankRankRank

Total Posts: 68

Joined 0

PM

If the Profile.xlsx spreadsheet does not specify the fields in the message, it is likely that Garmin has included Proprietary data in that message using the profile extension features to add custom data.      
Rank

Total Posts: 14

Joined 2017-04-10

PM

Ok, thank you. I guess I don't have to worry about these too much then. The important values seem to correspond to what I get with FitCSVtool.      
Rank

Total Posts: 9

Joined 2018-02-28

PM

@jens_l

Can you share with me a sample .fit file from the virb ultra 30?

I am considering to purchase one but I want to see what kind of data I can get before buying one.

In particular, I'm interested in understanding how the compass data are acquired and how they look like: Since I need to use the camera underwater, any heading information coming from the GPS will not be usefull as it will not be recorded undewater. If the compass data are obtained from a magnetometer, then I would like to know if they are already converted in headings or if they are provided as raw magnetic field measurements.

Any infomormation on this topic (and any sample file shared) is more than welcome!      
Rank

Total Posts: 14

Joined 2017-04-10

PM

Filippo - 28 February 2018 05:30 PM
@jens_l

Can you share with me a sample .fit file from the virb ultra 30?

I am considering to purchase one but I want to see what kind of data I can get before buying one.

In particular, I'm interested in understanding how the compass data are acquired and how they look like: Since I need to use the camera underwater, any heading information coming from the GPS will not be usefull as it will not be recorded undewater. If the compass data are obtained from a magnetometer, then I would like to know if they are already converted in headings or if they are provided as raw magnetic field measurements.

Any infomormation on this topic (and any sample file shared) is more than welcome!


Sorry for the late reply.

I've attached a sample file (fit + csv). I'm not sure how/if the various data messages interact but the magnetometer data from the virb consists of 30 readings for x, y, z respectively (raw ADC readings as per Profile.xlsx) with 30 corresponding time offsets in ms (0-290ms with 10ms separation) for each magnetometer data message. This repeats each 300ms so it seems continuous.

It has global ID 208 (magnetometer_data). I had to verify the actual order of the fields via the definition message when trying to decode (not the same order as listed in Profile.xlsx), but it seems to check out.      

File Attachments

Rank

Total Posts: 9

Joined 2018-02-28

PM

Thanks!
Filippo