Files
GoldenCheetah/util/fit

FITmetadata.json generator

For Garmin device updates:

    Make sure you download the latest FIT SDK from https://developer.garmin.com/fit/download/
    and extract the c/fit_example.h file and place it in this directory.

    Do not edit this file, we expect it to be lifted directly from the SDK
    and it will be replaced as new versions of the SDK are released

For Garmin profile updates:

   The fields.json file in this directory is metadata describing most of the standard
   fields and is based upon the Profile.xls file in the SDK. If new fields are or profiles
   are added and you want them to be parsed via metadata then update fields.json to
   include the entries.

   At present the FIT ride file reader code is a mix of hard coded parsing for
   the majority of the message types, but the code for parsing session and lap
   message types does use the metadata to control parsing (and puts the results
   into the XDATA section of a ridefile)

   If you add new profile then you should use metadata to drive the parsing and
   add the data to the XDATA section to avoid impacting existing code.

Generate a new FITmetadata.json file

    There is a Makefile in this directory that will refresh baed upon the timestamp
    of the fit_example.h. To refresh simply run 'make'. If you wish to re-run and
    regenerate 'touch fit_example.h; make' will do that.

    You will need python3 installed since the generator is a python script. Please
    do not edit this script but raise a github issue if you find it is broken.

When Garmin devices are not yet supported by the SDK

    The SDK lags behind device availability in this case you should add
    the Garmin device to the nongarmin.json file, this will override any
    value found in the Garmin SDK and is typically because a device is 
    reported by a user at the forums before the SDK is updated or is a
    legacy device that Garmin no longer supports.

For non-Garmin device updates:

    Update the file nongarmin.json to add the manufacturer and product combination
    and associated description. See existing values in there as examples. Note
    that a product number of -1 is to set the default description for any device
    from that manufacturer that is not defined


Once the updates have been made you can regenerate FITmetadata.json with:
    $ make

A new FITmetadata.json file will be created in the src/Resources/json directory,