lib/fit/file/definitions.rb in fit-parser-0.0.2 vs lib/fit/file/definitions.rb in fit-parser-0.0.3

- old
+ new

@@ -52,56 +52,18 @@ Fit::File::Definitions.add_field 0, 2, 'product', :type => :uint16 Fit::File::Definitions.add_field 0, 2, 'garmin_product', :type => :garmin_product, :ref_field_name => 'manufacturer', :ref_field_values => [:garmin, :dynastream, :dynastream_oem] Fit::File::Definitions.add_field 0, 3, 'serial_number', :type => :uint32z Fit::File::Definitions.add_field 0, 4, 'time_created', :type => :date_time Fit::File::Definitions.add_field 0, 5, 'number', :type => :uint16 +Fit::File::Definitions.add_field 0, 8, 'product_name', :type => :string -Fit::File::Definitions.add_name 49, 'file_creator' -Fit::File::Definitions.add_field 49, 0, 'software_version', :type => :uint16 -Fit::File::Definitions.add_field 49, 1, 'hardware_version', :type => :uint8 - -Fit::File::Definitions.add_name 35, 'software' -Fit::File::Definitions.add_field 35, 254, 'message_index', :type => :message_index -Fit::File::Definitions.add_field 35, 3, 'version', :type => :uint16, :scale => 100 -Fit::File::Definitions.add_field 35, 5, 'part_number', :type => :string - -Fit::File::Definitions.add_name 106, 'slave_device' -Fit::File::Definitions.add_field 106, 0, 'manufacturer', :type => :manufacturer -Fit::File::Definitions.add_field 106, 1, 'product', :type => :uint16 -Fit::File::Definitions.add_field 106, 1, 'garmin_product', :type => :garmin_product, :ref_field_name => 'manufacturer', :ref_field_values => [:garmin, :dynastream, :dynastream_oem] - Fit::File::Definitions.add_name 1, 'capabilities' Fit::File::Definitions.add_field 1, 0, 'languages', :type => :uint8z Fit::File::Definitions.add_field 1, 1, 'sports', :type => :sport_bits_0 Fit::File::Definitions.add_field 1, 21, 'workouts_supported', :type => :workout_capabilities Fit::File::Definitions.add_field 1, 23, 'connectivity_supported', :type => :connectivity_capabilities -Fit::File::Definitions.add_name 37, 'file_capabilities' -Fit::File::Definitions.add_field 37, 254, 'message_index', :type => :message_index -Fit::File::Definitions.add_field 37, 0, 'type', :type => :file -Fit::File::Definitions.add_field 37, 1, 'flags', :type => :file_flags -Fit::File::Definitions.add_field 37, 2, 'directory', :type => :string -Fit::File::Definitions.add_field 37, 3, 'max_count', :type => :uint16 -Fit::File::Definitions.add_field 37, 4, 'max_size', :type => :uint32, :unit => 'bytes' - -Fit::File::Definitions.add_name 38, 'mesg_capabilities' -Fit::File::Definitions.add_field 38, 254, 'message_index', :type => :message_index -Fit::File::Definitions.add_field 38, 0, 'file', :type => :file -Fit::File::Definitions.add_field 38, 1, 'mesg_num', :type => :mesg_num -Fit::File::Definitions.add_field 38, 2, 'count_type', :type => :mesg_count -Fit::File::Definitions.add_field 38, 3, 'count', :type => :uint16 -Fit::File::Definitions.add_field 38, 3, 'num_per_file', :type => :uint16, :ref_field_name => 'count_type', :ref_field_values => [:num_per_file] -Fit::File::Definitions.add_field 38, 3, 'max_per_file', :type => :uint16, :ref_field_name => 'count_type', :ref_field_values => [:max_per_file] -Fit::File::Definitions.add_field 38, 3, 'max_per_file_type', :type => :uint16, :ref_field_name => 'count_type', :ref_field_values => [:max_per_file_type] - -Fit::File::Definitions.add_name 39, 'field_capabilities' -Fit::File::Definitions.add_field 39, 254, 'message_index', :type => :message_index -Fit::File::Definitions.add_field 39, 0, 'file', :type => :file -Fit::File::Definitions.add_field 39, 1, 'mesg_num', :type => :mesg_num -Fit::File::Definitions.add_field 39, 2, 'field_num', :type => :uint8 -Fit::File::Definitions.add_field 39, 3, 'count', :type => :uint16 - Fit::File::Definitions.add_name 2, 'device_settings' Fit::File::Definitions.add_field 2, 0, 'active_time_zone', :type => :uint8, :scale => 1 Fit::File::Definitions.add_field 2, 1, 'utc_offset', :type => :uint32 Fit::File::Definitions.add_field 2, 5, 'time_zone_offset', :type => :sint8, :scale => 4, :unit => 'hr' @@ -185,30 +147,15 @@ Fit::File::Definitions.add_field 7, 2, 'threshold_heart_rate', :type => :uint8, :scale => 1 Fit::File::Definitions.add_field 7, 3, 'functional_threshold_power', :type => :uint16, :scale => 1 Fit::File::Definitions.add_field 7, 5, 'hr_calc_type', :type => :hr_zone_calc, :scale => 1 Fit::File::Definitions.add_field 7, 7, 'pwr_calc_type', :type => :pwr_zone_calc, :scale => 1 -Fit::File::Definitions.add_name 12, 'sport' -Fit::File::Definitions.add_field 12, 0, 'sport', :type => :sport, :scale => 1 -Fit::File::Definitions.add_field 12, 1, 'sub_sport', :type => :sub_sport, :scale => 1 -Fit::File::Definitions.add_field 12, 3, 'name', :type => :string - Fit::File::Definitions.add_name 8, 'hr_zone' Fit::File::Definitions.add_field 8, 254, 'message_index', :type => :message_index, :scale => 1 Fit::File::Definitions.add_field 8, 1, 'high_bpm', :type => :uint8, :scale => 1, :unit => 'bpm' Fit::File::Definitions.add_field 8, 2, 'name', :type => :string, :scale => 1 -Fit::File::Definitions.add_name 53, 'speed_zone' -Fit::File::Definitions.add_field 53, 254, 'message_index', :type => :message_index, :scale => 1 -Fit::File::Definitions.add_field 53, 0, 'high_value', :type => :uint16, :scale => 1000, :unit => 'm/s' -Fit::File::Definitions.add_field 53, 1, 'name', :type => :string, :scale => 1 - -Fit::File::Definitions.add_name 131, 'cadence_zone' -Fit::File::Definitions.add_field 131, 254, 'message_index', :type => :message_index, :scale => 1 -Fit::File::Definitions.add_field 131, 0, 'high_value', :type => :uint8, :scale => 1, :unit => 'rpm' -Fit::File::Definitions.add_field 131, 1, 'name', :type => :string, :scale => 1 - Fit::File::Definitions.add_name 9, 'power_zone' Fit::File::Definitions.add_field 9, 254, 'message_index', :type => :message_index, :scale => 1 Fit::File::Definitions.add_field 9, 1, 'high_value', :type => :uint16, :scale => 1, :unit => 'watts' Fit::File::Definitions.add_field 9, 2, 'name', :type => :string, :scale => 1 @@ -216,10 +163,15 @@ Fit::File::Definitions.add_field 10, 254, 'message_index', :type => :message_index, :scale => 1 Fit::File::Definitions.add_field 10, 1, 'high_bpm', :type => :uint8, :scale => 1 Fit::File::Definitions.add_field 10, 2, 'calories', :type => :uint16, :scale => 10, :unit => 'kcal / min' Fit::File::Definitions.add_field 10, 3, 'fat_calories', :type => :uint8, :scale => 10, :unit => 'kcal / min' +Fit::File::Definitions.add_name 12, 'sport' +Fit::File::Definitions.add_field 12, 0, 'sport', :type => :sport, :scale => 1 +Fit::File::Definitions.add_field 12, 1, 'sub_sport', :type => :sub_sport, :scale => 1 +Fit::File::Definitions.add_field 12, 3, 'name', :type => :string + Fit::File::Definitions.add_name 15, 'goal' Fit::File::Definitions.add_field 15, 254, 'message_index', :type => :message_index, :scale => 1 Fit::File::Definitions.add_field 15, 0, 'sport', :type => :sport, :scale => 1 Fit::File::Definitions.add_field 15, 1, 'sub_sport', :type => :sub_sport, :scale => 1 Fit::File::Definitions.add_field 15, 2, 'start_date', :type => :date_time @@ -230,20 +182,10 @@ Fit::File::Definitions.add_field 15, 7, 'target_value', :type => :uint32, :scale => 1 Fit::File::Definitions.add_field 15, 8, 'recurrence', :type => :goal_recurrence, :scale => 1 Fit::File::Definitions.add_field 15, 9, 'recurrence_value', :type => :uint16, :scale => 1 Fit::File::Definitions.add_field 15, 10, 'enabled', :type => :bool, :scale => 1 -Fit::File::Definitions.add_name 34, 'activity' -Fit::File::Definitions.add_field 34, 253, 'timestamp', :type => :date_time -Fit::File::Definitions.add_field 34, 0, 'total_timer_time', :type => :uint32, :scale => 1000, :unit => 's' -Fit::File::Definitions.add_field 34, 1, 'num_sessions', :type => :uint16, :scale => 1 -Fit::File::Definitions.add_field 34, 2, 'type', :type => :activity -Fit::File::Definitions.add_field 34, 3, 'event', :type => :event -Fit::File::Definitions.add_field 34, 4, 'event_type', :type => :event_type -Fit::File::Definitions.add_field 34, 5, 'local_timestamp', :type => :local_date_time -Fit::File::Definitions.add_field 34, 6, 'event_group', :type => :uint8 - Fit::File::Definitions.add_name 18, 'session' Fit::File::Definitions.add_field 18, 254, 'message_index', :type => :message_index, :scale => 1 Fit::File::Definitions.add_field 18, 253, 'timestamp', :type => :date_time, :unit => 's' Fit::File::Definitions.add_field 18, 0, 'event', :type => :event Fit::File::Definitions.add_field 18, 1, 'event_type', :type => :event_type @@ -424,30 +366,10 @@ Fit::File::Definitions.add_field 19, 92, 'avg_right_torque_effectiveness', :type => :uint8, :scale => 2, :unit => 'percent' Fit::File::Definitions.add_field 19, 93, 'avg_left_pedal_smoothness', :type => :uint8, :scale => 2, :unit => 'percent' Fit::File::Definitions.add_field 19, 94, 'avg_right_pedal_smoothness', :type => :uint8, :scale => 2, :unit => 'percent' Fit::File::Definitions.add_field 19, 95, 'avg_combined_pedal_smoothness', :type => :uint8, :scale => 2, :unit => 'percent' -Fit::File::Definitions.add_name 101, 'length' -Fit::File::Definitions.add_field 101, 254, 'message_index', :type => :message_index, :scale => 1 -Fit::File::Definitions.add_field 101, 253, 'timestamp', :type => :date_time, :scale => 1 -Fit::File::Definitions.add_field 101, 0, 'event', :type => :event -Fit::File::Definitions.add_field 101, 1, 'event_type', :type => :event_type -Fit::File::Definitions.add_field 101, 2, 'start_time', :type => :date_time, :scale => 1 -Fit::File::Definitions.add_field 101, 3, 'total_elapsed_time', :type => :uint32, :scale => 1000, :unit => 's' -Fit::File::Definitions.add_field 101, 4, 'total_timer_time', :type => :uint32, :scale => 1000, :unit => 's' -Fit::File::Definitions.add_field 101, 5, 'total_strokes', :type => :uint16, :scale => 1, :unit => 'strokes' -Fit::File::Definitions.add_field 101, 6, 'avg_speed', :type => :uint16, :scale => 1000, :unit => 'm/s' -Fit::File::Definitions.add_field 101, 7, 'swim_stroke', :type => :swim_stroke, :unit => 'swim_stroke' -Fit::File::Definitions.add_field 101, 9, 'avg_swimming_cadence', :type => :uint8, :unit => 'strokes/min' -Fit::File::Definitions.add_field 101, 10, 'event_group', :type => :uint8 -Fit::File::Definitions.add_field 101, 11, 'total_calories', :type => :uint16, :unit => 'kcal' -Fit::File::Definitions.add_field 101, 12, 'length_type', :type => :length_type -Fit::File::Definitions.add_field 101, 18, 'player_score', :type => :uint16 -Fit::File::Definitions.add_field 101, 19, 'opponent_score', :type => :uint16 -Fit::File::Definitions.add_field 101, 20, 'stroke_count', :type => :uint16, :unit => 'counts' -Fit::File::Definitions.add_field 101, 21, 'zone_count', :type => :uint16, :unit => 'counts' - Fit::File::Definitions.add_name 20, 'record' Fit::File::Definitions.add_field 20, 253, 'timestamp', :type => :date_time, :scale => 1, :unit => 's' Fit::File::Definitions.add_field 20, 0, 'position_lat', :type => :sint32, :scale => 1, :unit => 'semicircles' Fit::File::Definitions.add_field 20, 1, 'position_long', :type => :sint32, :scale => 1, :unit => 'semicircles' Fit::File::Definitions.add_field 20, 2, 'altitude', :type => :uint16, :scale => 5, :offset => 500, :unit => 'm' @@ -545,36 +467,10 @@ Fit::File::Definitions.add_field 23, 20, 'ant_transmission_type', :type => :uint8z Fit::File::Definitions.add_field 23, 21, 'ant_device_number', :type => :uint16z Fit::File::Definitions.add_field 23, 22, 'ant_network', :type => :ant_network Fit::File::Definitions.add_field 23, 25, 'source_type', :type => :source_type -Fit::File::Definitions.add_name 72, 'training_file' -Fit::File::Definitions.add_field 72, 253, 'timestamp', :type => :date_time -Fit::File::Definitions.add_field 72, 0, 'type', :type => :file -Fit::File::Definitions.add_field 72, 1, 'manufacturer', :type => :manufacturer -Fit::File::Definitions.add_field 72, 2, 'product', :type => :uint16 -Fit::File::Definitions.add_field 72, 2, 'garmin_product', :type => :garmin_product, :ref_field_name => 'manufacturer', :ref_field_values => [:garmin, :dynastream, :dynastream_oem] -Fit::File::Definitions.add_field 72, 3, 'serial_number', :type => :uint32z -Fit::File::Definitions.add_field 72, 4, 'time_created', :type => :date_time - -Fit::File::Definitions.add_name 78, 'hrv' -Fit::File::Definitions.add_field 78, 0, 'time', :type => :uint16, :scale => 1000, :unit => 's' - -Fit::File::Definitions.add_name 31, 'course' -Fit::File::Definitions.add_field 31, 4, 'sport', :type => :sport -Fit::File::Definitions.add_field 31, 5, 'name', :type => :string -Fit::File::Definitions.add_field 31, 6, 'capabilities', :type => :course_capabilities - -Fit::File::Definitions.add_name 32, 'course_point' -Fit::File::Definitions.add_field 32, 254, 'message_index', :type => :message_index -Fit::File::Definitions.add_field 32, 1, 'timestamp', :type => :date_time, :scale => 1 -Fit::File::Definitions.add_field 32, 2, 'position_lat', :type => :sint32, :scale => 1, :unit => 'semicircles' -Fit::File::Definitions.add_field 32, 3, 'position_long', :type => :sint32, :scale => 1, :unit => 'semicircles' -Fit::File::Definitions.add_field 32, 4, 'distance', :type => :uint32, :scale => 100, :unit => 'm' -Fit::File::Definitions.add_field 32, 5, 'type', :type => :course_point, :scale => 1 -Fit::File::Definitions.add_field 32, 6, 'name', :type => :string - Fit::File::Definitions.add_name 26, 'workout' Fit::File::Definitions.add_field 26, 4, 'sport', :type => :sport, :scale => 1 Fit::File::Definitions.add_field 26, 5, 'capabilities', :type => :workout_capabilities Fit::File::Definitions.add_field 26, 6, 'num_valid_steps', :type => :uint16, :scale => 1 Fit::File::Definitions.add_field 26, 8, 'wkt_name', :type => :string, :scale => 1 @@ -620,21 +516,10 @@ Fit::File::Definitions.add_field 28, 3, 'time_created', :type => :date_time Fit::File::Definitions.add_field 28, 4, 'completed', :type => :bool, :scale => 1 Fit::File::Definitions.add_field 28, 5, 'type', :type => :schedule, :scale => 1 Fit::File::Definitions.add_field 28, 6, 'scheduled_time', :type => :local_date_time -Fit::File::Definitions.add_name 33, 'totals' -Fit::File::Definitions.add_field 33, 254, 'message_index', :type => :message_index -Fit::File::Definitions.add_field 33, 253, 'timestamp', :type => :date_time, :unit => 's' -Fit::File::Definitions.add_field 33, 0, 'timer_time', :type => :uint32, :unit => 's' -Fit::File::Definitions.add_field 33, 1, 'distance', :type => :uint32, :unit => 'm' -Fit::File::Definitions.add_field 33, 2, 'calories', :type => :uint32, :unit => 'kcal' -Fit::File::Definitions.add_field 33, 3, 'sport', :type => :sport -Fit::File::Definitions.add_field 33, 4, 'elapsed_time', :type => :uint32, :unit => 's' -Fit::File::Definitions.add_field 33, 5, 'sessions', :type => :uint16 -Fit::File::Definitions.add_field 33, 6, 'active_time', :type => :uint32, :unit => 's' - Fit::File::Definitions.add_name 30, 'weight_scale' Fit::File::Definitions.add_field 30, 253, 'timestamp', :type => :date_time, :scale => 1, :unit => 's' Fit::File::Definitions.add_field 30, 0, 'weight', :type => :weight, :scale => 100, :unit => 'kg' Fit::File::Definitions.add_field 30, 1, 'percent_fat', :type => :uint16, :scale => 100, :unit => '%' Fit::File::Definitions.add_field 30, 2, 'percent_hydration', :type => :uint16, :scale => 100, :unit => '%' @@ -646,10 +531,79 @@ Fit::File::Definitions.add_field 30, 9, 'active_met', :type => :uint16, :scale => 4, :unit => 'kcal/day' Fit::File::Definitions.add_field 30, 10, 'metabolic_age', :type => :uint8, :scale => 1, :unit => 'years' Fit::File::Definitions.add_field 30, 11, 'visceral_fat_rating', :type => :uint8, :scale => 1 Fit::File::Definitions.add_field 30, 12, 'user_profile_index', :type => :message_index +Fit::File::Definitions.add_name 31, 'course' +Fit::File::Definitions.add_field 31, 4, 'sport', :type => :sport +Fit::File::Definitions.add_field 31, 5, 'name', :type => :string +Fit::File::Definitions.add_field 31, 6, 'capabilities', :type => :course_capabilities + +Fit::File::Definitions.add_name 32, 'course_point' +Fit::File::Definitions.add_field 32, 254, 'message_index', :type => :message_index +Fit::File::Definitions.add_field 32, 1, 'timestamp', :type => :date_time, :scale => 1 +Fit::File::Definitions.add_field 32, 2, 'position_lat', :type => :sint32, :scale => 1, :unit => 'semicircles' +Fit::File::Definitions.add_field 32, 3, 'position_long', :type => :sint32, :scale => 1, :unit => 'semicircles' +Fit::File::Definitions.add_field 32, 4, 'distance', :type => :uint32, :scale => 100, :unit => 'm' +Fit::File::Definitions.add_field 32, 5, 'type', :type => :course_point, :scale => 1 +Fit::File::Definitions.add_field 32, 6, 'name', :type => :string + +Fit::File::Definitions.add_name 33, 'totals' +Fit::File::Definitions.add_field 33, 254, 'message_index', :type => :message_index +Fit::File::Definitions.add_field 33, 253, 'timestamp', :type => :date_time, :unit => 's' +Fit::File::Definitions.add_field 33, 0, 'timer_time', :type => :uint32, :unit => 's' +Fit::File::Definitions.add_field 33, 1, 'distance', :type => :uint32, :unit => 'm' +Fit::File::Definitions.add_field 33, 2, 'calories', :type => :uint32, :unit => 'kcal' +Fit::File::Definitions.add_field 33, 3, 'sport', :type => :sport +Fit::File::Definitions.add_field 33, 4, 'elapsed_time', :type => :uint32, :unit => 's' +Fit::File::Definitions.add_field 33, 5, 'sessions', :type => :uint16 +Fit::File::Definitions.add_field 33, 6, 'active_time', :type => :uint32, :unit => 's' + +Fit::File::Definitions.add_name 34, 'activity' +Fit::File::Definitions.add_field 34, 253, 'timestamp', :type => :date_time +Fit::File::Definitions.add_field 34, 0, 'total_timer_time', :type => :uint32, :scale => 1000, :unit => 's' +Fit::File::Definitions.add_field 34, 1, 'num_sessions', :type => :uint16, :scale => 1 +Fit::File::Definitions.add_field 34, 2, 'type', :type => :activity +Fit::File::Definitions.add_field 34, 3, 'event', :type => :event +Fit::File::Definitions.add_field 34, 4, 'event_type', :type => :event_type +Fit::File::Definitions.add_field 34, 5, 'local_timestamp', :type => :local_date_time +Fit::File::Definitions.add_field 34, 6, 'event_group', :type => :uint8 + +Fit::File::Definitions.add_name 35, 'software' +Fit::File::Definitions.add_field 35, 254, 'message_index', :type => :message_index +Fit::File::Definitions.add_field 35, 3, 'version', :type => :uint16, :scale => 100 +Fit::File::Definitions.add_field 35, 5, 'part_number', :type => :string + +Fit::File::Definitions.add_name 37, 'file_capabilities' +Fit::File::Definitions.add_field 37, 254, 'message_index', :type => :message_index +Fit::File::Definitions.add_field 37, 0, 'type', :type => :file +Fit::File::Definitions.add_field 37, 1, 'flags', :type => :file_flags +Fit::File::Definitions.add_field 37, 2, 'directory', :type => :string +Fit::File::Definitions.add_field 37, 3, 'max_count', :type => :uint16 +Fit::File::Definitions.add_field 37, 4, 'max_size', :type => :uint32, :unit => 'bytes' + +Fit::File::Definitions.add_name 38, 'mesg_capabilities' +Fit::File::Definitions.add_field 38, 254, 'message_index', :type => :message_index +Fit::File::Definitions.add_field 38, 0, 'file', :type => :file +Fit::File::Definitions.add_field 38, 1, 'mesg_num', :type => :mesg_num +Fit::File::Definitions.add_field 38, 2, 'count_type', :type => :mesg_count +Fit::File::Definitions.add_field 38, 3, 'count', :type => :uint16 +Fit::File::Definitions.add_field 38, 3, 'num_per_file', :type => :uint16, :ref_field_name => 'count_type', :ref_field_values => [:num_per_file] +Fit::File::Definitions.add_field 38, 3, 'max_per_file', :type => :uint16, :ref_field_name => 'count_type', :ref_field_values => [:max_per_file] +Fit::File::Definitions.add_field 38, 3, 'max_per_file_type', :type => :uint16, :ref_field_name => 'count_type', :ref_field_values => [:max_per_file_type] + +Fit::File::Definitions.add_name 39, 'field_capabilities' +Fit::File::Definitions.add_field 39, 254, 'message_index', :type => :message_index +Fit::File::Definitions.add_field 39, 0, 'file', :type => :file +Fit::File::Definitions.add_field 39, 1, 'mesg_num', :type => :mesg_num +Fit::File::Definitions.add_field 39, 2, 'field_num', :type => :uint8 +Fit::File::Definitions.add_field 39, 3, 'count', :type => :uint16 + +Fit::File::Definitions.add_name 49, 'file_creator' +Fit::File::Definitions.add_field 49, 0, 'software_version', :type => :uint16 +Fit::File::Definitions.add_field 49, 1, 'hardware_version', :type => :uint8 + Fit::File::Definitions.add_name 51, 'blood_pressure' Fit::File::Definitions.add_field 51, 253, 'timestamp', :type => :date_time, :scale => 1, :unit => 's' Fit::File::Definitions.add_field 51, 0, 'systolic_pressure', :type => :uint16, :scale => 1, :unit => 'mmHg' Fit::File::Definitions.add_field 51, 1, 'diastolic_pressure', :type => :uint16, :scale => 1, :unit => 'mmHg' Fit::File::Definitions.add_field 51, 2, 'mean_arterial_pressure', :type => :uint16, :scale => 1, :unit => 'mmHg' @@ -659,17 +613,14 @@ Fit::File::Definitions.add_field 51, 6, 'heart_rate', :type => :uint8, :scale => 1, :unit => 'bpm' Fit::File::Definitions.add_field 51, 7, 'heart_rate_type', :type => :hr_type Fit::File::Definitions.add_field 51, 8, 'status', :type => :bp_status Fit::File::Definitions.add_field 51, 9, 'user_profile_index', :type => :message_index -Fit::File::Definitions.add_name 103, 'monitoring_info' -Fit::File::Definitions.add_field 103, 253, 'timestamp', :type => :date_time -Fit::File::Definitions.add_field 103, 0, 'local_timestamp', :type => :local_date_time -Fit::File::Definitions.add_field 103, 1, 'activity_type', :type => :activity_type -Fit::File::Definitions.add_field 103, 3, 'cycles_to_distance', :type => :uint16, :scale => 5000, :unit => 'm/cycle' -Fit::File::Definitions.add_field 103, 4, 'cycles_to_calories', :type => :uint16, :scale => 5000, :unit => 'kcal/cycle' -Fit::File::Definitions.add_field 103, 5, 'resting_metabolic_rate', :type => :uint16, :unit => 'kcal / day' +Fit::File::Definitions.add_name 53, 'speed_zone' +Fit::File::Definitions.add_field 53, 254, 'message_index', :type => :message_index, :scale => 1 +Fit::File::Definitions.add_field 53, 0, 'high_value', :type => :uint16, :scale => 1000, :unit => 'm/s' +Fit::File::Definitions.add_field 53, 1, 'name', :type => :string, :scale => 1 Fit::File::Definitions.add_name 55, 'monitoring' Fit::File::Definitions.add_field 55, 253, 'timestamp', :type => :date_time, :unit => 's' Fit::File::Definitions.add_field 55, 0, 'device_index', :type => :device_index Fit::File::Definitions.add_field 55, 1, 'calories', :type => :uint16, :unit => 'kcal' @@ -696,14 +647,127 @@ Fit::File::Definitions.add_field 55, 27, 'heart_rate', :type => :uint8, :unit => 'bpm' Fit::File::Definitions.add_field 55, 28, 'intensity', :type => :uint8, :scale => 10 Fit::File::Definitions.add_field 55, 29, 'duration_min', :type => :uint16, :unit => 'min' Fit::File::Definitions.add_field 55, 30, 'duration', :type => :uint32, :unit => 's' +Fit::File::Definitions.add_name 72, 'training_file' +Fit::File::Definitions.add_field 72, 253, 'timestamp', :type => :date_time +Fit::File::Definitions.add_field 72, 0, 'type', :type => :file +Fit::File::Definitions.add_field 72, 1, 'manufacturer', :type => :manufacturer +Fit::File::Definitions.add_field 72, 2, 'product', :type => :uint16 +Fit::File::Definitions.add_field 72, 2, 'garmin_product', :type => :garmin_product, :ref_field_name => 'manufacturer', :ref_field_values => [:garmin, :dynastream, :dynastream_oem] +Fit::File::Definitions.add_field 72, 3, 'serial_number', :type => :uint32z +Fit::File::Definitions.add_field 72, 4, 'time_created', :type => :date_time + +Fit::File::Definitions.add_name 78, 'hrv' +Fit::File::Definitions.add_field 78, 0, 'time', :type => :uint16, :scale => 1000, :unit => 's' + +# 80 +# 81 +# 82 + +Fit::File::Definitions.add_name 101, 'length' +Fit::File::Definitions.add_field 101, 254, 'message_index', :type => :message_index, :scale => 1 +Fit::File::Definitions.add_field 101, 253, 'timestamp', :type => :date_time, :scale => 1 +Fit::File::Definitions.add_field 101, 0, 'event', :type => :event +Fit::File::Definitions.add_field 101, 1, 'event_type', :type => :event_type +Fit::File::Definitions.add_field 101, 2, 'start_time', :type => :date_time, :scale => 1 +Fit::File::Definitions.add_field 101, 3, 'total_elapsed_time', :type => :uint32, :scale => 1000, :unit => 's' +Fit::File::Definitions.add_field 101, 4, 'total_timer_time', :type => :uint32, :scale => 1000, :unit => 's' +Fit::File::Definitions.add_field 101, 5, 'total_strokes', :type => :uint16, :scale => 1, :unit => 'strokes' +Fit::File::Definitions.add_field 101, 6, 'avg_speed', :type => :uint16, :scale => 1000, :unit => 'm/s' +Fit::File::Definitions.add_field 101, 7, 'swim_stroke', :type => :swim_stroke, :unit => 'swim_stroke' +Fit::File::Definitions.add_field 101, 9, 'avg_swimming_cadence', :type => :uint8, :unit => 'strokes/min' +Fit::File::Definitions.add_field 101, 10, 'event_group', :type => :uint8 +Fit::File::Definitions.add_field 101, 11, 'total_calories', :type => :uint16, :unit => 'kcal' +Fit::File::Definitions.add_field 101, 12, 'length_type', :type => :length_type +Fit::File::Definitions.add_field 101, 18, 'player_score', :type => :uint16 +Fit::File::Definitions.add_field 101, 19, 'opponent_score', :type => :uint16 +Fit::File::Definitions.add_field 101, 20, 'stroke_count', :type => :uint16, :unit => 'counts' +Fit::File::Definitions.add_field 101, 21, 'zone_count', :type => :uint16, :unit => 'counts' + +Fit::File::Definitions.add_name 103, 'monitoring_info' +Fit::File::Definitions.add_field 103, 253, 'timestamp', :type => :date_time +Fit::File::Definitions.add_field 103, 0, 'local_timestamp', :type => :local_date_time +Fit::File::Definitions.add_field 103, 1, 'activity_type', :type => :activity_type +Fit::File::Definitions.add_field 103, 3, 'cycles_to_distance', :type => :uint16, :scale => 5000, :unit => 'm/cycle' +Fit::File::Definitions.add_field 103, 4, 'cycles_to_calories', :type => :uint16, :scale => 5000, :unit => 'kcal/cycle' +Fit::File::Definitions.add_field 103, 5, 'resting_metabolic_rate', :type => :uint16, :unit => 'kcal / day' + +# 105 + +Fit::File::Definitions.add_name 106, 'slave_device' +Fit::File::Definitions.add_field 106, 0, 'manufacturer', :type => :manufacturer +Fit::File::Definitions.add_field 106, 1, 'product', :type => :uint16 +Fit::File::Definitions.add_field 106, 1, 'garmin_product', :type => :garmin_product, :ref_field_name => 'manufacturer', :ref_field_values => [:garmin, :dynastream, :dynastream_oem] + +# 127 +# 128 +# 129 + +Fit::File::Definitions.add_name 131, 'cadence_zone' +Fit::File::Definitions.add_field 131, 254, 'message_index', :type => :message_index, :scale => 1 +Fit::File::Definitions.add_field 131, 0, 'high_value', :type => :uint8, :scale => 1, :unit => 'rpm' +Fit::File::Definitions.add_field 131, 1, 'name', :type => :string, :scale => 1 + +# 132 +# 142 + Fit::File::Definitions.add_name 145, 'memo_glob' Fit::File::Definitions.add_field 145, 250, 'part_index', :type => :uint32 Fit::File::Definitions.add_field 145, 0, 'memo', :type => :byte Fit::File::Definitions.add_field 145, 1, 'message_number', :type => :uint16 Fit::File::Definitions.add_field 145, 2, 'message_index', :type => :message_index + +# 148 +# 149 +# 150 +# 151 +# 158 +# 159 +# 160 +# 161 +# 162 +# 164 +# 165 +# 167 +# 169 +# 174 +# 177 +# 178 +# 184 +# 185 +# 186 +# 187 +# 188 +# 200 +# 201 +# 202 + +Fit::File::Definitions.add_name 206, 'field_description' +Fit::File::Definitions.add_field 206, 0, 'developer_data_index', :type => :uint8 +Fit::File::Definitions.add_field 206, 1, 'field_definition_number', :type => :uint8 +Fit::File::Definitions.add_field 206, 2, 'fit_base_type_id ', :type => :fit_base_type +Fit::File::Definitions.add_field 206, 3, 'field_name ', :type => :string +Fit::File::Definitions.add_field 206, 4, 'array', :type => :uint8 +Fit::File::Definitions.add_field 206, 5, 'components ', :type => :string +Fit::File::Definitions.add_field 206, 6, 'scale', :type => :uint8 +Fit::File::Definitions.add_field 206, 7, 'offset ', :type => :sint8 +Fit::File::Definitions.add_field 206, 8, 'units', :type => :string +Fit::File::Definitions.add_field 206, 9, 'bits ', :type => :string +Fit::File::Definitions.add_field 206, 10, 'accumulate ', :type => :string +Fit::File::Definitions.add_field 206, 13, 'fit_base_unit_id ', :type => :fit_base_unit +Fit::File::Definitions.add_field 206, 14, 'native_mesg_num', :type => :mesg_num +Fit::File::Definitions.add_field 206, 15, 'native_field_num ', :type => :uint8 + +Fit::File::Definitions.add_name 207, 'developer_data_id' +Fit::File::Definitions.add_field 207, 0, 'developer_id ', :type => :byte +Fit::File::Definitions.add_field 207, 1, 'application_id ', :type => :byte +Fit::File::Definitions.add_field 207, 2, 'manufacturer_id', :type => :manufacturer +Fit::File::Definitions.add_field 207, 3, 'developer_data_index ', :type => :uint8 +Fit::File::Definitions.add_field 207, 4, 'application_version', :type => :uint32 + +# 208 # ============================================================================= # Warning, the definition below are not part of the official fit format # definition. They have been obtained by deduction from Garmin Swim files # =============================================================================