Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Heading, odd values in gps_metadata messages

Rank

Total Posts: 14

Joined 2017-04-10

PM

I'm making tools to process FIT-data from the VIRB Ultra 30, which has worked well so far (matching videos with FIT-files, extracting data corresponding to recording session etc).

Currently I'm trying to find the best way to get heading. Getting it from `gps_metadata` (id: 160) seems the easiest since I won't have to deal with three_d_calibration messages for the magnetometer, but I observe two odd behaviours:

1. Lots of outliers: large jumps for the heading values, despite the camera wearer standing still. Could possibly be filtered out with some arbitrary threshold. May simply be that e.g. the magnetometer is acting up or is affected by a stronger magnetic field in the vicinity.

2. Static magnetometer value if speed is zero, until the camera wearer starts to move again, e.g. (raw output below from a simple cli-tool I made SPE = speed, HDG = heading):

[46334] 5030s 675ms LAT:<REDACTEDLON:<REDACTEDALT:3993 SPE:472 VEL:[-15, -44, -10] HDG:19898
[46335] 5030s 775ms LAT
:<REDACTEDLON:<REDACTEDALT:3993 SPE:468 VEL:[-18, -42, -11] HDG:20321
[46336] 5030s 875ms LAT
:<REDACTEDLON:<REDACTEDALT:3993 SPE:455 VEL:[-23, -38, -11] HDG:21102
[46337] 5030s 975ms LAT
:<REDACTEDLON:<REDACTEDALT:3993 SPE:0 VEL:[-27, -33, -11] HDG:21102
[46338] 5031s  75ms LAT
:<REDACTEDLON:<REDACTEDALT:3993 SPE:0 VEL:[-29, -29, -11] HDG:21102
[46339] 5031s 175ms LAT
:<REDACTEDLON:<REDACTEDALT:3993 SPE:0 VEL:[-31, -24, -11] HDG:21102
...
[46366] 5033s 875ms LAT:<REDACTEDLON:<REDACTEDALT:3991 SPE:0 VEL:[-325, -11] HDG:21102
[46367] 5033s 975ms LAT
:<REDACTEDLON:<REDACTEDALT:3991 SPE:0 VEL:[-2914, -11] HDG:21102
[46368] 5034s  75ms LAT
:<REDACTEDLON:<REDACTEDALT:3991 SPE:0 VEL:[-2621, -11] HDG:21102
[46369] 5034s 175ms LAT
:<REDACTEDLON:<REDACTEDALT:3991 SPE:427 VEL:[-2732, -11] HDG:32004
[46370] 5034s 275ms LAT
:<REDACTEDLON:<REDACTEDALT:3991 SPE:435 VEL:[-2535, -11] HDG:32414
[46371] 5034s 375ms LAT
:<REDACTEDLON:<REDACTEDALT:3991 SPE:442 VEL:[-2437, -11] HDG:32690 


Point 2 still seems odd to me.

Does anyone know what the "heading" value in gps_metadata is derived from? I'm currently working on processing the magnetometer data directly for this reason (I still need to sync this to the gps track).      
Rank

Total Posts: 14

Joined 2017-04-10

PM

Further updates. As soon as speed is zero heading becomes static until the camera starts moving again. Does this mean heading in "gps_metadata" is derived from gyro/acceleromoter, rather than magnetometer? (all three?)

Is it perhaps better to ask Garmin directly?

Example (unprocessed fit data, note points marked by arrows):
[ 16303] 2184s 217ms LAT: <REDACTEDLON: <REDACTEDALT:11620 SPE:  251 VEL:-25,   0,  -1] HDG:26938
[ 16304] 2184s 317ms LAT
: <REDACTEDLON: <REDACTEDALT:11620 SPE:  241 VEL:-24,   0,  -1] HDG:26924
[ 16305] 2184s 417ms LAT
: <REDACTEDLON: <REDACTEDALT:11620 SPE:    0 VEL:-23,   0,  -1] HDG:26924 <--
[ 16306] 2184s 517ms LAT: <REDACTEDLON: <REDACTEDALT:11620 SPE:    0 VEL:-22,   0,  -1] HDG:26924 <--
[ 16307] 2184s 817ms LAT: <REDACTEDLON: <REDACTEDALT:11620 SPE:    0 VEL:-21,   0,  -1] HDG:26924 <--
[ 16308] 2184s 917ms LAT: <REDACTEDLON: <REDACTEDALT:11620 SPE:    0 VEL:-21,   0,  -1] HDG:26924 <--
[ 16309] 2185s  17ms LAT: <REDACTEDLON: <REDACTEDALT:11620 SPE:    0 VEL:-21,   0,  -1] HDG:26924 <--
[ 16310] 2185s 117ms LAT: <REDACTEDLON: <REDACTEDALT:11620 SPE:    0 VEL:-21,   0,  -1] HDG:26924 <--
[ 16311] 2185s 217ms LAT: <REDACTEDLON: <REDACTEDALT:11620 SPE:    0 VEL:-21,   0,  -1] HDG:26924 <--
[ 16312] 2185s 317ms LAT: <REDACTEDLON: <REDACTEDALT:11620 SPE:    0 VEL:-21,   0,  -1] HDG:26924 <--
[ 16313] 2185s 417ms LAT: <REDACTEDLON: <REDACTEDALT:11620 SPE:    0 VEL:-21,   0,  -1] HDG:26924 <--
[ 16314] 2185s 817ms LAT: <REDACTEDLON: <REDACTEDALT:11620 SPE:    0 VEL:-21,   0,  -1] HDG:26924 <--
[ 16315] 2185s 917ms LAT: <REDACTEDLON: <REDACTEDALT:11620 SPE:    0 VEL:-21,  -1,  -1] HDG:26924 <--
[ 16316] 2186s  17ms LAT: <REDACTEDLON: <REDACTEDALT:11620 SPE:    0 VEL:-22,  -1,  -1] HDG:26924 <--
[ 16317] 2186s 117ms LAT: <REDACTEDLON: <REDACTEDALT:11620 SPE:    0 VEL:-22,  -1,  -1] HDG:26924 <--
[ 16318] 2186s 217ms LAT: <REDACTEDLON: <REDACTEDALT:11620 SPE:  235 VEL:-23,  -1,  -1] HDG:26624
[ 16319] 2186s 317ms LAT
: <REDACTEDLON: <REDACTEDALT:11620 SPE:  240 VEL:-23,  -1,  -1] HDG:26589
[ 16320] 2186s 417ms LAT
: <REDACTEDLON: <REDACTEDALT:11620 SPE:  246 VEL:-24,  -1,  -1] HDG:26552
[ 16321] 2186s 817ms LAT
: <REDACTEDLON: <REDACTEDALT:11620 SPE:  252 VEL:-25,  -2,  -1] HDG:26512
[ 16322] 2186s 917ms LAT
: <REDACTEDLON: <REDACTEDALT:11620 SPE:  258 VEL:-25,  -2,  -1] HDG:26469
[ 16323] 2187s  17ms LAT
: <REDACTEDLON: <REDACTEDALT:11620 SPE:  266 VEL:-26,  -2,  -1] HDG:26424
[ 16324] 2187s 117ms LAT
: <REDACTEDLON: <REDACTEDALT:11620 SPE:  274 VEL:-27,  -2,  -1] HDG:26377
[ 16325] 2187s 217ms LAT
: <REDACTEDLON: <REDACTEDALT:11620 SPE:  290 VEL:-28,  -3,  -1] HDG:26328
[ 16326] 2187s 317ms LAT
: <REDACTEDLON: <REDACTEDALT:11620 SPE:    0 VEL:-27,  -3,   0] HDG:26328 <--
[ 16327] 2187s 417ms LAT: <REDACTEDLON: <REDACTEDALT:11620 SPE:    0 VEL:-14,  -1,   0] HDG:26328 <--
[ 16328] 2187s 817ms LAT: <REDACTEDLON: <REDACTEDALT:11620 SPE:    0 VEL:-17,  -2,  -1] HDG:26328 <--
[ 16329] 2187s 917ms LAT: <REDACTEDLON: <REDACTEDALT:11620 SPE:    0 VEL:-24,  -3,  -1] HDG:26328 <--
[ 16330] 2188s  17ms LAT: <REDACTEDLON: <REDACTEDALT:11620 SPE:    0 VEL:-13,  -1,  -2] HDG:26328 <--
[ 16331] 2188s 117ms LAT: <REDACTEDLON: <REDACTEDALT:11620 SPE:    0 VEL:[  -7,  -1,  -1] HDG:26328 <--
[ 16332] 2188s 217ms LAT: <REDACTEDLON: <REDACTEDALT:11620 SPE:    0 VEL:-23,  -3,  -2] HDG:26328 <--
[ 16333] 2188s 317ms LAT: <REDACTEDLON: <REDACTEDALT:11620 SPE:    0 VEL:[   2, -30,  -1] HDG:26328 <--
[ 16334] 2188s 417ms LAT: <REDACTEDLON: <REDACTEDALT:11620 SPE:    0 VEL:[   8, -32,  -1] HDG:26328 <--
[ 16335] 2188s 817ms LAT: <REDACTEDLON: <REDACTEDALT:11620 SPE:    0 VEL:[  -2, -31,  -1] HDG:26328 <--
[ 16336] 2188s 917ms LAT: <REDACTEDLON: <REDACTEDALT:11620 SPE:    0 VEL:[  -6, -31,  -2] HDG:26328 <--
[ 16337] 2189s  17ms LAT: <REDACTEDLON: <REDACTEDALT:11619 SPE:  334 VEL:-11, -31,  -2] HDG:19953