Fit file: record timestamps

Former Member
Former Member

Is it possible to store records with a milliseconds timestamp? According to the documentation it is stored at seconds.

  • The timestamps in Record messages are defined as seconds, so it is not possible to store records with a milliseconds timestamp.

  • I suspect in a few years there will have to be an extension to FIT to allow for fractional timestamps just like javascript supports.

    (look at how HRV data is supported/stored for inbetween seconds)

    Imagine how large FIT files could get though, it will have to wait until plentiful CPU + storage is available on watches (almost there).

  • Are you referring to the specific message type "Record"/20 or records/messages in general? VIRB Ultra 30, at least, logs fractional timestamps for many message types. `gps_metadata` for example is logged at 10Hz with a sec+ms timestamp for each point. Compare this to GoPro's GPMF which logs gps at 18Hz (perhaps newer devices only), but with only a single timestamp for each second's point-cluster. The more explicitly logged timestamps is one of the reasons I like FIT.

    Also VIRB's 3D sensor data is logged in bursts of up to 30 samples in one message every 300ms, complete with ms offsets for each sample.

    Perhaps watch like devices do not yet have the energy efficiency/power to spare?

  • There is definitely a lack of cpu power, even without knowing specific specs the limitation of only two CIQ on all garmin watches (except the odd 735 allows three which proves more is possible) and I believe garmin bike displays only allow a max of four

    I doubt it's an ANT limitation but CPU+memory

    By the way, would you know if devices like virb support CIQ apps/datafields or is it only the garmin watches and bike computers at this point?

    Garmin should make the conversion to arm cpus, everything is still stuck in the 2001 mentality (first forerunner) when we are two decades past.

  • Not sure. I know you can connect e.g. heart rate sensors to the VIRB over ant, but haven't tried so I don't know what it would log to. Controlling the VIRB via an app is possible.

    Are there examples of CIQ specific fields? The little I can find seems like developer fields. I have not found any dev data on VIRB for the regular data (no field_description/206 etc), but I [ignorantly] assume logging dev data fields is possible via external sensors?

    Would be nice with "core" hardware updates, yes (and while we're at it: please Garmin release a VIRB Ultra 30 successor, or we may have to go with GoPro at work for the next round - I assume fitness watches are more lucrative...).

  • The new Wahoo Rival watch logs a field_description/206 that seems to be a fractional timestamp. Unfortunately it is never used:

    Global ID: 206 | Message type: field_description | Header: 5/0b00000101
        id:   3 field_name            : STRING("time_ms") 
        id:   8 units                 : STRING("ms") 
        id:   0 developer_data_index  : UINT8([3]) 
        id:   1 field_definition_number: UINT8([0]) 
        id:   2 fit_base_type_id      : UINT8([143])

  • Former Member
    0 Former Member

    Thanks for your fast replies!

  • I had a wild brainstorm last night.

    In theory, it is possible to reverse calculate the high-resolution timer that you see for the session and laps, but within the records themselves.

    Think about it, most every garmin records distance + speed for every record. Both are in meters, If you divide one by the other, what is left is seconds. This assumes they both use the same source for the timer which in 99.9% of the cases should be unless one is replaced by a dev field.

    See this between two records

    record (20, type: 12, length: 29 bytes):
      timestamp (253-1-UINT32): 2019-03-09T07:49:54 (921070194)
      distance (5-1-UINT32): 4482.77 m (448277)
      speed (6-1-UINT16): 16.290 km/h (4525)
    record (20, type: 12, length: 29 bytes):
      timestamp (253-1-UINT32): 2019-03-09T07:49:55 (921070195)
      distance (5-1-UINT32): 4487.64 m (448764)
      speed (6-1-UINT16): 16.358 km/h (4544)

    It doesn't even matter if the distance or speed is correct, the watch could be in treadmill mode without GPS and guessing based on the footpod or accelerometer.

    448764 - 448277 = 4.87 meters

    4.87 / 4.544 = 1.07174

    So the timestamp is one second but the internal high-resolution timer is 1071.74ms

    This is rather cool.

  • Do you know GPS device that could record higher than 1 points/sec and so are limited byt FIT / GPX file format?
    If true, it may happen that some FIT / GPX file could have two consecutive trackpoint with the same timestamp but not the same coordinate, which could rise an error in some software if not supported.
    Did you already see it?
    thx

  • VIRB Ultra 30 (FIT) is 10Hz with every coordinate explicitly timestamped as one gps_metadata/160 per logged coordinate. Timestamps will never be the same, since the FIT file is chronological and VIRB's gps_metadata store both seconds and fractional seconds/milliseconds.