EDIT: see test values/comparisons in my reply below.
I don't know if this is expected behaviour or a bug.
Here's partial output from gps_metadata/160 messages from a VIRB Ultra 30. "[XXXXX]" is just a coordinate counter, SPE = speed, HDG = heading for each gps_metadata message - this is just the raw data directly from the FIT file.
[46335] 5030s 775ms HDG: 20321, SPE: 468 [46336] 5030s 875ms HDG: 21102, SPE: 455 [46337] 5030s 975ms HDG: 21102, SPE: 0 [46338] 5031s 75ms HDG: 21102, SPE: 0 [46339] 5031s 175ms HDG: 21102, SPE: 0 [46340] 5031s 275ms HDG: 21102, SPE: 0 [46341] 5031s 375ms HDG: 21102, SPE: 0 [46342] 5031s 475ms HDG: 21102, SPE: 0 [46343] 5031s 575ms HDG: 21102, SPE: 0 [46344] 5031s 675ms HDG: 21102, SPE: 0 [46345] 5031s 775ms HDG: 21102, SPE: 0 [46346] 5031s 875ms HDG: 21102, SPE: 0 [46347] 5031s 975ms HDG: 21102, SPE: 0 [46348] 5032s 75ms HDG: 21102, SPE: 0 [46349] 5032s 175ms HDG: 21102, SPE: 0 [46350] 5032s 275ms HDG: 21102, SPE: 0 [46351] 5032s 375ms HDG: 21102, SPE: 0 [46352] 5032s 475ms HDG: 21102, SPE: 0 [46353] 5032s 575ms HDG: 21102, SPE: 0 [46354] 5032s 675ms HDG: 21102, SPE: 0 [46355] 5032s 775ms HDG: 21102, SPE: 0 [46356] 5032s 875ms HDG: 21102, SPE: 0 [46357] 5032s 975ms HDG: 21102, SPE: 0 [46358] 5033s 75ms HDG: 21102, SPE: 0 [46359] 5033s 175ms HDG: 21102, SPE: 0 [46360] 5033s 275ms HDG: 21102, SPE: 0 [46361] 5033s 375ms HDG: 21102, SPE: 0 [46362] 5033s 475ms HDG: 21102, SPE: 0 [46363] 5033s 575ms HDG: 21102, SPE: 0 [46364] 5033s 675ms HDG: 21102, SPE: 0 [46365] 5033s 775ms HDG: 21102, SPE: 0 [46366] 5033s 875ms HDG: 21102, SPE: 0 [46367] 5033s 975ms HDG: 21102, SPE: 0 [46368] 5034s 75ms HDG: 21102, SPE: 0 [46369] 5034s 175ms HDG: 32004, SPE: 427 [46370] 5034s 275ms HDG: 32414, SPE: 435 [46371] 5034s 375ms HDG: 32690, SPE: 442 [46372] 5034s 475ms HDG: 32784, SPE: 441
Whenever speed is 0, heading stops updating for gps_metadata. Looking at the corresponding video recording, the camera/wearer is immobile for these sections, but is very much turning around. What sensor logs heading in gps_metadata messages for VIRB Ultra 30?
Calibrated values for magnetometer_data/208 for the same time span seem to update continuously regardless of speed as expected (presuming I managed to get the calibration right...). I tried a quick atan2(y, x) for the first values in each calibrated array, which returns continuous values (if it can be checked that way, that is).
Does any one have any clues?
I need headings and hoped for the easy way out via the heading field in gps_metadata, but I may have to use magnetometer readings instead, which seems quite involved. I can easily get the calibrated values for each sensor, but presumably I would have to further translate calibrated magnetometer data using gyroscope values to make sure the magnetometer reading is parallel to the ground.