Module: Fit4Ruby

Defined in:
lib/fit4ruby/CRC16.rb,
lib/fit4ruby.rb,
lib/fit4ruby/HRV.rb,
lib/fit4ruby/Lap.rb,
lib/fit4ruby/Log.rb,
lib/fit4ruby/Event.rb,
lib/fit4ruby/FileId.rb,
lib/fit4ruby/Length.rb,
lib/fit4ruby/Record.rb,
lib/fit4ruby/FitFile.rb,
lib/fit4ruby/GeoMath.rb,
lib/fit4ruby/Metrics.rb,
lib/fit4ruby/Session.rb,
lib/fit4ruby/Workout.rb,
lib/fit4ruby/version.rb,
lib/fit4ruby/Activity.rb,
lib/fit4ruby/EPO_Data.rb,
lib/fit4ruby/Software.rb,
lib/fit4ruby/UserData.rb,
lib/fit4ruby/FitFilter.rb,
lib/fit4ruby/FitHeader.rb,
lib/fit4ruby/FitRecord.rb,
lib/fit4ruby/Converters.rb,
lib/fit4ruby/DeviceInfo.rb,
lib/fit4ruby/Monitoring.rb,
lib/fit4ruby/DataSources.rb,
lib/fit4ruby/DumpedField.rb,
lib/fit4ruby/FileCreator.rb,
lib/fit4ruby/FitTypeDefs.rb,
lib/fit4ruby/UserProfile.rb,
lib/fit4ruby/WorkoutStep.rb,
lib/fit4ruby/Monitoring_B.rb,
lib/fit4ruby/FileNameCoder.rb,
lib/fit4ruby/FitDataRecord.rb,
lib/fit4ruby/FitDefinition.rb,
lib/fit4ruby/FitFileEntity.rb,
lib/fit4ruby/HeartRateZones.rb,
lib/fit4ruby/MonitoringInfo.rb,
lib/fit4ruby/SensorSettings.rb,
lib/fit4ruby/TrainingStatus.rb,
lib/fit4ruby/DeveloperDataId.rb,
lib/fit4ruby/FitRecordHeader.rb,
lib/fit4ruby/PersonalRecords.rb,
lib/fit4ruby/FieldDescription.rb,
lib/fit4ruby/FitMessageRecord.rb,
lib/fit4ruby/GlobalFitMessage.rb,
lib/fit4ruby/RecordAggregator.rb,
lib/fit4ruby/GlobalFitDictList.rb,
lib/fit4ruby/GlobalFitMessages.rb,
lib/fit4ruby/FitDefinitionField.rb,
lib/fit4ruby/FitMessageIdMapper.rb,
lib/fit4ruby/PhysiologicalMetrics.rb,
lib/fit4ruby/BDFieldNameTranslator.rb,
lib/fit4ruby/GlobalFitDictionaries.rb,
lib/fit4ruby/FDR_DevField_Extension.rb,
lib/fit4ruby/FitDefinitionFieldBase.rb,
lib/fit4ruby/FitDeveloperDataFieldDefinition.rb

Overview

FDR_DevField_Extension.rb – Fit4Ruby - FIT file processing library for Ruby

Copyright © 2020 by Chris Schlaeger <[email protected]>

This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation.

Defined Under Namespace

Modules: BDFieldNameTranslator, CRC16, Converters, FDR_DevField_Extension, FitDefinitionFieldBase, GeoMath, RecordAggregator Classes: Abort, Activity, DataSources, DeveloperDataId, DeviceInfo, DumpedField, EPO_Data, Error, Event, FieldDescription, FileCreator, FileId, FileNameCoder, FitDataRecord, FitDefinition, FitDefinitionField, FitDeveloperDataFieldDefinition, FitFile, FitFileEntity, FitFilter, FitHeader, FitMessageIdMapper, FitMessageRecord, FitRecord, FitRecordHeader, GlobalFitDict, GlobalFitDictList, GlobalFitMessage, GlobalFitMessageList, HRV, HeartRateZones, ILogger, Lap, Length, Metrics, Monitoring, MonitoringInfo, Monitoring_B, PersonalRecords, PhysiologicalMetrics, Record, SensorSettings, Session, Software, TrainingStatus, UserData, UserProfile, Workout, WorkoutStep

Constant Summary collapse

Log =
ILogger.instance
VERSION =

The version number of the library.

'3.13.0'
FIT_TYPE_DEFS =
[
  # FIT Type, BinData type, undefined value, bytes
  [ 'enum', 'uint8', 0xFF, 1 ],
  [ 'sint8', 'int8', 0x7F, 1 ],
  [ 'uint8', 'uint8', 0xFF, 1 ],
  [ 'sint16', 'int16', 0x7FFF, 2 ],
  [ 'uint16', 'uint16', 0xFFFF, 2 ],
  [ 'sint32', 'int32', 0x7FFFFFFF, 4 ],
  [ 'uint32', 'uint32', 0xFFFFFFFF, 4 ],
  [ 'string', 'string', 0, 1 ],
  [ 'float32', 'float', 0xFFFFFFFF, 4 ],
  [ 'float64', 'double', 0xFFFFFFFFFFFFFFFF, 8 ],
  [ 'uint8z', 'uint8', 0, 1 ],
  [ 'uint16z', 'uint16', 0, 2 ],
  [ 'uint32z', 'uint32', 0, 4 ],
  [ 'byte', 'uint8', 0xFF, 1 ],
  [ 'sint64', 'int64', 0x7FFFFFFFFFFFFFFF, 8 ],
  [ 'uint64', 'uint64', 0xFFFFFFFFFFFFFFFF, 8 ],
  [ 'uint64z', 'uint64', 0, 8 ]
]
GlobalFitMessages =
GlobalFitMessageList.new do
  message 0, 'file_id'
  field 0, 'enum', 'type', :dict => 'file'
  field 1, 'uint16', 'manufacturer', :dict => 'manufacturer'
  alt_field 2, 'manufacturer' do
    field :default, 'uint16', 'product'
    field 'garmin', 'uint16', 'garmin_product', :dict => 'garmin_product'
  end
  field 3, 'uint32z', 'serial_number'
  field 4, 'uint32', 'time_created', :type => 'date_time'
  field 5, 'uint16', 'number'
  field 6, 'uint16', 'undocumented_field_6'
  field 7, 'uint32', 'undocumented_field_7'

  message 2, 'device_settings'
  field 0, 'uint8', 'active_time_zone'
  field 1, 'uint32', 'utc_offset'
  field 2, 'uint32', 'time_offset', :array => true
  field 3, 'enum', 'undocumented_field_3'
  field 4, 'enum', 'time_mode', :array => true
  field 5, 'sint8', 'time_zone_offset', :array => true, :scale => 4
  field 8, 'uint16', 'undocumented_field_8'
  field 9, 'enum', 'undocumented_field_9'
  field 10, 'enum', 'undocumented_field_10'
  field 11, 'enum', 'undocumented_field_11'
  field 12, 'enum', 'backlight_mode', :dict => 'backlight_mode'
  field 13, 'uint8', 'undocumented_field_13'
  field 14, 'uint8', 'undocumented_field_14'
  field 15, 'uint8', 'undocumented_field_15'
  field 16, 'enum', 'undocumented_field_16'
  field 17, 'enum', 'undocumented_field_17'
  field 18, 'enum', 'undocumented_field_18'
  field 22, 'enum', 'undocumented_field_22'
  field 23, 'enum', 'undocumented_field_23'
  field 25, 'enum', 'undocumented_field_25'
  field 26, 'enum', 'undocumented_field_26'
  field 28, 'enum', 'undocumented_field_28'
  field 29, 'enum', 'undocumented_field_29'
  field 30, 'enum', 'undocumented_field_30'
  field 31, 'enum', 'undocumented_field_31'
  field 33, 'uint8', 'undocumented_field_33'
  field 34, 'enum', 'undocumented_field_34'
  field 35, 'enum', 'undocumented_field_35'
  field 36, 'enum', 'activity_tracker_enabled'
  field 38, 'enum', 'undocumented_field_38'
  field 41, 'enum', 'undocumented_field_41'
  field 42, 'enum', 'undocumented_field_42'
  field 43, 'enum', 'undocumented_field_43'
  field 44, 'enum', 'undocumented_field_44'
  field 45, 'enum', 'undocumented_field_45'
  field 46, 'enum', 'move_alert_enabled'
  field 47, 'enum', 'date_mode'
  field 48, 'enum', 'undocumented_field_48'
  field 49, 'uint16', 'undocumented_field_49'
  field 51, 'enum', 'undocumented_field_51'
  field 52, 'enum', 'undocumented_field_52'
  field 53, 'enum', 'undocumented_field_53'
  field 54, 'enum', 'undocumented_field_54'
  field 56, 'enum', 'mounting_side'
  field 55, 'enum', 'undocumented_field_55'
  field 58, 'uint16', 'autosync_min_steps'
  field 59, 'uint16', 'autosync_min_time'
  field 62, 'enum', 'undocumented_field_62'
  field 63, 'enum', 'undocumented_field_63'
  field 64, 'enum', 'undocumented_field_64'
  field 65, 'enum', 'undocumented_field_65'
  field 66, 'enum', 'undocumented_field_66'
  field 67, 'enum', 'undocumented_field_67'
  field 68, 'enum', 'undocumented_field_68'
  field 69, 'enum', 'undocumented_field_69'
  field 75, 'enum', 'undocumented_field_75'
  field 76, 'enum', 'undocumented_field_76'
  field 77, 'enum', 'undocumented_field_77'
  field 80, 'enum', 'lactate_threshold_autodetect_enabled'
  field 81, 'enum', 'undocumented_field_81'
  field 82, 'enum', 'undocumented_field_82'
  field 83, 'enum', 'undocumented_field_83'
  field 84, 'enum', 'undocumented_field_84'
  field 85, 'enum', 'undocumented_field_85'
  field 87, 'enum', 'undocumented_field_87'
  field 90, 'uint32', 'auto_activity_detect'
  field 91, 'uint8z', 'undocumented_field_91'
  field 94, 'uint8', 'number_of_screens'
  field 96, 'enum', 'undocumented_field_96'
  field 97, 'uint8z', 'undocumented_field_97'
  field 98, 'enum', 'undocumented_field_98'
  field 101, 'enum', 'undocumented_field_101'
  field 104, 'enum', 'undocumented_field_104'
  field 106, 'enum', 'undocumented_field_106'
  field 107, 'enum', 'undocumented_field_107'
  field 108, 'enum', 'undocumented_field_108'
  field 109, 'enum', 'undocumented_field_109'
  field 110, 'enum', 'undocumented_field_110'
  field 111, 'enum', 'undocumented_field_111'
  field 112, 'enum', 'undocumented_field_112'
  field 116, 'enum', 'undocumented_field_116'
  field 117, 'enum', 'undocumented_field_117'
  field 121, 'enum', 'undocumented_field_121'
  field 124, 'uint8', 'undocumented_field_124'
  field 125, 'uint8', 'undocumented_field_125'
  field 126, 'enum', 'undocumented_field_126'
  field 127, 'enum', 'undocumented_field_127'
  field 128, 'enum', 'undocumented_field_128'
  field 129, 'enum', 'undocumented_field_129'
  field 130, 'enum', 'undocumented_field_130'
  field 131, 'enum', 'undocumented_field_131'
  field 132, 'enum', 'undocumented_field_132'
  field 133, 'enum', 'undocumented_field_133'
  field 137, 'enum', 'undocumented_field_137'
  field 138, 'enum', 'undocumented_field_138'
  field 139, 'enum', 'undocumented_field_139'
  field 141, 'uint8', 'undocumented_field_141'
  field 142, 'uint8', 'undocumented_field_142'
  field 143, 'uint8', 'undocumented_field_143'
  field 144, 'enum', 'true_up_enabled'
  field 145, 'enum', 'undocumented_field_145'
  field 148, 'enum', 'undocumented_field_148'
  field 149, 'enum', 'undocumented_field_149'
  field 151, 'enum', 'undocumented_field_151'
  field 160, 'enum', 'undocumented_field_160'
  field 163, 'enum', 'undocumented_field_163'
  field 164, 'uint8', 'undocumented_field_164'
  field 167, 'string', 'undocumented_field_167'
  field 168, 'enum', 'undocumented_field_168'
  field 170, 'uint8', 'undocumented_field_170'

  message 3, 'user_profile'
  field 0, 'string', 'friendly_name'
  field 1, 'enum', 'gender', :dict => 'gender'
  field 2, 'uint8', 'age'
  field 3, 'uint8', 'height', :scale => 100, :unit => 'm'
  field 4, 'uint16', 'weight', :scale => 10, :unit => 'kg'
  field 5, 'enum', 'language'
  field 6, 'enum', 'elev_setting'
  field 7, 'enum', 'weight_setting'
  field 8, 'uint8', 'resting_heart_rate', :unit => 'bpm'
  field 10, 'uint8', 'default_max_biking_heart_rate', :dict => 'display_heart'
  field 11, 'uint8', 'default_max_heart_rate', :dict => 'display_heart'
  field 12, 'enum', 'hr_setting', :dict => 'display_heart'
  field 13, 'enum', 'speed_setting', :dict => 'display_measure'
  field 14, 'enum', 'dist_setting', :dict => 'display_measure'
  field 16, 'enum', 'power_setting'
  field 17, 'enum', 'activity_class', :scale => 10
  field 18, 'enum', 'position_setting', :dict => 'display_position'
  field 21, 'enum', 'temperature_setting', :dict => 'display_measure'
  field 24, 'uint8', 'birth_year'
  field 28, 'uint32', 'wake_time', :type => 'duration'
  field 29, 'uint32', 'sleep_time', :type => 'duration'
  field 30, 'enum', 'height_setting', :dict => 'display_measure'
  field 31, 'uint16', 'user_running_step_length'
  field 32, 'uint16', 'user_walking_step_length'
  field 33, 'uint16', 'undocumented_field_33' # varies between 800 to 1600, seems VO2max related
  field 34, 'uint16', 'undocumented_field_34'
  field 35, 'uint32', 'undocumented_field_35'
  field 36, 'uint8', 'undocumented_field_36'
  field 37, 'uint16', 'functional_threshold_speed', :scale => 36, :unit => 'm/s'
  field 38, 'uint16', 'undocumented_field_38'
  field 39, 'float32', 'undocumented_field_39'
  field 40, 'float32', 'undocumented_field_40'
  field 41, 'uint32', 'time_last_lthr_update', :type => 'date_time'
  field 42, 'uint32', 'undocumented_field_42'
  field 43, 'enum', 'undocumented_field_43'
  field 44, 'uint8', 'undocumented_field_44'
  field 45, 'uint8z', 'undocumented_field_45'
  field 47, 'enum', 'undocumented_field_47'
  field 52, 'enum', 'undocumented_field_52'
  field 53, 'uint8', 'undocumented_field_53'
  field 54, 'uint8', 'undocumented_field_54'
  field 57, 'enum', 'undocumented_field_57'
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  message 5, 'sdm_profile'
  field 0, 'bool', 'enabled'
  field 1, 'uint16z', 'sdm_ant_id'
  field 2, 'uint16', 'sdm_cal_factor', :scale => 10, :unit => '%'
  field 3, 'uint32', 'odometer', :scale => 100, :unit => 'm'
  field 4, 'bool', 'speed_source'
  field 5, 'uint8z', 'sdm_ant_id_trans_type'
  field 7, 'uint8', 'odometer_rollover'

  message 6, 'bike_profile'
  field 0, 'string', 'name'
  field 1, 'sport', 'sport'
  field 2, 'sub_sport', 'sub_sport'
  field 3, 'uint32', 'odometer', :scale => 100, :unit => 'm'
  field 4, 'uint16z', 'bike_spd_ant_id'
  field 5, 'uint16z', 'bike_cad_ant_id'
  field 6, 'uint16z', 'bike_spdcad_ant_id'
  field 7, 'uint16z', 'bike_power_ant_id'
  field 8, 'uint16', 'custom_wheelsize', :scale => 1000, :unit => 'm'
  field 9, 'uint16', 'auto_wheelsize', :scale => 1000, :unit => 'm'
  field 10, 'uint16', 'bike_weight', :scale => 10, :unit => 'kg'
  field 11, 'uint16', 'power_cal_factor', :scale => 10, :unit => '%'
  field 12, 'bool', 'auto_wheel_cal'
  field 13, 'bool', 'auto_power_zero'
  field 14, 'uint8', 'id'
  field 15, 'bool', 'spd_enabled'
  field 16, 'bool', 'cad_enabled'
  field 17, 'bool', 'spdcad_enabled'
  field 18, 'bool', 'power_enabled'
  field 19, 'uint8', 'crank_length', :scale => 2, :offset => -110, :unit => 'mm'
  field 20, 'bool', 'enabled'
  field 21, 'uint8z', 'bike_spd_ant_id_trans_type'
  field 22, 'uint8z', 'bike_cad_ant_id_trans_type'
  field 23, 'uint8z', 'bike_spdcad_ant_id_trans_type'
  field 24, 'uint8z', 'bike_power_ant_id_trans_type'
  field 37, 'uint8', 'odometer_rollover'
  field 38, 'uint8z', 'front_gear_num', :array => true
  field 39, 'uint8z', 'front_gear'
  field 40, 'uint8z', 'rear_gear_num', :array => true
  field 41, 'uint8z', 'rear_gear'
  field 44, 'bool', 'shimano_di2_enabled'

  message 7, 'zones_target'
  field 1, 'uint8', 'max_heart_rate'
  field 2, 'uint8', 'threshold_heart_rate'
  field 3, 'uint16', 'functional_threshold_power'
  field 5, 'enum', 'hr_zone_calc', :dict => 'hr_zone_calc'
  field 7, 'enum', 'pwr_zone_calc', :dict => 'pwr_zone_calc'
  field 8, 'uint16', 'undocumented_field_8'
  field 9, 'enum', 'undocumented_field_9'
  field 10, 'enum', 'undocumented_field_10'
  field 11, 'enum', 'undocumented_field_11'
  field 12, 'enum', 'undocumented_field_12'
  field 13, 'enum', 'undocumented_field_13'
  field 15, 'uint16', 'undocumented_field_15'
  field 16, 'uint32', 'undocumented_field_16'
  field 254, 'uint16', 'message_index'

  message 12, 'sport'
  field 0, 'enum', 'sport', :dict => 'sport'
  field 1, 'enum', 'sub_sport', :dict => 'sub_sport'
  field 3, 'string', 'name'
  field 4, 'uint16', 'undocumented_field_4'
  field 5, 'enum', 'undocumented_field_5'
  field 6, 'enum', 'undocumented_field_6'
  field 7, 'uint8', 'undocumented_field_7'
  field 8, 'uint8', 'undocumented_field_8'
  field 9, 'uint8', 'undocumented_field_9'
  field 10, 'uint8', 'undocumented_field_10', :array => true
  field 11, 'enum', 'undocumented_field_11'
  field 12, 'uint8', 'undocumented_field_12', :array => true
  field 13, 'enum', 'undocumented_field_13'
  field 15, 'enum', 'undocumented_field_15'
  field 17, 'enum', 'undocumented_field_17'
  field 18, 'enum', 'undocumented_field_18'
  field 19, 'enum', 'undocumented_field_19', :array => true
  field 21, 'enum', 'undocumented_field_21'

  # Not part of the official ANT SDK doc.
  message 13, 'undocumented_13'
  field 1, 'enum', 'undocumented_field_1'
  field 2, 'uint16', 'undocumented_field_2'
  field 3, 'enum', 'undocumented_field_3'
  field 4, 'uint32', 'undocumented_field_4'
  field 5, 'sint32', 'undocumented_field_5'
  field 6, 'sint32', 'undocumented_field_6'
  field 7, 'enum', 'undocumented_field_7'
  field 8, 'uint16', 'undocumented_field_8'
  field 9, 'enum', 'undocumented_field_9'
  field 10, 'uint16', 'undocumented_field_10'
  field 11, 'uint8', 'undocumented_field_11'
  field 12, 'enum', 'undocumented_field_12'
  field 13, 'enum', 'undocumented_field_13'
  field 14, 'enum', 'undocumented_field_14'
  field 15, 'enum', 'undocumented_field_15'
  field 16, 'enum', 'undocumented_field_16'
  field 18, 'enum', 'undocumented_field_18'
  field 19, 'uint16', 'undocumented_field_19'
  field 21, 'enum', 'undocumented_field_21'
  field 22, 'uint16', 'undocumented_field_22'
  field 23, 'enum', 'undocumented_field_23'
  field 24, 'enum', 'undocumented_field_24'
  field 25, 'enum', 'undocumented_field_25'
  field 27, 'enum', 'undocumented_field_27'
  field 28, 'enum', 'undocumented_field_28'
  field 29, 'enum', 'undocumented_field_29'
  field 30, 'enum', 'undocumented_field_30'
  field 31, 'uint32', 'undocumented_field_31'
  field 32, 'uint16', 'undocumented_field_32'
  field 33, 'uint32', 'undocumented_field_33'
  field 34, 'enum', 'undocumented_field_34'
  field 35, 'enum', 'undocumented_field_35'
  field 36, 'enum', 'undocumented_field_36'
  field 37, 'enum', 'undocumented_field_37'
  field 38, 'uint8', 'undocumented_field_38'
  field 39, 'uint8', 'undocumented_field_39'
  field 40, 'enum', 'undocumented_field_40'
  field 41, 'sint32', 'undocumented_field_41'
  field 42, 'uint8', 'undocumented_field_42'
  field 43, 'enum', 'undocumented_field_43'
  field 44, 'enum', 'undocumented_field_44'
  field 45, 'enum', 'undocumented_field_45'
  field 46, 'enum', 'undocumented_field_46'
  field 47, 'enum', 'undocumented_field_47'
  field 48, 'enum', 'undocumented_field_48'
  field 50, 'enum', 'undocumented_field_50'
  field 51, 'enum', 'undocumented_field_51'
  field 52, 'uint16', 'undocumented_field_52'
  field 53, 'enum', 'undocumented_field_53'
  field 54, 'uint32', 'undocumented_field_54'
  field 55, 'enum', 'undocumented_field_55'
  field 57, 'enum', 'undocumented_field_57'
  field 58, 'enum', 'undocumented_field_58'
  field 60, 'enum', 'undocumented_field_60'
  field 61, 'enum', 'undocumented_field_61'
  field 62, 'enum', 'undocumented_field_62'
  field 63, 'enum', 'undocumented_field_63'
  field 64, 'uint16', 'undocumented_field_64'
  field 65, 'enum', 'undocumented_field_65'
  field 66, 'enum', 'undocumented_field_66'
  field 67, 'enum', 'undocumented_field_67'
  field 68, 'sint32','undocumented_field_68'
  field 69, 'uint16', 'undocumented_field_69'
  field 70, 'enum', 'undocumented_field_70'
  field 71, 'enum', 'undocumented_field_71'
  field 72, 'enum', 'undocumented_field_72'
  field 73, 'sint32', 'undocumented_field_73'
  field 74, 'sint32', 'undocumented_field_74'
  field 75, 'enum', 'undocumented_field_75'
  field 76, 'enum', 'undocumented_field_76'
  field 78, 'enum', 'undocumented_field_78'
  field 79, 'enum', 'undocumented_field_79'
  field 81, 'enum', 'undocumented_field_81'
  field 82, 'enum', 'undocumented_field_82'
  field 83, 'enum', 'undocumented_field_83'
  field 254, 'uint16', 'message_index'

  message 18, 'session'
  field 0, 'enum', 'event', :dict => 'event'
  field 1, 'enum', 'event_type', :dict => 'event_type'
  field 2, 'uint32', 'start_time', :type => 'date_time'
  field 3, 'sint32', 'start_position_lat', :type => 'coordinate'
  field 4, 'sint32', 'start_position_long', :type => 'coordinate'
  field 5, 'enum', 'sport', :dict => 'sport'
  field 6, 'enum', 'sub_sport', :dict => 'sub_sport'
  field 7, 'uint32', 'total_elapsed_time', :type => 'duration', :scale => 1000
  field 8, 'uint32', 'total_timer_time', :type => 'duration', :scale => 1000
  field 9, 'uint32', 'total_distance', :scale => 100, :unit => 'm'
  alt_field 10, 'sport' do
    field :default, 'uint32', 'total_cycles', :unit => 'cycles'
    field [ 'running', 'walking' ], 'uint32', 'total_strides', :unit => 'strides'
  end
  field 11, 'uint16', 'total_calories', :unit => 'kcal'
  field 13, 'uint16', 'total_fat_calories', :unit => 'kcal'
  field 14, 'uint16', 'avg_speed', :scale => 1000, :unit => 'm/s'
  field 15, 'uint16', 'max_speed', :scale => 1000, :unit => 'm/s'
  field 16, 'uint8', 'avg_heart_rate', :unit => 'bpm'
  field 17, 'uint8', 'max_heart_rate', :unit => 'bpm'
  alt_field 18, 'sport' do
    field :default, 'uint8', 'avg_cadence', :unit => 'rpm'
    field 'running', 'uint8', 'avg_running_cadence', :unit => 'strides/min'
  end
  alt_field 19, 'sport' do
    field :default, 'uint8', 'max_cadence', :unit => 'rpm'
    field 'running', 'uint8', 'max_running_cadence', :unit => 'strides/min'
  end
  field 20, 'uint16', 'avg_power', :unit => 'watts'
  field 21, 'uint16', 'max_power', :unit => 'watts'
  field 22, 'uint16', 'total_ascent', :unit => 'm'
  field 23, 'uint16', 'total_descent', :unit => 'm'
  field 24, 'uint8', 'total_training_effect', :scale => 10
  field 25, 'uint16', 'first_lap_index'
  field 26, 'uint16', 'num_laps'
  field 27, 'uint8', 'event_group'
  field 28, 'enum', 'trigger', :dict => 'session_trigger'
  field 29, 'sint32', 'nec_lat', :type => 'coordinate'
  field 30, 'sint32', 'nec_long', :type => 'coordinate'
  field 31, 'sint32', 'swc_lat', :type => 'coordinate'
  field 32, 'sint32', 'swc_long', :type => 'coordinate'
  field 33, 'uint16', 'undefined_value_33'
  field 34, 'uint16', 'normalized_power', :unit => 'watts'
  field 35, 'uint16', 'training_stress_score', :scale => 10, :unit => 'tss'
  field 36, 'uint16', 'intensity_factor', :scale => 1000, :unit => 'if'
  field 37, 'uint16', 'left_right_balance', :dict => 'left_right_balance_100'
  field 38, 'sint32', 'lap1_lat', :type => 'coordinate' # guessed
  field 39, 'sint32', 'lap1_long', :type => 'coordinate' # guessed
  field 41, 'uint32', 'avg_stroke_count', :scale => 10, :unit => 'strokes/lap'
  field 42, 'uint16', 'avg_stroke_distance', :scale => 100, :unit => 'm'
  field 43, 'enum', 'swim_stroke', :dict => 'swim_stroke'
  field 44, 'uint16', 'pool_length', :scale => 100, :unit => 'm'
  field 45, 'uint16', 'undefined_value_45'
  field 46, 'enum', 'pool_length_unit', :dict => 'display_measure'
  field 47, 'uint16', 'num_active_lengths', :unit => 'lengths'
  field 48, 'uint32', 'total_work', :unit => 'J'
  field 57, 'sint8', 'avg_temperature', :unit => 'C'
  field 58, 'sint8', 'max_temperature', :unit => 'C'
  field 65, 'uint32', 'time_in_hr_zone', :array => true, :scale => 1000, :unit => 's'
  field 68, 'uint32', 'time_in_power_zone', :array => true, :scale => 1000, :unit => 's'
  field 78, 'uint32', 'undocumented_field_78'
  field 79, 'uint16', 'undocumented_field_79'
  field 80, 'uint16', 'undocumented_field_80'
  field 81, 'enum', 'undocumented_field_81'
  field 89, 'uint16', 'avg_vertical_oscillation', :scale => 10, :unit => 'mm'
  field 90, 'uint16', 'avg_stance_time_percent', :scale => 100, :unit => 'percent'
  field 91, 'uint16', 'avg_stance_time', :scale => 10, :unit => 'ms'
  field 92, 'uint8', 'avg_fractional_cadence', :scale => 128, :unit => 'rpm'
  field 93, 'uint8', 'max_fractional_cadence', :scale => 128, :unit => 'rpm'
  field 94, 'uint8', 'total_fractional_cycles', :scale => 128, :unit => 'cycles'
  field 95, 'uint16', 'avg_total_hemoglobin_conc', :array => true, :scale => 100, :unit => 'g/dL'
  field 96, 'uint16', 'min_total_hemoglobin_conc', :array => true, :scale => 100, :unit => 'g/dL'
  field 97, 'uint16', 'max_total_hemoglobin_conc', :array => true, :scale => 100, :unit => 'g/dL'
  field 101, 'uint8', 'avg_left_torque_effectiveness', :scale => 2, :unit => 'percent'
  field 102, 'uint8', 'avg_right_torque_effectiveness', :scale => 2, :unit => 'percent'
  field 103, 'uint8', 'avg_left_pedal_smoothness', :scale => 2, :unit => 'percent'
  field 104, 'uint8', 'avg_right_pedal_smoothness', :scale => 2, :unit => 'percent'
  field 105, 'uint8', 'avg_combined_pedal_smoothness', :scale => 2, :unit => 'percent'
  field 106, 'uint16', 'undocumented_field_106'
  field 107, 'uint16', 'undefined_value_107'
  field 108, 'uint16', 'undefined_value_108'
  field 109, 'uint8', 'undefined_value_109'
  field 110, 'string', 'undefined_value_110'
  field 111, 'uint8', 'undefined_value_111'
  field 112, 'uint32', 'time_standing', :scale => 1000, :unit => 's'
  field 113, 'uint16', 'stand_count'
  field 114, 'sint8', 'avg_left_pco', :unit => 'mm'
  field 115, 'sint8', 'avg_right_pco', :unit => 'mm'
  field 116, 'uint8', 'avg_left_power_phase', :array => true, :unit => 'degrees'
  field 117, 'uint8', 'avg_left_power_phase_peak', :array => true, :unit => 'degrees'
  field 118, 'uint8', 'avg_right_power_phase', :array => true, :unit => 'degrees'
  field 119, 'uint8', 'avg_right_power_phase_peak', :array => true, :unit => 'degrees'
  field 120, 'uint16', 'avg_power_position', :array => true, :unit => 'watts'
  field 121, 'uint16', 'max_power_position', :array => true, :unit => 'watts'
  field 122, 'uint8', 'avg_cadence_position', :array => true, :unit => 'rpm'
  field 123, 'uint8', 'max_cadence_position', :array => true, :unit => 'rpm'
  field 124, 'uint32', 'enhanced_avg_speed', :scale => 1000, :unit => 'm/s'
  field 125, 'uint32', 'enhanced_max_speed', :scale => 1000, :unit => 'm/s'
  field 126, 'uint32', 'enhanced_avg_altitude', :scale => 5, :offset => 500, :unit => 'm'
  field 127, 'uint32', 'enhanced_min_altitude', :scale => 5, :offset => 500, :unit => 'm'
  field 128, 'uint32', 'enhanced_max_altitude', :scale => 5, :offset => 500, :unit => 'm'
  field 132, 'uint16', 'avg_vertical_ratio', :scale => 100, :unit => '%'
  field 133, 'uint16', 'avg_stance_time_balance', :scale => 100, :unit => '%'
  field 134, 'uint16', 'avg_step_length', :scale => 10, :unit => 'mm'
  field 137, 'uint8', 'total_anaerobic_training_effect', :scale => 10
  field 138, 'uint8', 'undocumented_field_138'
  field 139, 'uint16', 'avg_vam', :scale => 1000, :unit => 'm/s'
  field 150, 'sint8', 'min_temperature', :unit => 'C' # guessed
  field 151, 'uint16', 'undocumented_field_151'
  field 152, 'uint32', 'undocumented_field_152'
  field 157, 'uint16', 'undocumented_field_157'
  field 158, 'uint16', 'undocumented_field_158'
  field 153, 'enum', 'undocumented_field_153'
  field 154, 'enum', 'undocumented_field_154'
  field 168, 'sint32', 'undocumented_field_168'
  field 169, 'uint16', 'undocumented_field_169'
  field 170, 'uint16', 'undocumented_field_170'
  field 177, 'uint16', 'undocumented_field_177'
  field 178, 'uint16', 'est_sweat_loss', :unit => 'ml' # guessed
  field 179, 'uint16', 'undocumented_field_179'
  field 180, 'uint16', 'undocumented_field_180'
  field 181, 'float32', 'total_grit', :unit => 'kGrit'
  field 182, 'float32', 'total_flow', :unit => 'Flow'
  field 183, 'uint16', 'jump_count'
  field 184, 'enum', 'undocumented_field_184'
  field 185, 'uint8', 'undocumented_field_185'
  field 186, 'float32', 'avg_grit', :unit => 'kGrit'
  field 187, 'float32', 'avg_flow', :unit => 'Flow'
  field 188, 'enum', 'undocumented_field_188'
  field 189, 'uint16', 'undocumented_field_189'
  field 190, 'uint16', 'undocumented_field_190'
  field 194, 'uint8', 'undocumented_field_194'
  field 195, 'uint8', 'undocumented_field_195'
  field 199, 'uint8', 'total_fractional_ascent', :scale => 100, :unit => 'm'
  field 200, 'uint8', 'total_fractional_descent', :scale => 100, :unit => 'm'
  field 253, 'uint32', 'timestamp', :type => 'date_time'
  field 254, 'uint16', 'message_index'

  message 19, 'lap'
  field 0, 'enum', 'event', :dict => 'event'
  field 1, 'enum', 'event_type', :dict => 'event_type'
  field 2, 'uint32', 'start_time', :type => 'date_time'
  field 3, 'sint32', 'start_position_lat', :type => 'coordinate'
  field 4, 'sint32', 'start_position_long', :type => 'coordinate'
  field 5, 'sint32', 'end_position_lat', :type => 'coordinate'
  field 6, 'sint32', 'end_position_long', :type => 'coordinate'
  field 7, 'uint32', 'total_elapsed_time', :type => 'duration', :scale => 1000
  field 8, 'uint32', 'total_timer_time', :type => 'duration', :scale => 1000
  field 9, 'uint32', 'total_distance', :scale => 100, :unit => 'm'
  field 25, 'enum', 'sport', :dict => 'sport'
  alt_field 10, 'sport' do
    field :default, 'uint32', 'total_cycles', :unit => 'cycles'
    field [ 'running', 'walking' ], 'uint32', 'total_strides', :unit => 'strides'
  end
  field 11, 'uint16', 'total_calories', :unit => 'kcal'
  field 12, 'uint16', 'total_fat_calories', :unit => 'kcal'
  field 13, 'uint16', 'avg_speed', :scale => 1000, :unit => 'm/s'
  field 14, 'uint16', 'max_speed', :scale => 1000, :unit => 'm/s'
  field 15, 'uint8', 'avg_heart_rate', :unit => 'bpm'
  field 16, 'uint8', 'max_heart_rate', :unit => 'bpm'
  alt_field 17, 'sport' do
    field :default, 'uint8', 'avg_cadence', :unit => 'rpm'
    field 'running', 'uint8', 'avg_running_cadence', :unit => 'strides/min'
  end
  alt_field 18, 'sport' do
    field :default, 'uint8', 'max_cadence', :unit => 'rpm'
    field 'running', 'uint8', 'max_running_cadence', :unit => 'strides/min'
  end
  field 19, 'uint16', 'avg_power', :unit => 'watts'
  field 20, 'uint16', 'max_power', :unit => 'watts'
  field 21, 'uint16', 'total_ascent', :unit => 'm'
  field 22, 'uint16', 'total_descent', :unit => 'm'
  field 23, 'enum', 'intensity', :dict => 'intensity'
  field 24, 'enum', 'lap_trigger', :dict => 'lap_trigger'
  field 26, 'uint8', 'event_group'
  field 27, 'sint32', 'nec_lat', :type => 'coordinate'
  field 28, 'sint32', 'nec_long', :type => 'coordinate'
  field 29, 'sint32', 'swc_lat', :type => 'coordinate'
  field 30, 'sint32', 'swc_long', :type => 'coordinate'
  field 32, 'uint16', 'num_length', :unit => 'lengths'
  field 33, 'uint16', 'normalized_power', :unit => 'watts'
  field 34, 'uint16', 'left_right_balance', :dict => 'left_right_balance_100'
  field 35, 'uint16', 'first_length_index'
  field 37, 'uint16', 'avg_stroke_distance', :scale => 100, :unit => 'm'
  field 38, 'enum', 'swim_stroke', :dict => 'swim_stroke'
  field 39, 'enum', 'sub_sport', :dict => 'sub_sport'
  field 40, 'uint16', 'num_active_lengths', :unit => 'lengths'
  field 41, 'uint32', 'total_work', :unit => 'J'
  field 50, 'sint8', 'avg_temperature', :unit => 'C'
  field 51, 'sint8', 'max_temperature', :unit => 'C'
  field 57, 'uint32', 'time_in_hr_zone', :array => true, :scale => 1000, :unit => 's'
  field 60, 'uint32', 'avg_pos_vertical_speed', :scale => 1000, :unit => 'm/s'
  field 70, 'uint32', 'undefined_value_70'
  field 71, 'uint16', 'wkt_step_index'
  field 72, 'enum', 'undocumented_field_72'
  field 73, 'uint16', 'undefined_value_73'
  field 77, 'uint16', 'avg_vertical_oscillation', :scale => 10, :unit => 'mm'
  field 78, 'uint16', 'avg_stance_time_percent', :scale => 100, :unit => 'percent'
  field 79, 'uint16', 'avg_stance_time', :scale => 10, :unit => 'ms'
  field 80, 'uint8', 'avg_fractional_cadence', :scale => 128
  field 81, 'uint8', 'max_fractional_cadence', :scale => 128
  field 82, 'uint8', 'total_fractional_cycles', :scale => 128
  field 90, 'uint16', 'undefined_value_90'
  field 91, 'uint8', 'avg_left_torque_effectiveness', :scale => 2, :unit => 'percent'
  field 92, 'uint8', 'avg_right_torque_effectiveness', :scale => 2, :unit => 'percent'
  field 93, 'uint8', 'avg_left_pedal_smoothness', :scale => 2, :unit => 'percent'
  field 94, 'uint8', 'avg_right_pedal_smoothness', :scale => 2, :unit => 'percent'
  field 95, 'uint8', 'avg_combined_pedal_smoothness', :scale => 2, :unit => 'percent'
  field 96, 'uint16', 'undefined_value_96'
  field 97, 'uint16', 'undefined_value_97'
  field 98, 'uint32', 'time_standing', :scale => 1000, :unit => 's'
  field 99, 'uint16', 'stand_count'
  field 100, 'sint8', 'avg_left_pco', :unit => 'mm'
  field 101, 'sint8', 'avg_right_pco', :unit => 'mm'
  field 102, 'uint8', 'avg_left_power_phase', :array => true, :unit => 'degrees'
  field 103, 'uint8', 'avg_left_power_phase_peak', :array => true, :unit => 'degrees'
  field 104, 'uint8', 'avg_right_power_phase', :array => true, :unit => 'degrees'
  field 105, 'uint8', 'avg_right_power_phase_peak', :array => true, :unit => 'degrees'
  field 106, 'uint16', 'avg_power_position', :array => true, :unit => 'watts'
  field 107, 'uint16', 'max_power_position', :array => true, :unit => 'watts'
  field 108, 'uint8', 'avg_cadence_position', :array => true, :unit => 'rpm'
  field 109, 'uint8', 'max_cadence_position', :array => true, :unit => 'rpm'
  field 110, 'uint32', 'enhanced_avg_speed', :scale => 1000, :unit => 'm/s'
  field 111, 'uint32', 'enhanced_max_speed', :scale => 1000, :unit => 'm/s'
  field 112, 'uint32', 'enhanced_avg_altitude', :scale => 5, :offset => 500, :unit => 'm'
  field 113, 'uint32', 'enhanced_min_altitude', :scale => 5, :offset => 500, :unit => 'm'
  field 114, 'uint32', 'enhanced_max_altitude', :scale => 5, :offset => 500, :unit => 'm'
  field 118, 'uint16', 'avg_vertical_ratio', :scale => 100, :unit => '%'
  field 119, 'uint16', 'avg_stance_time_balance', :scale => 100, :unit => '%'
  field 120, 'uint16', 'avg_step_length', :scale => 10000, :unit => 'm'
  field 121, 'uint16', 'avg_vam', :scale => 1000, :unit => 'm/s'
  field 124, 'sint8', 'min_temperature', :unit => 'C' # guessed
  field 125, 'uint16', 'undocumented_field_125'
  field 126, 'uint16', 'undocumented_field_126'
  field 136, 'uint16', 'undocumented_field_136'
  field 137, 'uint16', 'undocumented_field_137'
  field 143, 'uint16', 'undocumented_field_143'
  field 145, 'uint16', 'undocumented_field_145'
  field 149, 'float32', 'undocumented_field_149'
  field 151, 'uint16', 'undocumented_field_151'
  field 152, 'uint8', 'undocumented_field_152'
  field 154, 'float32', 'undocumented_field_154'
  field 253, 'uint32', 'timestamp', :type => 'date_time'
  field 254, 'uint16', 'message_index'

  message 20, 'record'
  field 0, 'sint32', 'position_lat', :type => 'coordinate'
  field 1, 'sint32', 'position_long', :type => 'coordinate'
  field 2, 'uint16', 'altitude', :scale => 5, :offset => 500, :unit => 'm'
  field 3, 'uint8', 'heart_rate', :unit => 'bpm'
  field 4, 'uint8', 'cadence', :unit => 'rpm'
  field 5, 'uint32', 'distance', :scale => 100, :unit => 'm'
  field 6, 'uint16', 'speed', :scale => 1000, :unit => 'm/s'
  field 7, 'uint16', 'power', :unit => 'watts'
  field 8, 'byte', 'compressed_speed_distance', :array => true
  field 9, 'sint16', 'grade', :scale => 100, :unit => '%'
  field 10, 'uint8', 'resistence'
  field 11, 'sint32', 'time_from_course', :scale => 1000, :unit => 's'
  field 12, 'uint8', 'cycle_length', :scale => 100, :unit => 'm'
  field 13, 'sint8', 'temperature', :unit => 'C'
  field 14, 'uint32', 'undefined_field_14'
  field 15, 'uint32', 'undefined_field_15'
  field 18, 'uint8', 'undefined_field_18'
  field 29, 'uint32', 'accumulated_power', :unit => 'watts'
  field 30, 'uint8', 'left_right_balance', :dict => 'left_right_balance'
  field 39, 'uint16', 'vertical_oscillation', :scale => 10, :unit => 'mm'
  field 40, 'uint16', 'stance_time_percent', :scale => 100, :unit => 'percent'
  field 41, 'uint16', 'stance_time', :scale => 10, :unit => 'ms'
  field 42, 'enum', 'activity_type', :dict => 'activity_type'
  field 43, 'uint8', 'left_torque_effectiveness', :scale => 2, :unit => '%'
  field 44, 'uint8', 'right_torque_effectiveness', :scale => 2, :unit => '%'
  field 45, 'uint8', 'left_pedal_smoothness', :scale => 2, :unit => '%'
  field 46, 'uint8', 'right_pedal_smoothness', :scale => 2, :unit => '%'
  field 47, 'uint8', 'combined_pedal_smoothness', :scale => 2, :unit => '%'
  field 53, 'uint8', 'fractional_cadence', :scale => 128
  field 54, 'uint16', 'total_hemoglobin_conc', :scale => 100, :unit => 'g/dL'
  field 57, 'uint16', 'saturated_hemoglobin_percent', :scale => 10, :unit => '%'
  field 61, 'uint16', 'undefined_value_61'
  field 63, 'uint16', 'undefined_value_63'
  field 64, 'uint16', 'undefined_value_64'
  field 65, 'uint16', 'undefined_value_65'
  field 66, 'sint16', 'undefined_value_66'
  field 67, 'sint8', 'left_pco', :unit => 'mm'
  field 68, 'sint8', 'right_pco', :unit => 'mm'
  field 69, 'uint8', 'left_power_phase', :scale => 0.7111111, :unit => 'degrees', :array => true
  field 70, 'uint8', 'left_power_phase_peak', :scale => 0.7111111, :unit => 'degrees', :array => true
  field 71, 'uint8', 'right_power_phase', :scale => 0.7111111, :unit => 'degrees', :array => true
  field 72, 'uint8', 'right_power_phase_peak', :scale => 0.7111111, :unit => 'degrees', :array => true
  field 73, 'uint32', 'enhanced_speed', :scale => 1000, :unit => 'm/s'
  field 74, 'uint32', 'undefined_value_74'
  field 75, 'uint32', 'undefined_value_75'
  field 76, 'uint32', 'undefined_value_76'
  field 77, 'uint32', 'undefined_value_77'
  field 79, 'uint32', 'undefined_value_79'
  field 80, 'uint32', 'undefined_value_80'
  field 78, 'uint32', 'enhanced_elevation', :scale => 5, :offset => 500, :unit => 'm'
  field 83, 'uint16', 'vertical_ratio', :scale => 100, :unit => '%' # guessed
  field 84, 'uint16', 'gct_balance', :scale => 100, :unit => '%' # guessed
  field 85, 'uint16', 'stride_length', :scale => 10000, :unit => 'm' # guessed
  field 87, 'uint16', 'stroke_distance', :scale => 100, :unit => 'm'
  field 88, 'uint16', 'undefined_value_88' # first seen on F3HR FW3.60
  field 90, 'sint8', 'performance_condition' # guessed
  field 100, 'sint32', 'undocumented_field_100'
  field 101, 'sint32', 'undocumented_field_101'
  field 107, 'enum', 'undocumented_field_107'
  field 116, 'uint16', 'undocumented_field_116'
  field 108, 'uint16', 'respiration_rate', :scale => 100, :unit => 'brpm' # guessed
  field 135, 'uint8', 'undocumented_field_135'
  field 136, 'uint8', 'undocumented_field_136'
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  message 21, 'event'
  field 0, 'enum', 'event', :dict => 'event'
  field 1, 'enum', 'event_type', :dict => 'event_type'
  field 2, 'uint16', 'data16'
  alt_field 3, 'event' do
    field :default, 'uint32', 'data'
    field 'timer', 'enum', 'timer_trigger', :dict => 'timer_trigger'
    field 'course_point', 'enum', 'message_index', :dict => 'message_index'
    field 'battery', 'uint16', 'battery_level', :scale => 1000, :unit => 'V'
    field 'hr_high_alert', 'uint8', 'hr_high_alert', :unit => 'bpm'
    field 'hr_low_alert', 'uint8', 'hr_low_alert', :unit => 'bpm'
    field 'speed_high_alert', 'uint16', 'speed_high_alert', :scale => 1000, :unit => 'm/s'
    field 'speed_low_alert', 'uint16', 'speed_low_alert', :scale => 1000, :unit => 'm/s'
    field 'cad_high_alert', 'uint16', 'cad_high_alert', :unit => 'bpm'
    field 'cad_low_alert', 'uint16', 'cad_low_alert', :unit => 'bpm'
    field 'power_high_alert', 'uint16', 'power_high_alert', :unit => 'watts'
    field 'power_low_alert', 'uint16', 'power_low_alert', :unit => 'watts'
    field 'time_duration_alert', 'uint32', 'time_duration_alert', :scale => 100, :unit => 's'
    field 'calorie_duration_alert', 'uint32', 'calorie_duration_alert', :unit  => 'calories'
    field 'fitness_equipment', 'enum', 'fitness_equipment_state', :dict => 'fitness_equipment_state'
    field 'rider_position', 'enum', 'rider_position', :dict => 'rider_position_type'
    field 'comm_timeout', 'uint16', 'comm_timeout', :dict => 'comm_timeout_type'
    field 'recovery_hr', 'uint32', 'recovery_hr', :unit => 'bpm'
    field 'recovery_time', 'uint32', 'recovery_time', :unit => 'min'
    field 'recovery_info', 'uint32', 'recovery_info', :unit => 'min'
    field 'vo2max', 'uint32', 'vo2max'
    field 'functional_threshold_power', 'uint32', 'functional_threshold_power', :unit => 'W'
    field 'lactate_threshold_heart_rate', 'uint32', 'lactate_threshold_heart_rate', :unit => 'bpm'
    field 'lactate_threshold_speed', 'uint32', 'lactate_threshold_speed', :scale => 1000, :unit => 'm/s'
  end
  field 4, 'uint8', 'event_group'
  field 14, 'enum', 'undocumented_field_14'
  field 15, 'uint32', 'undocumented_field_15'
  field 16, 'enum', 'undocumented_field_16'
  field 17, 'uint16', 'undocumented_field_17'
  field 18, 'uint16', 'undocumented_field_18'
  field 19, 'uint8', 'undocumented_field_19'
  field 20, 'uint8', 'undocumented_field_20'
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  # Possibly which device is used as metering source.
  # Not documented in FIT SDK, so the field names are all guesses right now.
  message 22, 'data_sources'
  field 0, 'uint8', 'speed'
  field 1, 'uint8', 'distance'
  field 2, 'uint8', 'cadence'
  field 3, 'uint8', 'elevation'
  field 4, 'uint8', 'heart_rate'
  field 5, 'enum', 'mode' # 0 or 3 seen, unknown meaning
  field 6, 'uint8', 'power' # First found in FR920XT
  field 7, 'uint8', 'undocumented_field_7'
  field 8, 'uint8', 'undocumented_field_8'
  field 9, 'uint8', 'undocumented_field_9'
  field 14, 'uint8', 'calories' # First found in FR920XT
  field 15, 'uint8', 'undocumented_field_15'
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  message 23, 'device_info'
  field 0, 'uint8', 'device_index'
  field 1, 'uint8', 'device_type', :dict => 'device_type'
  field 2, 'uint16', 'manufacturer', :dict => 'manufacturer'
  field 3, 'uint32z', 'serial_number'
  alt_field 4, 'manufacturer' do
    field :default, 'uint16', 'product'
    field [ 'garmin', 'dynastream', 'dynastream_oem' ], 'uint16', 'garmin_product', :dict => 'garmin_product'
  end
  field 5, 'uint16', 'software_version', :scale => 100
  field 6, 'uint8', 'hardware_version'
  field 7, 'uint32', 'cum_operating_time', :type => 'duration'
  field 8, 'uint32', 'undocumented_field_8'
  field 9, 'uint8', 'undocumented_field_9'
  field 10, 'uint16', 'battery_voltage', :scale => 256, :unit => 'V'
  field 11, 'uint8', 'battery_status', :dict => 'battery_status'
  field 13, 'uint16', 'undocumented_field_13'
  field 15, 'uint32', 'rx_packets_ok' # just a guess
  field 16, 'uint32', 'rx_packets_err' # just a guess
  field 17, 'string', 'undocumented_field_17'
  field 18, 'enum', 'sendor_position', :dict => 'body_location'
  field 20, 'uint8z', 'ant_transmission_type'
  field 21, 'uint16z', 'ant_device_number'
  field 22, 'enum', 'ant_network', :dict => 'ant_network'
  field 23, 'uint8', 'undocumented_field_23'
  field 24, 'uint32z', 'ant_id' # just a guess
  field 25, 'enum', 'source_type', :dict => 'source_type'
  field 29, 'uint8', 'undocumented_field_29'
  field 30, 'uint8', 'undocumented_field_30'
  field 31, 'uint32', 'undocumented_field_31'
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  # This message was first seen on the Fenix3HR with firmware 3.0.
  message 24, 'undocumented_24'
  # The Array contains 16 bytes. Bytes 2(lsb) and 3(msb) seem to be a
  # counter.
  field 2, 'byte', 'undocumented_field_2', :array => true

  message 26, 'workout'
  field 4, 'enum', 'sport', :dict => 'sport'
  field 5, 'uint32z', 'capabilities', :dict => 'workout_capabilities'
  field 6, 'uint16', 'num_valid_step'
  field 8, 'string', 'wkt_name'
  field 11, 'enum', 'sub_sport', :dict => 'sub_sport'
  field 14, 'uint16', 'pool_length', :scale => 100, :unit => 'm'
  field 15, 'enum', 'pool_length_unit'

  message 27, 'workout_step'
  field 0, 'string', 'wkt_step_name'
  field 1, 'enum', 'duration_type', :dict => 'wkt_step_duration'
  alt_field 2, 'duration_type' do
   field :default, 'uint32', 'duration_value'
   field 'distance', 'uint32', 'duration_distance', :scale => 100, :unit => 'm'
   field 'time', 'uint32', 'duration_time', :scale => 1000, :unit => 's'
   field 'repeat_until_steps_cmplt', 'uint32', 'duration_reps'
  end
  field 3, 'enum', 'target_type', :dict => 'wkt_step_target'
  alt_field 4, 'target_type' do
    field :default, 'uint32', 'target_value'
    field 'speed', 'uint32', 'target_speed_zone'
    field 'cadence', 'uint32', 'target_cadence_zone'
    field 'power', 'uint32', 'target_power_zone'
  end
  alt_field 5, 'target_type' do
    field :default, 'uint32', 'custom_target_value_low'
    field 'speed', 'uint32', 'custom_target_speed_low', :scale => 1000, :unit => 'm/s'
  end
  alt_field 6, 'target_type' do
    field :default, 'uint32', 'custom_target_value_high'
    field 'speed', 'uint32', 'custom_target_speed_high', :scale => 1000, :unit => 'm/s'
  end
  field 7, 'enum', 'intensity', :dict => 'intensity'
  field 8, 'string', 'notes'
  field 9, 'enum', 'equipment', :dict => 'workout_equipment'
  field 10, 'uint16', 'exercise_category'
  field 11, 'uint16', 'exercise_name'
  field 12, 'uint16', 'exercise_weight', :scale => 100, :unit => 'kg'
  field 13, 'uint16', 'weight_display_unit'
  field 254, 'uint16', 'message_index'

  # Message 29 is just a guess. It's not officially documented.
  # Found in LCTNS.FIT on Fenix 3
  message 29, 'location'
  field 0, 'string', 'name'
  field 1, 'sint32', 'position_lat', :type => 'coordinate'
  field 2, 'sint32', 'position_long', :type => 'coordinate'
  field 3, 'uint16', 'undocumented_field_3'
  field 4, 'uint16', 'altitude', :scale => 5, :offset => 500, :unit => 'm'
  field 5, 'uint16', 'undocumented_field_5'
  field 253, 'uint32', 'undocumented_field_253'
  field 254, 'uint16', 'location_index'

  message 33, 'totals'
  field 0, 'uint32', 'timer_time', :unit => 's'
  field 1, 'uint32', 'distance', :unit => 'm'
  field 2, 'uint32', 'calories', :unit => 'kcal'
  field 3, 'enum', 'sport', :dict => 'sport'
  field 4, 'uint32', 'elapsed_time', :unit => 's'
  field 5, 'uint16', 'sessions'
  field 6, 'uint32', 'active_time', :unit => 's'
  field 253, 'uint32', 'timestamp', :type => 'date_time'
  field 254, 'uint16', 'message_index'

  message 34, 'activity'
  field 0, 'uint32', 'total_timer_time', :type => 'duration',  :scale => 1000
  field 1, 'uint16', 'num_sessions'
  field 2, 'enum', 'type', :dict => 'activity'
  field 3, 'enum', 'event', :dict => 'event'
  field 4, 'enum', 'event_type', :dict => 'event_type'
  field 5, 'uint32', 'local_timestamp', :type => 'date_time'
  field 6, 'uint8', 'event_group'
  field 7, 'uint8', 'undocumented_field_7'
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  message 35, 'software'
  field 3, 'uint16', 'version', :scale => 100
  field 5, 'string', 'part_number'

  message 49, 'file_creator'
  field 0, 'uint16', 'software_version'
  field 1, 'uint8', 'hardware_version'
  field 2, 'string', 'undocumented_field_2'
  field 254, 'uint16', 'message_index', :dict => 'message_index'

  message 55, 'monitoring'
  field 0, 'enum', 'device_index'
  field 1, 'uint16', 'calories', :unit => 'kcal'
  field 2, 'uint32', 'distance', :scale => 100, :unit => 'm'
  field 5, 'enum', 'activity_type', :dict => 'activity_type'
  alt_field 3, 'activity_type' do
    field :default, 'uint32', 'cycles', :scale => 2, :unit => 'cycles'
    field [ 'walking', 'running' ], 'uint32', 'steps', :unit => 'steps'
    field [ 'cycling', 'swimming' ], 'uint32', 'strokes', :scale => 2, :unit => 'strokes'
  end
  field 4, 'uint32', 'active_time', :scale => 1000, :unit => 's'
  field 6, 'enum', 'activity_sub_type'
  field 7, 'enum', 'activity_level'
  field 8, 'uint16', 'distance_16', :scale => 0.1, :unit => 'km'
  field 9, 'uint16', 'cycles_16', :scale => 0.5, :unit => 'cycles'
  field 10, 'uint16', 'active_time_16', :unit => 's'
  field 11, 'uint16', 'local_timestamp'
  field 19, 'uint16', 'active_calories', :unit => 'kcal'
  field 24, 'byte', 'current_activity_type_intensity', :type => 'activity_intensity'
  field 26, 'uint16', 'timestamp_16', :unit => 's'
  field 27, 'uint8', 'heart_rate', :unit => 'bpm'
  field 29, 'uint16', 'duration_min', :unit => 'min'
  field 30, 'uint32', 'duration', :unit => 's'
  field 31, 'uint32', 'ascent', :scale => 1000, :unit => 'm'
  field 32, 'uint32', 'descent', :scale => 1000, :unit => 'm'
  field 33, 'uint16', 'moderate_activity_minutes', :unit => 'minutes'
  field 34, 'uint16', 'vigorous_activity_minutes', :unit => 'minutes'
  field 35, 'uint32', 'floors_climbed', :scale => 1000, :unit => 'm' # just a guess, around 3.048m (10ft) per floor
  field 36, 'uint32', 'floors_descended', :scale => 1000, :unit => 'm' # just a guess
  field 37, 'uint16', 'weekly_moderate_activity_minutes', :unit => 'minutes' # just a guess
  field 38, 'uint16', 'weekly_vigorous_activity_minutes', :unit => 'minutes' # just a guess
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  message 72, 'training_file'
  field 0, 'enum', 'type'
  field 1, 'uint16', 'manufacturer', :dict => 'manufacturer'
  alt_field 2, 'manufacturer' do
    field :default, 'uint16', 'product'
    field 'garmin', 'uint16', 'garmin_product', :dict => 'garmin_product'
  end
  field 3, 'uint32z', 'serial_number'
  field 4, 'uint32', 'time_created', :type => 'date_time'
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  message 78, 'hrv'
  field 0, 'uint16', 'time', :array => true, :scale => 1000, :unit => 's'

  # Not part of the official ANT SDK doc
  message 79, 'user_data'
  field 0, 'uint16', 'metmax', :scale => 1024, :unit => 'MET' # VO2max / 3.5
  field 1, 'uint8', 'age', :unit => 'years'
  field 2, 'uint8', 'height', :scale => 100, :unit => 'm'
  field 3, 'uint16', 'weight', :scale => 10, :unit => 'kg'
  field 4, 'enum', 'gender', :dict => 'gender'
  field 5, 'enum', 'activity_class', :scale => 10
  field 6, 'uint8', 'max_hr', :unit => 'bpm'
  field 7, 'sint8', 'undocumented_field_7' # seems to be always 1
  field 8, 'uint16', 'recovery_time', :scale => 60, :unit => 'hours'
  field 9, 'uint16', 'undocumented_field_9' # maybe activity measurement
  field 10, 'uint8', 'avg_resting_heart_rate', :unit => 'bpm'
  field 11, 'uint16', 'running_lactate_threshold_heart_rate', :unit => 'bpm'
  field 12, 'uint16', 'functional_threshold_power', :unit => 'W'
  field 13, 'uint16', 'functional_threshold_speed', :scale => 36, :unit => 'm/s'
  field 14, 'uint8', 'undocumented_field_14'
  field 15, 'uint8', 'undocumented_field_15'
  field 16, 'uint32', 'undocumented_field_16'
  field 17, 'sint32', 'undocumented_field_17'
  field 18, 'sint32', 'undocumented_field_18'
  field 19, 'sint32', 'undocumented_field_19'
  field 20, 'uint16', 'undocumented_field_20'
  field 21, 'sint32', 'undocumented_field_21'
  field 22, 'sint32', 'undocumented_field_22'
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  message 101, 'length'
  field 0, 'enum', 'event', :dict => 'event'
  field 1, 'enum', 'event_type', :dict => 'event_type'
  field 2, 'uint32', 'start_time', :type => 'date_time'
  field 3, 'uint32', 'total_elapsed_time', :scale => 1000, :unit => 's'
  field 4, 'uint32', 'total_timer_time', :scale => 1000, :unit => 's'
  field 5, 'uint16', 'total_strokes', :unit => 'strokes'
  field 6, 'uint16', 'avg_speed', :scale => 1000, :unit => 'm/s'
  field 7, 'enum', 'swim_stroke', :dict => 'swim_stroke'
  field 9, 'uint8', 'avg_swimming_cadence', :unit => 'strokes/min'
  field 10, 'uint8', 'event_group'
  field 11, 'uint16', 'total_calories', :unit => 'kcal'
  field 12, 'enum', 'length_type', :dict => 'length_type'
  field 18, 'uint16', 'player_score'
  field 19, 'uint16', 'opponent_score'
  field 20, 'uint16', 'stroke_count', :unit => 'counts'
  field 21, 'uint16', 'zone_count', :unit => 'counts'
  field 253, 'uint32', 'timestamp', :type => 'date_time'
  field 254, 'uint16', 'message_index'

  message 103, 'monitoring_info'
  field 0, 'uint32', 'local_time', :type => 'date_time'
  field 1, 'enum', 'activity_type', :array => true, :dict => 'activity_type'
  field 3, 'uint16', 'cycles_to_distance', :array => true, :scale => 5000, :unit => 'm/cycle'
  field 4, 'uint16', 'cycles_to_calories', :array => true, :scale => 5000, :unit => 'kcal/cycle'
  field 5, 'uint16', 'resting_metabolic_rate', :unit => 'kcal/day'
  # Just a guess, not officially documented
  field 7, 'uint32', 'goal_cycles', :array => true
  # Showed up in Fenix3HR firmware 3.84. Haven't seen a value yet.
  field 8, 'enum', 'undocumented_field_8', :array => true
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  # Not part of the official ANT SDK doc
  message 104, 'battery'
  field 0, 'uint16', 'unit_voltage', :unit => 'V', :scale => 1000
  field 1, 'sint16', 'undocumented_field_1'
  field 2, 'uint8', 'percent', :unit => '%'
  field 3, 'sint8', 'current', :unit => 'mA' # just a wild guess
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  # Not part of the official ANT SDK doc
  message 113, 'personal_records'
  field 0, 'uint16', 'longest_distance'
  field 1, 'enum', 'sport', :dict => 'sport'
  field 2, 'uint32', 'distance', :scale => 100, :unit => 'm'
  # If longest_distance is 1, field 3 is the distance, not a duration!
  field 3, 'uint32', 'duration', :scale => 1000, :type => 'duration'
  field 4, 'uint32', 'start_time', :type => 'date_time'
  field 5, 'enum', 'new_record'
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  # Not part of the official ANT SDK doc
  # It shows up in swimming activities.
  message 125, 'undocumented_125'
  field 1, 'uint8', 'undocumented_field_1', :array => true
  field 2, 'uint16', 'undocumented_field_2', :array => true
  field 3, 'uint16', 'undocumented_field_3'
  field 4, 'uint8', 'undocumented_field_4'
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  # Not part of the official ANT SDK doc
  # All known fields so far seem to be physiological values. We'll use the
  # name physiological_metrics for now.
  message 140, 'physiological_metrics'
  field 0, 'uint8', 'min_heart_rate', :unit => 'bpm'
  field 1, 'uint8', 'max_heart_rate', :unit => 'bpm'
  field 2, 'sint32', 'undocumented_field_2'
  field 3, 'sint32', 'undocumented_field_3'
  field 4, 'uint8', 'aerobic_training_effect', :scale => 10
  field 5, 'sint32', 'undocumented_field_5'
  field 6, 'sint32', 'undocumented_field_6'
  field 7, 'sint32', 'metmax', :scale => 65536, :unit => 'MET'
  # Field 8 used to be uint8 but recent devices use sint8. We model this
  # with an alt_field. The switch field is randomly picked as we have no
  # details why the type has been changed.
  alt_field 8, 'max_heart_rate' do
    field :default, 'sint8', 'undocumented_field_8s'
    field 255, 'uint8', 'undocumented_field_8u'
  end
  field 9, 'uint16', 'recovery_time', :scale => 60, :unit => 'hours'
  field 10, 'uint16', 'undocumented_field_10'
  field 11, 'enum', 'undocumented_field_11'
  field 12, 'enum', 'undocumented_field_12'
  field 13, 'uint8', 'undocumented_field_13'
  field 14, 'uint16', 'running_lactate_threshold_heart_rate', :unit => 'bpm'
  field 15, 'uint16', 'undocumented_field_15'
  field 16, 'uint16', 'running_lactate_threshold_speed', :scale => 36, :unit => 'm/s'
  field 17, 'sint8', 'performance_condition'
  field 18, 'uint8', 'undocumented_field_18'
  field 19, 'uint8', 'undocumented_field_19'
  field 20, 'uint8', 'anaerobic_training_effect', :scale => 10
  field 21, 'sint32', 'undocumented_field_21'
  field 22, 'uint8', 'undocumented_field_22'
  field 23, 'uint8', 'undocumented_field_23'
  field 24, 'sint32', 'undocumented_field_24'
  field 25, 'uint8', 'undocumented_field_25'
  field 26, 'sint32', 'undocumented_field_26'
  field 27, 'sint32', 'undocumented_field_27'
  field 28, 'sint32', 'undocumented_field_28'
  field 29, 'sint32', 'metmax_running', :scale => 65536, :unit => 'MET'
  field 30, 'sint8', 'undocumented_field_30'
  field 31, 'sint8', 'undocumented_field_31'
  field 32, 'sint32', 'undocumented_field_32'
  field 33, 'uint8', 'undocumented_field_33'
  field 34, 'enum', 'undocumented_field_34'
  field 35, 'uint32', 'undocumented_field_35'
  field 36, 'uint32', 'undocumented_field_36'
  field 37, 'sint32', 'undocumented_field_37'
  field 38, 'sint32', 'undocumented_field_38'
  field 39, 'sint32', 'undocumented_field_39'
  field 40, 'sint32', 'undocumented_field_40'
  field 41, 'enum', 'undocumented_field_41'
  field 42, 'uint8', 'undocumented_field_42'
  field 43, 'sint16', 'undocumented_field_43'
  field 44, 'sint16', 'undocumented_field_44'
  field 45, 'sint16', 'undocumented_field_45'
  field 46, 'uint8', 'undocumented_field_46'
  field 48, 'uint32', 'undocumented_field_48'
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  # Not part of the official ANT SDK doc. The message name is guessed and
  # may change in the future.
  message 141, 'epo_data'
  field 0, 'enum', 'valid' # 0 if no data cached, 1 else
  field 1, 'uint32', 'interval_start', :type => 'date_time'
  field 2, 'uint32', 'interval_end', :type => 'date_time'
  field 3, 'uint32', 'undocumented_field_3'
  field 4, 'sint32', 'undocumented_field_4'
  field 5, 'sint32', 'undocumented_field_5'
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  # Not part of the official ANT SDK doc.
  message 147, 'sensor_settings'
  field 0, 'uint32z', 'ant_id'
  field 1, 'uint8', 'undocumented_field_1'
  field 2, 'string', 'name'
  field 3, 'enum', 'undocumented_field_3'
  field 4, 'enum', 'undocumented_field_4'
  field 5, 'enum', 'undocumented_field_5'
  field 6, 'enum', 'undocumented_field_6'
  field 7, 'enum', 'undocumented_field_7'
  field 8, 'enum', 'undocumented_field_8'
  field 9, 'uint8', 'undocumented_field_9'
  field 10, 'uint16', 'undocumented_field_10'
  field 11, 'uint16', 'calibration_factor', :scale => 10
  field 12, 'uint8', 'undocumented_field_12'
  field 13, 'uint32', 'undocumented_field_13'
  field 14, 'uint8', 'undocumented_field_14'
  field 15, 'uint8', 'undocumented_field_15'
  field 16, 'uint8', 'undocumented_field_16'
  field 17, 'uint8z', 'undocumented_field_17'
  field 18, 'uint8z', 'undocumented_field_18'
  field 19, 'uint8z', 'undocumented_field_19'
  field 20, 'uint8z', 'undocumented_field_20'
  field 21, 'uint16', 'wheel_size', :unit => 'mm'
  field 25, 'uint16', 'undocumented_field_25'
  field 26, 'uint16', 'undocumented_field_26'
  field 27, 'uint8', 'undocumented_field_27'
  field 28, 'uint8', 'undocumented_field_28'
  field 29, 'uint8', 'undocumented_field_29'
  field 30, 'uint8', 'undocumented_field_30'
  field 24, 'enum', 'undocumented_field_24'
  field 31, 'uint8', 'undocumented_field_31'
  field 32, 'uint16', 'undocumented_field_32'
  field 33, 'uint16', 'undocumented_field_33'
  field 34, 'uint16', 'undocumented_field_34'
  field 35, 'uint16', 'undocumented_field_35'
  field 36, 'enum', 'undocumented_field_36'
  field 37, 'enum', 'undocumented_field_37'
  field 38, 'enum', 'undocumented_field_38'
  field 39, 'enum', 'undocumented_field_39'
  field 40, 'uint16z', 'undocumented_field_40'
  field 41, 'uint8', 'undocumented_field_41'
  field 42, 'enum', 'undocumented_field_42'
  field 43, 'enum', 'undocumented_field_43'
  field 44, 'uint8z', 'undocumented_field_44'
  field 45, 'enum', 'undocumented_field_45'
  field 46, 'enum', 'undocumented_field_46'
  field 47, 'enum', 'undocumented_field_47'
  field 48, 'enum', 'undocumented_field_48'
  field 50, 'uint8', 'undocumented_field_50'
  field 51, 'enum', 'undocumented_field_51'
  # The type of this field changed from 'uint8' to 'enum' in more recent
  # devices. No idea why and what the proper selection field should be.
  alt_field 52, 'undocumented_field_51' do
    field :default, 'uint8', 'undocumented_field_52_0'
    field 0, 'enum', 'undocumented_field_52_1'
  end
  field 53, 'uint8', 'undocumented_field_53'
  field 54, 'enum', 'undocumented_field_54'
  field 55, 'uint16', 'undocumented_field_55'
  field 56, 'uint16', 'undocumented_field_56'
  field 57, 'uint16', 'undocumented_field_57'
  field 58, 'enum', 'undocumented_field_58'
  field 59, 'uint8', 'undocumented_field_59'
  field 60, 'enum', 'undocumented_field_60'
  field 61, 'enum', 'undocumented_field_61'
  field 62, 'uint8', 'undocumented_field_62'
  field 63, 'enum', 'undocumented_field_63'
  field 64, 'uint32', 'undocumented_field_64'
  field 65, 'uint32', 'undocumented_field_65'
  field 70, 'uint32', 'undocumented_field_70'
  field 71, 'enum', 'undocumented_field_71'
  field 73, 'uint16z', 'undocumented_field_73'
  field 254, 'uint16', 'message_index'

  message 160, 'gps_metadata'
  field 0, 'uint16', 'timestamp_ms'
  field 1, 'sint32', 'position_lat'
  field 2, 'sint32', 'position_long'
  field 3, 'uint32', 'enhanced_altitude', :scale => 5, :offset => 500, :unit => 'm'
  field 4, 'uint32', 'enhanced_speed', :unit => 'm/s', :scale => 1000
  field 5, 'uint16', 'heading', :unit => 'degrees', :scale => 100
  field 6, 'uint32', 'utc_timestamp', :type => 'date_time'
  field 7, 'sint16', 'velocity', :array => true, :scale => 100, :unit => 'm/s'
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  message 188, 'ohr_settings'
  field 0, 'enum', 'switch'
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  message 206, 'field_description'
  field 0, 'uint8', 'developer_data_index'
  field 1, 'uint8', 'field_definition_number'
  field 2, 'uint8', 'fit_base_type_id'
  field 3, 'string', 'field_name', :array => true
  field 4, 'uint8', 'array'
  field 5, 'string', 'components'
  field 6, 'uint8', 'scale'
  field 7, 'sint8', 'offset'
  field 8, 'string', 'units', :array => true
  field 9, 'string', 'bits'
  field 10, 'string', 'accumulate'
  field 13, 'uint16', 'fit_base_unit_id'
  field 14, 'uint16', 'native_mesg_num'
  field 15, 'uint8', 'native_field_num'

  message 207, 'developer_data_id'
  field 0, 'byte', 'developer_id', :array => true
  field 1, 'byte', 'application_id', :array => true
  field 2, 'uint16', 'manufacturer_id'
  field 3, 'uint8', 'developer_data_index'
  field 4, 'uint32', 'application_version'

  # Not part of the official ANT SDK doc.
  message 211, 'undocumented_211'
  field 0, 'uint8', 'undocumented_field_0'
  field 1, 'uint8', 'undocumented_field_1'
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  # Not part of the official ANT SDK doc.
  message 216, 'heart_rate_zones'
  field 0, 'uint16', 'type' # 19 for laps, 18 for sessions
  field 1, 'uint16', 'lap_index'
  field 2, 'uint32', 'time_in_hr_zone', :array => true, :scale => 1000, :unit => 's'
  field 5, 'uint32', 'undocumented_field_5'
  field 6, 'uint8', 'heart_rate_zones', :array => true, :unit => 'bpm'
  field 9, 'uint16', 'undocumented_field_9'
  field 10, 'enum', 'undocumented_field_10'
  field 11, 'uint8', 'max_heart_rate', :unit => 'bpm'
  field 12, 'uint8', 'resting_heart_rate', :unit => 'bpm'
  field 13, 'uint8', 'lactate_threshold_heart_rate', :unit => 'bpm'
  field 14, 'enum', 'undocumented_field_14'
  field 15, 'uint16', 'undocumented_field_15'
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  message 227, 'stress_level'
  field 0, 'sint16', 'stress_level_value'
  field 1, 'uint32', 'stress_level_time', :type => 'date_time'
  field 2, 'sint8', 'undocumented_field_2'

  # Not part of the official ANT SDK doc.
  message 229, 'undocumented_229'
  field 0, 'uint32', 'time', :type => 'date_time'
  field 1, 'sint32', 'metmax', :scale => 65536, :unit => 'MET'
  field 2, 'uint16', 'vo2max', :scale => 10, :unit => 'ml/kg/min'
  field 3, 'sint8', 'undocumented_field_3'
  field 4, 'sint8', 'undocumented_field_4'
  field 5, 'enum', 'undocumented_field_5'
  field 6, 'enum', 'undocumented_field_6'
  field 7, 'enum', 'undocumented_field_7'
  field 8, 'enum', 'undocumented_field_8'
  field 9, 'enum', 'undocumented_field_9'

  # Not part of the official ANT SDK doc.
  message 232, 'training_status'
  field 0, 'enum', 'undocumented_0'
  field 1, 'enum', 'undocumented_1'
  field 2, 'enum', 'current_status', :dict => 'training_status'
  field 3, 'enum', 'fitness', :dict => 'training_status_trend'
  field 4, 'enum', 'load', :dict => 'training_status_trend'
  field 5, 'uint16', 'training_load'
  field 6, 'uint16', 'low_training_load'
  field 7, 'uint16', 'high_training_load'
  field 8, 'uint16', 'max_training_load'
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  # Not part of the official ANT SDK doc.
  message 233, 'undocumented_233'
  field 2, 'byte', 'undocumented_field_2'

  # Not part of the official ANT SDK doc.
  message 241, 'metrics'
  field 0, 'uint32', 'localtime', :type => 'date_time'
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  # Not part of the official ANT SDK doc.
  message 243, 'media_player_info'
  field 0, 'uint32', 'undocumented_field_0'
  field 1, 'uint16', 'undocumented_field_1'
  field 2, 'string', 'track_1'
  field 3, 'string', 'track_2'
  field 4, 'string', 'track_3'
  field 5, 'uint16', 'undocumented_field_5'
  field 6, 'uint16', 'undocumented_field_6'

  # Not part of the official ANT SDK doc.
  message 244, 'undocumented_244'
  field 0, 'uint32', 'undocumented_field_0'
  field 1, 'enum', 'undocumented_field_1'
  field 2, 'uint16', 'undocumented_field_2'

  # Not part of the official ANT SDK doc.
  message 269, 'undocumented_269'
  field 0, 'uint8', 'undocumented_field_0'
  field 1, 'uint8', 'undocumented_field_1'
  field 2, 'uint8', 'undocumented_field_2'
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  # Not part of the official ANT SDK doc.
  message 261, 'undocumented_261'
  field 0, 'enum', 'undocumented_field_0'
  field 1, 'sint32', 'undocumented_field_1'
  field 2, 'sint32', 'undocumented_field_2'
  field 3, 'uint32', 'undocumented_field_3'
  field 7, 'uint8', 'undocumented_field_7'
  field 8, 'uint8', 'undocumented_field_8'
  field 9, 'uint8', 'undocumented_field_9'
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  # Not part of the official ANT SDK doc.
  message 279, 'undocumented_279'
  field 0, 'uint32', 'undocumented_field_0'
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  # Not part of the official ANT SDK doc.
  message 284, 'training_load'
  field 0, 'uint16', 'load'
  field 1, 'uint32', 'timestamp', :type => 'date_time'

  # Not part of the official ANT SDK doc.
  message 288, 'undocumented_288'
  field 0, 'sint8', 'undocumented_field_0'
  field 1, 'sint8', 'undocumented_field_1'
  field 2, 'uint16', 'undocumented_field_2'
  field 251, 'byte', 'undocumented_field_251'
  field 252, 'uint8', 'undocumented_field_252'
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  # Not part of the official ANT SDK doc.
  message 312, 'undocumented_312'
  field 0, 'enum', 'undocumented_field_0'
  field 9, 'uint32', 'interval_start', :type => 'date_time'
  field 15, 'uint8', 'min_heart_rate', :unit => 'bpm'
  field 16, 'uint8', 'max_heart_rate', :unit => 'bpm'
  field 21, 'sint32', 'position_lat', :type => 'coordinate'
  field 22, 'sint32', 'position_long', :type => 'coordinate'
  field 27, 'uint32', 'interval_end', :type => 'date_time'
  field 32, 'sint8', 'avg_temperature', :unit => 'C'
  field 33, 'sint8', 'max_temperature', :unit => 'C'
  field 34, 'sint8', 'min_temperature', :unit => 'C'
  field 37, 'uint16', 'undocumented_field_37'
  field 38, 'uint16', 'undocumented_field_38'
  field 39, 'uint16', 'undocumented_field_39'
  field 253, 'uint32', 'timestamp', :type => 'date_time'
  field 254, 'uint16', 'message_index'

  # Not part of the official ANT SDK doc.
  message 325, 'undocumented_325'
  field 0, 'uint8', 'undocumented_field_0'
  field 1, 'uint8', 'undocumented_field_1'
  field 2, 'uint8', 'undocumented_field_2'
  field 3, 'uint8', 'undocumented_field_3'
  field 4, 'uint8', 'undocumented_field_4'
  field 5, 'uint8', 'undocumented_field_5'
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  # Not part of the official ANT SDK doc.
  message 326, 'undocumented_326'
  field 0, 'uint32', 'undocumented_field_0'
  field 1, 'uint32', 'undocumented_field_1'
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  # Not part of the official ANT SDK doc.
  message 327, 'undocumented_327'
  field 0, 'uint8', 'undocumented_field_0'
  field 1, 'uint8', 'undocumented_field_1'
  field 2, 'uint8', 'undocumented_field_2'
  field 3, 'uint32', 'undocumented_field_3'
  field 4, 'uint32', 'undocumented_field_4'
  field 5, 'uint32', 'undocumented_field_5'
  field 6, 'enum', 'undocumented_field_6'
  field 251, 'byte', 'undocumented_field_251'
  field 252, 'uint8', 'undocumented_field_252'
  field 253, 'uint32', 'timestamp', :type => 'date_time'

  # Not part of the official ANT SDK doc.
  message 1024, 'undocumented_1024'
  field 0, 'enum', 'undocumented_field_0'
  field 2, 'enum', 'undocumented_field_2'
  field 15, 'uint16', 'undocumented_field_15'
  field 40, 'enum', 'undocumented_field_40'
  field 44, 'enum', 'undocumented_field_44'
  field 247, 'enum', 'undocumented_field_247'
  field 255, 'enum', 'undocumented_field_255'

end
GlobalFitDictionaries =
GlobalFitDictList.new do

  dict 'activity'
  entry 0, 'manual'
  entry 1, 'auto_multi_sport'

  dict 'activity_type'
  entry 0, 'generic'
  entry 1, 'running'
  entry 2, 'cycling'
  entry 3, 'transition'
  entry 4, 'fitness_equipment'
  entry 5, 'swimming'
  entry 6, 'walking'
  entry 8, 'sedentary'
  entry 254, 'all'

  dict 'activity_level'
  entry 0, 'low'
  entry 1, 'medium'
  entry 2, 'high'

  dict 'activity_subtype'
  entry 0, 'generic'
  entry 1, 'treadmill'
  entry 2, 'street'
  entry 3, 'trail'
  entry 4, 'track'
  entry 5, 'spin'
  entry 6, 'indoor_cycling'
  entry 7, 'road'
  entry 8, 'mountain'
  entry 9, 'downhill'
  entry 10, 'recumbent'
  entry 11, 'cyclocross'
  entry 12, 'hand_cycling'
  entry 13, 'track_cycling'
  entry 14, 'indoor_rowing'
  entry 15, 'elliptical'
  entry 16, 'stair_climbing'
  entry 17, 'lap_swimming'
  entry 18, 'open_water'
  entry 19, 'flexibility_training'
  entry 20, 'strength_training'
  entry 21, 'warm_up'
  entry 22, 'match'
  entry 23, 'exercise'
  entry 24, 'challenge'
  entry 25, 'indoor_skiing'
  entry 26, 'cardio_training'
  entry 27, 'indoor_walking'
  entry 28, 'e_bike_fitness'
  entry 29, 'bmx'
  entry 30, 'casual_walking'
  entry 31, 'speed_walking'
  entry 32, 'bike_to_run_transition'
  entry 33, 'run_to_bike_transition'
  entry 34, 'swim_to_bike_transition'
  entry 35, 'atv'
  entry 36, 'motocross'
  entry 37, 'backcountry'
  entry 38, 'resort'
  entry 39, 'rc_drone'
  entry 40, 'wingsuit'
  entry 41, 'whitewater'
  entry 42, 'skate_skiing'
  entry 43, 'yoga'
  entry 44, 'pilates'
  entry 45, 'indoor_running'
  entry 46, 'gravel_cycling'
  entry 47, 'e_bike_mountain'
  entry 48, 'commuting'
  entry 49, 'mixed_surface'
  entry 50, 'navigate'
  entry 51, 'track_me'
  entry 52, 'map'
  entry 53, 'single_gas_diving'
  entry 54, 'multi_gas_diving'
  entry 55, 'gauge_diving'
  entry 56, 'apnea_diving'
  entry 57, 'apnea_hunting'
  entry 58, 'virtual_activity'
  entry 59, 'obstacle'
  entry 62, 'breathing'
  entry 65, 'sail_race'
  entry 67, 'ultra'
  entry 68, 'indoor_climbing'
  entry 69, 'bouldering'
  entry 254, 'all'

  dict 'ant_network'
  entry 0, 'public'
  entry 1, 'antplus'
  entry 2, 'antfs'
  entry 3, 'private'

  dict 'backlight_mode'
  entry 0, 'off'
  entry 1, 'manual'
  entry 2, 'key_and_messages'
  entry 3, 'auto_brightness'
  entry 4, 'smart_notifications'
  entry 5, 'key_and_messages_night'
  entry 6, 'key_and_messages_and_smart_notifications'

  dict 'battery_status'
  entry 1, 'new'
  entry 2, 'good'
  entry 3, 'ok'
  entry 4, 'low'
  entry 5, 'critical'

  dict 'date_mode'
  entry 0, 'day_month'
  entry 1, 'month_day'

  dict 'body_location'
  entry 0, 'left_leg'
  entry 1, 'left_calf'
  entry 2, 'left_shin'
  entry 3, 'left_hamstring'
  entry 4, 'left_quad'
  entry 5, 'left_glute'
  entry 6, 'right_leg'
  entry 7, 'right_calf'
  entry 8, 'right_shin'
  entry 9, 'right_hamstring'
  entry 10, 'right_quad'
  entry 11, 'right_glute'
  entry 12, 'torso_back'
  entry 13, 'left_lower_back'
  entry 14, 'left_upper_back'
  entry 15, 'right_lower_back'
  entry 16, 'right_upper_back'
  entry 17, 'torso_front'
  entry 18, 'left_abdomen'
  entry 19, 'left_chest'
  entry 20, 'right_abdomen'
  entry 21, 'right_chest'
  entry 22, 'left_arm'
  entry 23, 'left_shoulder'
  entry 24, 'left_bicep'
  entry 25, 'left_tricep'
  entry 26, 'left_brachioradialis'
  entry 27, 'left_forearm_extensors'
  entry 28, 'right_arm'
  entry 29, 'right_shoulder'
  entry 30, 'right_bicep'
  entry 31, 'right_tricep'
  entry 32, 'right_brachioradialis'
  entry 33, 'right_forearm_extensors'
  entry 34, 'neck'
  entry 35, 'throat'
  entry 36, 'waist_mid_back'
  entry 37, 'waist_front'
  entry 38, 'waist_left'
  entry 39, 'waist_right'

  dict 'comm_timeout_type'
  entry 0, 'wildcard_paring_timeout'
  entry 1, 'pairing_timeout'
  entry 2, 'connection_lost'
  entry 3, 'connection_timeout'

  dict 'device_type'
  entry 0, 'gps' # Just a guess
  entry 3, 'acceleration' # Just a guess
  entry 4, 'barometric_pressure' # Just a guess
  entry 1, 'antfs'
  entry 10, 'optical_heart_rate' # Just a guess
  entry 11, 'bike_power'
  entry 12, 'environment_sensor_legacy'
  entry 13, 'multi_sport_speed_distance'
  entry 14, 'control'
  entry 17, 'fitness_equipment'
  entry 18, 'blood_pressure'
  entry 19, 'geocache_node'
  entry 20, 'light_electric_vehicle'
  entry 25, 'env_sensor'
  entry 26, 'racquet'
  entry 30, 'running_dynamics' # Just a guess
  entry 119, 'weight_scale'
  entry 120, 'heart_rate'
  entry 121, 'bike_speed_cadence'
  entry 122, 'bike_cadence'
  entry 123, 'bike_speed'
  entry 124, 'stride_speed_distance'

  dict 'display_heart'
  entry 0, 'bpm'
  entry 1, 'max'
  entry 2, 'reserve'

  dict 'display_measure'
  entry 0, 'metric'
  entry 1, 'statute'
  entry 2, 'nautical'

  dict 'display_position'
  entry 0, 'degree'
  entry 1, 'degree_minute'
  entry 2, 'degree_minute_second'
  entry 3, 'austrian_grid'
  entry 4, 'british_grid'
  entry 5, 'dutch_grid'
  entry 6, 'hungarian_grid'
  entry 7, 'finnish_grid'
  entry 8, 'german_grid'
  entry 9, 'icelandic_grid'
  entry 10, 'indonesian_equatorial'
  entry 11, 'indonesian_irian'
  entry 12, 'indonesian_southern'
  entry 13, 'india_zone_0'
  entry 14, 'india_zone_IA'
  entry 15, 'india_zone_IB'
  entry 16, 'india_zone_IIA'
  entry 17, 'india_zone_IIB'
  entry 18, 'india_zone_IIIA'
  entry 19, 'india_zone_IIIB'
  entry 20, 'india_zone_IVA'
  entry 21, 'india_zone_IVB'
  entry 22, 'irish_transverse'
  entry 23, 'irish_grid'
  entry 24, 'loran'
  entry 25, 'maidenhead_grid'
  entry 26, 'mgrs_grid'
  entry 27, 'new_zealand_grid'
  entry 28, 'new_zealand_transverse'
  entry 29, 'qatar_grid'
  entry 30, 'modified_swedish_grid'
  entry 31, 'swedish_grid'
  entry 32, 'south_african_grid'
  entry 33, 'swiss_grid'
  entry 34, 'taiwan_grid'
  entry 35, 'united_states_grid'
  entry 36, 'utm_ups_grid'
  entry 37, 'west_malayan'
  entry 38, 'borneo_rso'
  entry 39, 'estonian_grid'
  entry 40, 'latvian_grid'
  entry 41, 'swedish_ref_99_grid'

  dict 'display_power'
  entry 0, 'watts'
  entry 1, 'percent_ftp'

  dict 'event'
  entry 0, 'timer'
  entry 3, 'workout'
  entry 4, 'workout_step'
  entry 5, 'power_down'
  entry 6, 'power_up'
  entry 7, 'off_course'
  entry 8, 'session'
  entry 9, 'lap'
  entry 10, 'course_point'
  entry 11, 'battery'
  entry 12, 'virtual_partner_pace'
  entry 13, 'hr_high_alert'
  entry 14, 'hr_low_alert'
  entry 15, 'speed_high_alert'
  entry 16, 'speed_low_alert'
  entry 17, 'cad_high_alert'
  entry 18, 'cad_low_alert'
  entry 19, 'power_high_alert'
  entry 20, 'power_low_alert'
  entry 21, 'recovery_hr'
  entry 22, 'battery_low'
  entry 23, 'time_duration_alert'
  entry 24, 'distance_duration_alert'
  entry 25, 'calorie_duration_alert'
  entry 26, 'activity'
  entry 27, 'fitness_equipment'
  entry 28, 'length'
  entry 32, 'user_marker'
  entry 33, 'sport_point'
  entry 36, 'calibration'
  entry 37, 'vo2max' # guess
  entry 38, 'recovery_time' # guess (in minutes)
  entry 39, 'recovery_info' # guess (in minutes, < 24 good, > 24h poor)
  entry 42, 'front_gear_change'
  entry 43, 'rear_gear_change'
  entry 44, 'rider_position_change'
  entry 45, 'elev_high_alert'
  entry 46, 'elev_low_alert'
  entry 47, 'comm_timeout'
  entry 48, 'functional_threshold_power' # guess (in Watt)
  entry 49, 'lactate_threshold_heart_rate' # guess (in BPM)
  entry 50, 'lactate_threshold_speed' # guess (in m/s)

  dict 'event_type'
  entry 0, 'start_time'
  entry 1, 'stop'
  entry 2, 'consecutive_depreciated'
  entry 3, 'marker'
  entry 4, 'stop_all'
  entry 5, 'begin_depreciated'
  entry 6, 'end_depreciated'
  entry 7, 'end_all_depreciated'
  entry 8, 'stop_disable'
  entry 9, 'stop_disable_all'

  dict 'file'
  entry 1, 'device'
  entry 2, 'settings'
  entry 3, 'sport'
  entry 4, 'activity'
  entry 5, 'workout'
  entry 6, 'course_point'
  entry 7, 'schedules'
  entry 9, 'weight_scale'
  entry 10, 'totals'
  entry 11, 'goals'
  entry 14, 'blood_pressure'
  entry 15, 'monitoring_a'
  entry 20, 'activity_summary'
  entry 28, 'monitoring_daily'
  entry 32, 'monitoring_b'
  entry 34, 'segment'
  entry 35, 'segment_list'
  entry 40, 'exd_configuration'
  entry 44, 'metrics'

  dict 'fitness_equipment_state'
  entry 0, 'ready'
  entry 1, 'in_use'
  entry 2, 'paused'
  entry 3, 'unknown'

  dict 'fit_base_type'
  entry 0, 'enum'
  entry 1, 'sint8'
  entry 2, 'uint8'
  entry 7, 'string'
  entry 10, 'uint8z'
  entry 13, 'byte'
  entry 131, 'sint16'
  entry 132, 'uint16'
  entry 133, 'sint32'
  entry 134, 'uint32'
  entry 136, 'float32'
  entry 137, 'float64'
  entry 139, 'uint16z'
  entry 140, 'uint32z'
  entry 142, 'sint64'
  entry 143, 'uint64'
  entry 144, 'uint64z'

  dict 'garmin_product'
  entry 1, 'hrm1'
  entry 2, 'axh01'
  entry 3, 'axb01'
  entry 4, 'axb02'
  entry 5, 'hrm2ss'
  entry 6, 'dsi_alf02'
  entry 7, 'hrm3ss'
  entry 8, 'hrm_run_single_byte_product_id'
  entry 9, 'bsm'
  entry 10, 'bcm'
  entry 11, 'axs01'
  entry 12, 'hrm_tri_single_byte_product_id'
  entry 13, 'hrm4_run_single_byte_product_id'
  entry 14, 'fr225_single_byte_product_id'
  entry 473, 'fr301_china'
  entry 474, 'fr301_japan'
  entry 475, 'fr301_korea'
  entry 494, 'fr301_taiwan'
  entry 717, 'fr405'
  entry 782, 'fr50'
  entry 987, 'fr405_japan'
  entry 988, 'fr60'
  entry 1011, 'dsi_alf01'
  entry 1018, 'fr310xt'
  entry 1036, 'edge500'
  entry 1124, 'fr110'
  entry 1169, 'edge800'
  entry 1199, 'edge500_taiwan'
  entry 1213, 'edge500_japan'
  entry 1253, 'chirp'
  entry 1274, 'fr110_japan'
  entry 1325, 'edge200'
  entry 1328, 'fr910xt'
  entry 1333, 'edge800_taiwan'
  entry 1334, 'edge800_japan'
  entry 1341, 'alf04'
  entry 1345, 'fr610'
  entry 1360, 'fr210_japan'
  entry 1380, 'vector_ss'
  entry 1381, 'vector_cp'
  entry 1386, 'edge800_china'
  entry 1387, 'edge500_china'
  entry 1405, 'approach_g10'
  entry 1410, 'fr610_japan'
  entry 1422, 'edge500_korea'
  entry 1436, 'fr70'
  entry 1446, 'fr310xt_4t'
  entry 1461, 'amx'
  entry 1482, 'fr10'
  entry 1497, 'edge800_korea'
  entry 1499, 'swim'
  entry 1537, 'fr910xt_china'
  entry 1551, 'fenix'
  entry 1555, 'edge200_taiwan'
  entry 1561, 'edge510'
  entry 1567, 'edge810'
  entry 1570, 'tempe'
  entry 1600, 'fr910xt_japan'
  # The Fenix3 is rumored to have a Mediatek MT3333 GPS chipset. Not sure if
  # that would be a beter name.
  entry 1620, 'fenix3_gps' # Just a guess
  entry 1621, 'fenix5_gps' # Just a guess
  entry 1623, 'fr620'
  entry 1632, 'fr220'
  entry 1664, 'fr910xt_korea'
  entry 1688, 'fr10_japan'
  # The FR620 is rumored to have a MediaTek MT3339 GPS chipset while the
  # FR920XT is rumored to have a MT3333. Not sure why they have the same ID
  # in the FIT file for the GPS device.
  entry 1689, 'fr620_fr920xt_gps' # Just a guess
  entry 1721, 'edge810_japan'
  entry 1735, 'virb_elite'
  entry 1736, 'edge_touring'
  entry 1742, 'edge510_japan'
  entry 1743, 'hrm_tri'
  entry 1752, 'hrm_run'
  entry 1765, 'fr920xt'
  entry 1821, 'edge510_asia'
  entry 1822, 'edge810_china'
  entry 1823, 'edge810_taiwan'
  entry 1836, 'edge1000'
  entry 1837, 'vivo_fit'
  entry 1853, 'virb_remote'
  entry 1885, 'vivo_ki'
  entry 1903, 'fr15'
  entry 1907, 'vivo_active'
  entry 1918, 'edge510_korea'
  entry 1928, 'fr620_japan'
  entry 1929, 'fr620_china'
  entry 1930, 'fr220_japan'
  entry 1931, 'fr220_china'
  entry 1936, 'approach_s6'
  entry 1956, 'vivo_smart'
  entry 1967, 'fenix2'
  entry 1988, 'epix'
  entry 2050, 'fenix3'
  entry 2052, 'edge1000_taiwan'
  entry 2053, 'edge1000_japan'
  entry 2061, 'fr15_japan'
  entry 2067, 'edge520'
  entry 2070, 'edge1000_china'
  entry 2072, 'fr620_russia'
  entry 2073, 'fr220_russia'
  entry 2079, 'vector_s'
  entry 2100, 'edge1000_korea'
  entry 2130, 'fr920xt_taiwan'
  entry 2131, 'fr920xt_china'
  entry 2132, 'fr920xt_japan'
  entry 2134, 'virbx'
  entry 2135, 'vivo_smart_apac'
  entry 2140, 'etrex_touch'
  entry 2147, 'edge25'
  entry 2148, 'fr25'
  entry 2150, 'vivo_fit2'
  entry 2153, 'fr225'
  entry 2156, 'fr630'
  entry 2157, 'fr230'
  entry 2158, 'fr735xt'
  entry 2160, 'vivo_active_apac'
  entry 2161, 'vector_2'
  entry 2162, 'vector_2s'
  entry 2172, 'virbxe'
  entry 2173, 'fr620_taiwan'
  entry 2174, 'fr220_taiwan'
  entry 2175, 'truswing'
  entry 2188, 'fenix3_china'
  entry 2189, 'fenix3_twn'
  entry 2192, 'varia_headlight'
  entry 2193, 'varia_taillight_old'
  entry 2204, 'edge_explore_1000'
  entry 2219, 'fr225_asia'
  entry 2225, 'varia_radar_taillight'
  entry 2226, 'varia_radar_display'
  entry 2238, 'edge20'
  entry 2260, 'edge520_asia'
  entry 2261, 'edge520_japan'
  entry 2262, 'd2_bravo'
  entry 2266, 'approach_s20'
  entry 2271, 'vivo_smart2'
  entry 2274, 'edge1000_thai'
  entry 2276, 'varia_remote'
  entry 2288, 'edge25_asia'
  entry 2289, 'edge25_jpn'
  entry 2290, 'edge20_asia'
  entry 2292, 'approach_x40'
  entry 2293, 'fenix3_japan'
  entry 2294, 'vivo_smart_emea'
  entry 2310, 'fr630_asia'
  entry 2311, 'fr630_jpn'
  entry 2313, 'fr230_jpn'
  entry 2327, 'hrm4_run'
  entry 2332, 'epix_japan'
  entry 2337, 'vivo_active_hr'
  entry 2347, 'vivo_smart_gps_hr'
  entry 2348, 'vivo_smart_hr'
  entry 2361, 'vivo_smart_hr_asia'
  entry 2362, 'vivo_smart_gps_hr_asia'
  entry 2368, 'vivo_move'
  entry 2379, 'varia_taillight'
  entry 2397, 'fr235_japan'
  entry 2398, 'varia_vision'
  entry 2406, 'vivo_fit3'
  entry 2407, 'fenix3_korea'
  entry 2408, 'fenix3_sea'
  entry 2413, 'fenix3_hr'
  entry 2417, 'virb_ultra_30'
  entry 2429, 'index_smart_scale'
  entry 2431, 'fr235'
  entry 2432, 'fenix3_chronos'
  entry 2441, 'oregon7xx'
  entry 2444, 'rino7xx'
  entry 2457, 'epix_korea'
  entry 2473, 'fenix3_hr_chn'
  entry 2474, 'fenix3_hr_twn'
  entry 2475, 'fenix3_hr_jpn'
  entry 2476, 'fenix3_hr_sea'
  entry 2477, 'fenix3_hr_kor'
  entry 2496, 'nautix'
  entry 2497, 'vivo_active_hr_apac'
  entry 2512, 'oregon7xx_ww'
  entry 2530, 'edge_820'
  entry 2531, 'edge_explore_820'
  entry 2533, 'fr735xt_apac'
  entry 2534, 'fr735xt_japan'
  entry 2544, 'fenix5s'
  entry 2547, 'd2_bravo_titanium'
  entry 2567, 'varia_ut800'
  entry 2593, 'running_dynamics_pod'
  entry 2599, 'edge_820_china'
  entry 2600, 'edge_820_japan'
  entry 2604, 'fenix5x'
  entry 2606, 'vivo_fit_jr'
  entry 2622, 'vivo_smart3'
  entry 2623, 'vivo_sport'
  entry 2628, 'edge_820_taiwan'
  entry 2629, 'edge_820_korea'
  entry 2630, 'edge_820_sea'
  entry 2650, 'fr35_hebrew'
  entry 2656, 'approach_s60'
  entry 2667, 'fr35_apac'
  entry 2668, 'fr35_japan'
  entry 2675, 'fenix3_chronos_asia'
  entry 2687, 'virb_360'
  entry 2691, 'fr935'
  entry 2697, 'fenix5'
  entry 2700, 'vivoactive3'
  entry 2733, 'fr235_china_nfc'
  entry 2769, 'foretrex_601_701'
  entry 2772, 'vivo_move_hr'
  entry 2713, 'edge_1030'
  entry 2796, 'fenix5_asia'
  entry 2797, 'fenix5s_asia'
  entry 2798, 'fenix5x_asia'
  entry 2806, 'approach_z80'
  entry 2814, 'fr35_korea'
  entry 2819, 'd2charlie'
  entry 2831, 'vivo_smart3_apac'
  entry 2832, 'vivo_sport_apac'
  entry 2833, 'fr935_asia'
  entry 2859, 'descent'
  entry 2886, 'fr645'
  entry 2888, 'fr645m'
  entry 2891, 'fr30'
  entry 2900, 'fenix5s_plus'
  entry 2909, 'Edge_130'
  entry 2924, 'edge_1030_asia'
  entry 2927, 'vivosmart_4'
  entry 2945, 'vivo_move_hr_asia'
  entry 2957, 'fenix5_gps_galileo' # Just a guess
  entry 2962, 'approach_x10'
  entry 2977, 'fr30_asia'
  entry 2988, 'vivoactive3m_w'
  entry 3003, 'fr645_asia'
  entry 3004, 'fr645m_asia'
  entry 3011, 'edge_explore'
  entry 3028, 'gpsmap66'
  entry 3049, 'approach_s10'
  entry 3066, 'vivoactive3m_l'
  entry 3085, 'approach_g80'
  entry 3092, 'edge_130_asia'
  entry 3095, 'edge_1030_bontrager'
  entry 3110, 'fenix5_plus'
  entry 3111, 'fenix5x_plus'
  entry 3112, 'edge_520_plus'
  entry 3121, 'edge_530'
  entry 3122, 'edge_830'
  entry 3134, 'fenix5s_plus_apac'
  entry 3135, 'fenix5x_plus_apac'
  entry 3142, 'edge_520_plus_apac'
  entry 3144, 'fr235l_asia'
  entry 3145, 'fr245_asia'
  entry 3163, 'vivo_active3m_apac'
  entry 3218, 'vivo_smart4_asia'
  entry 3224, 'vivoactive4_small'
  entry 3225, 'vivoactive4_large'
  entry 3226, 'venu'
  entry 3246, 'marq_driver'
  entry 3247, 'marq_aviator'
  entry 3248, 'marq_captain'
  entry 3249, 'marq_commander'
  entry 3250, 'marq_expedition'
  entry 3251, 'marq_athlete'
  entry 3287, 'fenix6S_sport'
  entry 3288, 'fenix6S'
  entry 3289, 'fenix6_sport'
  entry 3290, 'fenix6'
  entry 3291, 'fenix6x'
  entry 3299, 'hrm_dual'
  entry 3308, 'vivo_move3_premium'
  entry 3314, 'approach_s40'
  entry 3321, 'fr245m_asia'
  entry 3349, 'edge_530_apac'
  entry 3350, 'edge_830_apac'
  entry 3378, 'vivo_move3'
  entry 3387, 'vivo_active4_small_asia'
  entry 3388, 'vivo_active4_large_asia'
  entry 3389, 'vivo_active4_oled_asia'
  entry 3405, 'swim2'
  entry 3420, 'marq_driver_asia'
  entry 3421, 'marq_aviator_asia'
  entry 3422, 'vivo_move3_asia'
  entry 3446, 'vivo_active3t_chn'
  entry 3448, 'marq_captain_asia'
  entry 3449, 'marq_commander_asia'
  entry 3450, 'marq_expedition_asia'
  entry 3451, 'marq_athlete_asia'
  entry 3469, 'fr45_asia'
  entry 3473, 'vivoactive3_daimler'
  entry 3512, 'fenix6s_sport_asia'
  entry 3513, 'fenix6s_asia'
  entry 3514, 'fenix6_sport_asia'
  entry 3515, 'fenix6_asia'
  entry 3516, 'fenix6x_asia'
  entry 3624, 'marq_adventurer'
  entry 3648, 'marq_adventurer_asia'
  entry 3639, 'swim2_apac'
  entry 3737, 'venu_daimler_asia'
  entry 3740, 'venu_daimler'
  entry 3794, 'fr745_asia'
  entry 3809, 'lily_asia'
  entry 3812, 'edge_1030_plus_asia'
  entry 3813, 'edge_130_plus_asia'
  entry 3823, 'approach_s12'
  entry 3872, 'enduro_asia'
  entry 3837, 'venusq_asia'
  entry 3843, 'edge_1040'
  entry 3850, 'marq_golfer_asia'
  entry 3851, 'venu2_plus'
  entry 3865, 'gnss'
  entry 3869, 'fr55'
  entry 3888, 'instinct_2'
  entry 3905, 'fenix7s'
  entry 3906, 'fenix7'
  entry 3907, 'fenix7x'
  entry 3908, 'fenix7s_apac'
  entry 3909, 'fenix7_apac'
  entry 3910, 'fenix7x_apac'
  entry 3927, 'approach_g12'
  entry 3930, 'descent_mk2s_asia'
  entry 3934, 'approach_s42'
  entry 3943, 'epix_gen2'
  entry 3944, 'epix_gen2_apac'
  entry 3949, 'venu2s_asia'
  entry 3950, 'venu2_asia'
  entry 3978, 'fr945_lte_asia'
  entry 3982, 'vivo_move_sport'
  entry 3983, 'vivomove_trend'
  entry 3986, 'approach_S12_asia'
  entry 3990, 'fr255_music'
  entry 3991, 'fr255_small_music'
  entry 3992, 'fr255'
  entry 3993, 'fr255_small'
  entry 4001, 'approach_g12_asia'
  entry 4002, 'approach_s42_asia'
  entry 4005, 'descent_g1'
  entry 4017, 'venu2_plus_asia'
  entry 4024, 'fr955'
  entry 4033, 'fr55_asia'
  entry 4061, 'edge_540'
  entry 4062, 'edge_840'
  entry 4063, 'vivosmart_5'
  entry 4071, 'instinct_2_asia'
  entry 4105, 'marq_gen2'
  entry 4115, 'venusq2'
  entry 4116, 'venusq2music'
  entry 4124, 'marq_gen2_aviator'
  entry 4125, 'd2_air_x10'
  entry 4130, 'hrm_pro_plus'
  entry 4132, 'descent_g1_asia'
  entry 4135, 'tactix7'
  entry 4155, 'instinct_crossover'
  entry 4169, 'edge_explore2'
  entry 4233, 'approach_s70'
  entry 4257, 'fr265_large'
  entry 4258, 'fr265_small'
  entry 4265, 'tacx_neo_smart'
  entry 4266, 'tacx_neo2_smart'
  entry 4267, 'tacx_neo2_t_smart'
  entry 4268, 'tacx_neo_smart_bike'
  entry 4269, 'tacx_satori_smart'
  entry 4270, 'tacx_flow_smart'
  entry 4271, 'tacx_vortex_smart'
  entry 4272, 'tacx_bushido_smart'
  entry 4273, 'tacx_genius_smart'
  entry 4274, 'tacx_flux_flux_s_smart'
  entry 4275, 'tacx_flux2_smart'
  entry 4276, 'tacx_magnum'
  entry 4305, 'edge_1040_asia'
  entry 4312, 'epix_gen2_pro_42'
  entry 4313, 'epix_gen2_pro_47'
  entry 4314, 'epix_gen2_pro_51'
  entry 4315, 'fr965'
  entry 4341, 'enduro2'
  entry 4375, 'fenix7_pro_solar'
  entry 4394, 'instinct_2x'
  entry 4442, 'descent_t2'
  entry 10007, 'sdm4'
  entry 10014, 'edge_remote'
  entry 20119, 'training_center'
  entry 65532, 'android_antplus_plugin'
  entry 65534, 'connect'

  dict 'gender'
  entry 0, 'female'
  entry 1, 'male'

  dict 'intensity'
  entry 0, 'active'
  entry 1, 'rest'
  entry 2, 'warmup'
  entry 3, 'cooldown'
  entry 4, 'recovery'
  entry 5, 'interval'
  entry 6, 'other'

  dict 'hr_zone_calc'
  entry 0, 'custom'
  entry 1, 'percent_max_hr'
  entry 2, 'percent_hrr'

  dict 'lap_trigger'
  entry 0, 'manual'
  entry 1, 'time'
  entry 2, 'distance'
  entry 3, 'position_start'
  entry 4, 'position_lap'
  entry 5, 'position_waypoint'
  entry 6, 'position_marked'
  entry 7, 'session_end'
  entry 8, 'fitness_equipment'

  dict 'left_right_balance'
  entry 0x7F, 'mask'
  entry 0x80, 'right'

  dict 'left_right_balance_100'
  entry 0x3FFF, 'mask'
  entry 0x8000, 'right'

  dict 'length_type'
  entry 0, 'idle'
  entry 1, 'active'

  dict 'manufacturer'
  entry 1, 'garmin'
  entry 2, 'garmin_fr405_antfs'
  entry 3, 'zephyr'
  entry 4, 'dayton'
  entry 5, 'idt'
  entry 6, 'srm'
  entry 7, 'quarq'
  entry 8, 'ibike'
  entry 9, 'saris'
  entry 10, 'spark_hk'
  entry 11, 'tanita'
  entry 12, 'echowell'
  entry 13, 'dynastream_oem'
  entry 14, 'nautilus'
  entry 15, 'dynastream'
  entry 16, 'timex'
  entry 17, 'metrigear'
  entry 18, 'xelic'
  entry 19, 'beurer'
  entry 20, 'cardiosport'
  entry 21, 'a_and_d'
  entry 22, 'hmm'
  entry 23, 'suunto'
  entry 24, 'thita_elektronik'
  entry 25, 'gpulse'
  entry 26, 'clean_mobile'
  entry 27, 'pedal_brain'
  entry 28, 'peaksware'
  entry 29, 'saxonar'
  entry 30, 'lemond_fitness'
  entry 31, 'dexcom'
  entry 32, 'wahoo_fitness'
  entry 33, 'octane_fitness'
  entry 34, 'archinoetics'
  entry 35, 'the_hurt_box'
  entry 36, 'citizen_systems'
  entry 37, 'magellan'
  entry 38, 'osynce'
  entry 39, 'holux'
  entry 40, 'concept2'
  entry 42, 'one_giant_leap'
  entry 43, 'ace_sensor'
  entry 44, 'brim_brothers'
  entry 45, 'xplova'
  entry 46, 'perception_digital'
  entry 47, 'bf1systems'
  entry 48, 'pioneer'
  entry 49, 'spantec'
  entry 50, 'metalogics'
  entry 51, '4iiiis'
  entry 52, 'seiko_epson'
  entry 53, 'seiko_epson_oem'
  entry 54, 'ifor_powell'
  entry 55, 'maxwell_guider'
  entry 56, 'star_trac'
  entry 57, 'breakaway'
  entry 58, 'alatech_technology_ltd'
  entry 59, 'mio_technology_europe'
  entry 60, 'rotor'
  entry 61, 'geonaute'
  entry 62, 'id_bike'
  entry 63, 'specialized'
  entry 64, 'wtek'
  entry 65, 'physical_enterprises'
  entry 66, 'north_pole_engineering'
  entry 67, 'bkool'
  entry 68, 'cateye'
  entry 69, 'stages_cycling'
  entry 70, 'sigmasport'
  entry 71, 'tomtom'
  entry 72, 'peripedal'
  entry 73, 'wattbike'
  entry 74, 'moxy'
  entry 77, 'ciclosport'
  entry 78, 'powerbahn'
  entry 79, 'acorn_projects_aps'
  entry 80, 'lifebeam'
  entry 81, 'bontrager'
  entry 82, 'wellgo'
  entry 83, 'scosche'
  entry 84, 'magura'
  entry 85, 'woodway'
  entry 86, 'elite'
  entry 95, 'stryd'
  entry 96, 'icg'
  entry 97, 'MiPulse'
  entry 98, 'bsx_athletics'
  entry 99, 'look'
  entry 100, 'campagnolo_srl'
  entry 101, 'body_bike_smart'
  entry 102, 'praxisworks'
  entry 103, 'limits_technology'
  entry 104, 'topaction_technology'
  entry 105, 'cosinuss'
  entry 106, 'fitcare'
  entry 107, 'magene'
  entry 108, 'giant_manufacturing_co'
  entry 109, 'tigrasport'
  entry 110, 'salutron'
  entry 111, 'technogym'
  entry 112, 'bryton_sensors'
  entry 113, 'latitude_limited'
  entry 114, 'soaring_technology'
  entry 115, 'igpsport'
  entry 116, 'thinkrider'
  entry 117, 'gopher_sport'
  entry 118, 'waterrower'
  entry 255, 'development'
  entry 257, 'healthandlife'
  entry 258, 'lezyne'
  entry 259, 'scribe_labs'
  entry 260, 'zwift'
  entry 261, 'watteam'
  entry 262, 'recon'
  entry 263, 'favero_electronics'
  entry 264, 'dynovelo'
  entry 265, 'strava'
  entry 266, 'precor'
  entry 267, 'bryton'
  entry 268, 'sram'
  entry 269, 'navman'
  entry 270, 'cobi'
  entry 271, 'spivi'
  entry 272, 'mio_magellan'
  entry 273, 'evesports'
  entry 274, 'sensitivus_gauge'
  entry 275, 'podoon'
  entry 276, 'life_time_fitness'
  entry 277, 'falco_e_motors'
  entry 278, 'minoura'
  entry 279, 'cycliq'
  entry 280, 'luxottica'
  entry 281, 'trainer_road'
  entry 282, 'the_sufferfest'
  entry 283, 'fullspeedahead'
  entry 284, 'virtualtraining'
  entry 285, 'feedbacksports'
  entry 286, 'omata'
  entry 287, 'vdo'
  entry 288, 'magneticdays'
  entry 289, 'hammerhead'
  entry 290, 'kinetic_by_kurt'
  entry 291, 'shapelog'
  entry 292, 'dabuziduo'
  entry 293, 'jetblack'
  entry 294, 'coros'
  entry 295, 'virtugo'
  entry 296, 'velosense'
  entry 297, 'cycligentinc'
  entry 298, 'trailforks'
  entry 299, 'mahle_ebikemotion'
  entry 300, 'nurvv'
  entry 301, 'microprogram'
  entry 302, 'zone5cloud'
  entry 303, 'greenteg'
  entry 304, 'yamaha_motors'
  entry 305, 'whoop'
  entry 306, 'gravaa'
  entry 307, 'onelap'
  entry 308, 'monark_exercise'
  entry 309, 'form'
  entry 310, 'decathlon'
  entry 311, 'syncros'
  entry 312, 'heatup'
  entry 313, 'cannondale'
  entry 314, 'true_fitness'
  entry 315, 'RGT_cycling'
  entry 316, 'vasa'
  entry 317, 'race_republic'
  entry 318, 'fazua'
  entry 319, 'oreka_training'
  entry 320, 'lsec'
  entry 321, 'lululemon_studio'
  entry 322, 'shanyue'
  entry 323, 'spinning_mda'
  entry 324, 'hilldating'

  entry 5759, 'actigraphcorp'

  dict 'message_index'
  entry 0x0FFF, 'mask'
  entry 0x7000, 'reserved'
  entry 0x8000, 'selected'

  dict 'pwr_zone_calc'
  entry 0, 'custom'
  entry 1, 'percent_ftp'

  dict 'rider_position_type'
  entry 0, 'seated'
  entry 1, 'standing'

  dict 'session_trigger'
  entry 0, 'activity_end'
  entry 1, 'manual'
  entry 2, 'auto_multi_sport'
  entry 3, 'fitness_equipment'

  dict 'source_type'
  entry 0, 'ant'
  entry 1, 'antplus'
  entry 2, 'bluetooth'
  entry 3, 'bluetooth_low_enegery'
  entry 4, 'wifi'
  entry 5, 'local'

  dict 'sport'
  entry 0, 'generic'
  entry 1, 'running'
  entry 2, 'cycling'
  entry 3, 'transition'
  entry 4, 'fitness_equipment'
  entry 5, 'swimming'
  entry 6, 'basketball'
  entry 7, 'soccer'
  entry 8, 'tennis'
  entry 9, 'american_football'
  entry 10, 'training'
  entry 11, 'walking'
  entry 12, 'cross_country_skiing'
  entry 13, 'alpine_skiing'
  entry 14, 'snowboarding'
  entry 15, 'rowing'
  entry 16, 'mountaineering'
  entry 17, 'hiking'
  entry 18, 'multisport'
  entry 19, 'paddling'
  entry 20, 'flying'
  entry 21, 'e_biking'
  entry 22, 'motorcycling'
  entry 23, 'boating'
  entry 24, 'driving'
  entry 25, 'golf'
  entry 26, 'hang_gliding'
  entry 27, 'horseback_riding'
  entry 28, 'hunting'
  entry 29, 'fishing'
  entry 30, 'inline_skating'
  entry 31, 'rock_climbing'
  entry 32, 'sailing'
  entry 33, 'ice_skating'
  entry 34, 'sky_diving'
  entry 35, 'snowshoeing'
  entry 36, 'snowmobiling'
  entry 37, 'stand_up_paddleboarding'
  entry 38, 'surfing'
  entry 39, 'wakeboarding'
  entry 40, 'water_skiing'
  entry 41, 'kayaking'
  entry 42, 'rafting'
  entry 43, 'windsurfing'
  entry 44, 'kitesurfing'
  entry 45, 'tactical'
  entry 46, 'jumpmaster'
  entry 47, 'boxing'
  entry 48, 'floor_climbing'
  entry 53, 'diving'
  entry 62, 'hiit'
  entry 64, 'racket'
  entry 76, 'water_tubing'
  entry 77, 'wakesurfing'
  entry 254, 'all'

  dict 'swim_stroke'
  entry 0, 'freestyle'
  entry 1, 'backstroke'
  entry 2, 'breaststroke'
  entry 3, 'butterfly'
  entry 4, 'drill'
  entry 5, 'mixed'
  entry 6, 'im'

  dict 'sub_sport'
  entry 0, 'generic'
  entry 1, 'treadmill'
  entry 2, 'street'
  entry 3, 'trail'
  entry 4, 'track'
  entry 5, 'spin'
  entry 6, 'indoor_cycling'
  entry 7, 'road'
  entry 8, 'mountain'
  entry 9, 'downhill'
  entry 10, 'recumbent'
  entry 11, 'cyclocross'
  entry 12, 'hand_cycling'
  entry 13, 'track_cycling'
  entry 14, 'indoor_rowing'
  entry 15, 'elliptical'
  entry 16, 'stair_climbing'
  entry 17, 'lap_swimming'
  entry 18, 'open_water'
  entry 19, 'flexibility_training'
  entry 20, 'strength_training'
  entry 21, 'warm_up'
  entry 22, 'match'
  entry 23, 'exercise'
  entry 24, 'challenge'
  entry 25, 'indoor_skiing'
  entry 26, 'cardio_training'
  entry 27, 'indoor_walking'
  entry 28, 'e_bike_fitness'
  entry 29, 'bmx'
  entry 30, 'casual_walking'
  entry 31, 'speed_walking'
  entry 32, 'bike_to_run_transition'
  entry 33, 'run_to_bike_transition'
  entry 34, 'swim_to_bike_transition'
  entry 35, 'atv'
  entry 36, 'motocross'
  entry 37, 'backcountry'
  entry 38, 'resort'
  entry 39, 'rc_drone'
  entry 40, 'wingsuit'
  entry 41, 'whitewater'
  entry 42, 'skate_skiing'
  entry 43, 'yoga'
  entry 44, 'pilates'
  entry 45, 'indoor_running'
  entry 46, 'gravel_cycling'
  entry 47, 'e_bike_mountain'
  entry 48, 'commuting'
  entry 49, 'mixed_surface'
  entry 50, 'navigate'
  entry 51, 'track_me'
  entry 52, 'map'
  entry 53, 'single_gas_diving'
  entry 54, 'multi_gas_diving'
  entry 55, 'gauge_diving'
  entry 56, 'apnea_diving'
  entry 57, 'apnea_hunting'
  entry 58, 'virtual_activity'
  entry 59, 'obstacle'
  entry 62, 'breathing'
  entry 65, 'sail_race'
  entry 67, 'ultra'
  entry 68, 'indoor_climbing'
  entry 69, 'bouldering'
  entry 70, 'hiit'
  entry 73, 'amrap'
  entry 74, 'emom'
  entry 75, 'tabata'
  entry 84, 'pickleball'
  entry 85, 'padel'
  entry 110, 'fly_canopy'
  entry 111, 'fly_paraglide'
  entry 112, 'fly_paramotor'
  entry 113, 'fly_pressurized'
  entry 114, 'fly_navigate'
  entry 115, 'fly_timer'
  entry 116, 'fly_altimeter'
  entry 117, 'fly_wx'
  entry 118, 'fly_vfr'
  entry 119, 'fly_ifr'
  entry 254, 'all'

  dict 'training_status'
  entry 0, 'overreaching'
  entry 1, 'detraining'
  entry 2, 'unproductive'
  entry 3, 'recovery'
  entry 4, 'maintaining'
  entry 5, 'productive'
  entry 6, 'peaking'
  entry 7, 'productive'

  dict 'training_status_trend'
  entry 0, 'undefined'
  entry 1, 'down'
  entry 2, 'maintaining'
  entry 3, 'up'

  dict 'wkt_step_duration'
  entry 0, 'time'
  entry 1, 'distance'
  entry 2, 'hr_less_than'
  entry 3, 'hr_greater_than'
  entry 4, 'calories'
  entry 5, 'open'
  entry 6, 'repeat_until_steps_cmplt'
  entry 7, 'repeat_until_time'
  entry 8, 'repeat_until_distance'
  entry 9, 'repeat_until_calories'
  entry 10, 'repeat_until_hr_less_than'
  entry 11, 'repeat_until_hr_greater_than'
  entry 12, 'repeat_until_power_less_than'
  entry 13, 'repeat_until_power_greater_than'
  entry 14, 'power_less_than'
  entry 15, 'power_greater_than'
  entry 16, 'training_peaks_tss'
  entry 17, 'repeat_until_power_last_lap_less_than'
  entry 18, 'repeat_until_max_power_last_lap_less_than'
  entry 19, 'power_3s_less_than'
  entry 20, 'power_10s_less_than'
  entry 21, 'power_30s_less_than'
  entry 22, 'power_3s_greater_than'
  entry 23, 'power_10s_greater_than'
  entry 24, 'power_30s_greater_than'
  entry 25, 'power_lap_less_than'
  entry 26, 'power_lap_greater_than'
  entry 27, 'repeat_until_training_peaks_tss'
  entry 28, 'repetition_time'
  entry 29, 'reps'
  entry 31, 'time_only'

  dict 'wkt_step_target'
  entry 0, 'speed'
  entry 1, 'heart_rate'
  entry 2, 'open'
  entry 3, 'cadence'
  entry 4, 'power'
  entry 5, 'grade'
  entry 6, 'resistance'
  entry 7, 'power_3s'
  entry 8, 'power_10s'
  entry 9, 'power_30s'
  entry 10, 'power_lap'
  entry 11, 'swim_stroke'
  entry 12, 'speed_lap'
  entry 13, 'heart_rate_lap'

  dict 'workout_capabilities'
  entry 0x1, 'interval'
  entry 0x2, 'custom'
  entry 0x4, 'fitness_equipment'
  entry 0x8, 'firstbeat'
  entry 0x10, 'new_leaf'
  entry 0x20, 'tcx'
  entry 0x80, 'speed'
  entry 0x100, 'heart_rate'
  entry 0x200, 'distance'
  entry 0x400, 'cadence'
  entry 0x800, 'power'
  entry 0x1000, 'grade'
  entry 0x2000, 'resistance'
  entry 0x4000, 'protected'

  dict 'workout_equipment'
  entry 0, 'none'
  entry 1, 'swim_fins'
  entry 2, 'swim_kickboard'
  entry 3, 'swim_paddles'
  entry 4, 'swim_pull_buoy'
  entry 5, 'swim_snorkel'

end

Class Method Summary collapse

Class Method Details

.read(file, filter = nil) ⇒ Object



17
18
19
# File 'lib/fit4ruby.rb', line 17

def self.read(file, filter = nil)
  FitFile.new.read(file, filter)
end

.write(file, top_level_record) ⇒ Object



21
22
23
# File 'lib/fit4ruby.rb', line 21

def self.write(file, top_level_record)
  FitFile.new.write(file, top_level_record)
end