UNPKG

fit-file-parser

Version:

Parse your .FIT files easily, directly from JS (Garmin, Polar, Suunto)

1,763 lines 268 kB
const metersInOneKilometer = 1000; const secondsInOneHour = 3600; // according to https://en.wikipedia.org/wiki/Mile const metersInOneMile = 1609.344; const centiBarsInOneBar = 100; const psiInOneBar = 14.5037738; // TODO we dont have comprehensive output types bc its a bit cumbersome to maintain typescript types and this giant mapping object // which contains all the types and values // i would wish for some kind of inference mechanism here but for now we leave it as any // maybe zod could help here export const FIT = { scConst: 180 / Math.pow(2, 31), options: { speedUnits: { // native speed unit: meters per second [m/s] 'm/s': { multiplier: 1, offset: 0, }, // miles per hour [mph] 'mph': { multiplier: secondsInOneHour / metersInOneMile, offset: 0, }, // kilometers per hour [km/h] 'km/h': { multiplier: secondsInOneHour / metersInOneKilometer, offset: 0, }, }, lengthUnits: { // native length unit: meters [m] m: { multiplier: 1, offset: 0, }, // (international) mile [mi] mi: { multiplier: 1 / metersInOneMile, offset: 0, }, // kilometer [km] km: { multiplier: 1 / metersInOneKilometer, offset: 0, }, }, temperatureUnits: { // native temperature unit: degree Celsius [°C] '°C': { multiplier: 1, offset: 0, }, // kelvin [K] 'kelvin': { multiplier: 1, offset: -273.15, }, // degree fahrenheit [°F] 'fahrenheit': { multiplier: 9 / 5, offset: 32, }, }, pressureUnits: { cbar: { multiplier: 1, offset: 0, }, bar: { multiplier: 1 / centiBarsInOneBar, offset: 0, }, psi: { multiplier: (1 / centiBarsInOneBar) * psiInOneBar, offset: 0, }, }, }, messages: { 0: { name: 'file_id', 0: { field: 'type', type: 'file', scale: null, offset: 0, units: '' }, 1: { field: 'manufacturer', type: 'manufacturer', scale: null, offset: 0, units: '', }, 2: { field: 'product', type: 'uint16', scale: null, offset: 0, units: '', }, 3: { field: 'serial_number', type: 'uint32z', scale: null, offset: 0, units: '', }, 4: { field: 'time_created', type: 'date_time', scale: null, offset: 0, units: '', }, 5: { field: 'number', type: 'uint16', scale: null, offset: 0, units: '' }, 8: { field: 'product_name', type: 'string', scale: null, offset: 0, units: '', }, }, 1: { name: 'capabilities', 0: { field: 'languages', type: 'uint8z', scale: null, offset: 0, units: '', }, 1: { field: 'sports', type: 'sport_bits_0', scale: null, offset: 0, units: '', }, 21: { field: 'workouts_supported', type: 'workout_capabilities', scale: null, offset: 0, units: '', }, 23: { field: 'connectivity_supported', type: 'connectivity_capabilities', scale: null, offset: 0, units: '', }, }, 2: { name: 'device_settings', 0: { field: 'active_time_zone', type: 'uint8', scale: null, offset: 0, units: '', }, 1: { field: 'utc_offset', type: 'uint32', scale: null, offset: 0, units: '', }, 2: { field: 'time_offset', type: 'uint32', scale: null, offset: 0, units: 's', }, 5: { field: 'time_zone_offset', type: 'sint8', scale: 4, offset: 0, units: 'hr', }, 55: { field: 'display_orientation', type: 'display_orientation', scale: null, offset: 0, units: '', }, 56: { field: 'mounting_side', type: 'side', scale: null, offset: 0, units: '', }, 94: { field: 'number_of_screens', type: 'uint8', scale: null, offset: 0, units: '', }, 95: { field: 'smart_notification_display_orientation', type: 'display_orientation', scale: null, offset: 0, units: '', }, }, 3: { name: 'user_profile', 254: { field: 'message_index', type: 'message_index', scale: null, offset: 0, units: '', }, 0: { field: 'friendly_name', type: 'string', scale: null, offset: 0, units: '', }, 1: { field: 'gender', type: 'gender', scale: null, offset: 0, units: '' }, 2: { field: 'age', type: 'uint8', scale: null, offset: 0, units: 'years', }, 3: { field: 'height', type: 'uint8', scale: 100, offset: 0, units: 'm' }, 4: { field: 'weight', type: 'uint16', scale: 10, offset: 0, units: 'kg' }, 5: { field: 'language', type: 'language', scale: null, offset: 0, units: '', }, 6: { field: 'elev_setting', type: 'display_measure', scale: null, offset: 0, units: '', }, 7: { field: 'weight_setting', type: 'display_measure', scale: null, offset: 0, units: '', }, 8: { field: 'resting_heart_rate', type: 'uint8', scale: null, offset: 0, units: 'bpm', }, 9: { field: 'default_max_running_heart_rate', type: 'uint8', scale: null, offset: 0, units: 'bpm', }, 10: { field: 'default_max_biking_heart_rate', type: 'uint8', scale: null, offset: 0, units: 'bpm', }, 11: { field: 'default_max_heart_rate', type: 'uint8', scale: null, offset: 0, units: 'bpm', }, 12: { field: 'hr_setting', type: 'display_heart', scale: null, offset: 0, units: '', }, 13: { field: 'speed_setting', type: 'display_measure', scale: null, offset: 0, units: '', }, 14: { field: 'dist_setting', type: 'display_measure', scale: null, offset: 0, units: '', }, 16: { field: 'power_setting', type: 'display_power', scale: null, offset: 0, units: '', }, 17: { field: 'activity_class', type: 'activity_class', scale: null, offset: 0, units: '', }, 18: { field: 'position_setting', type: 'display_position', scale: null, offset: 0, units: '', }, 21: { field: 'temperature_setting', type: 'display_measure', scale: null, offset: 0, units: '', }, 22: { field: 'local_id', type: 'user_local_id', scale: null, offset: 0, units: '', }, 23: { field: 'global_id', type: 'byte', scale: null, offset: 0, units: '', }, 28: { field: 'wake_time', type: 'localtime_into_day', scale: null, offset: 0, units: '', }, 29: { field: 'sleep_time', type: 'localtime_into_day', scale: null, offset: 0, units: '', }, 30: { field: 'height_setting', type: 'display_measure', scale: null, offset: 0, units: '', }, }, 4: { name: 'hrm_profile', 254: { field: 'message_index', type: 'message_index', scale: null, offset: 0, units: '', }, 0: { field: 'enabled', type: 'bool', scale: null, offset: 0, units: '' }, 1: { field: 'hrm_ant_id', type: 'uint16z', scale: null, offset: 0, units: '', }, 2: { field: 'log_hrv', type: 'bool', scale: null, offset: 0, units: '' }, 3: { field: 'hrm_ant_id_trans_type', type: 'uint8z', scale: null, offset: 0, units: '', }, }, 5: { name: 'sdm_profile', 254: { field: 'message_index', type: 'message_index', scale: null, offset: 0, units: '', }, 0: { field: 'enabled', type: 'bool', scale: null, offset: 0, units: '' }, 1: { field: 'sdm_ant_id', type: 'uint16z', scale: null, offset: 0, units: '', }, 2: { field: 'sdm_cal_factor', type: 'uint16', scale: 10, offset: 0, units: '%', }, 3: { field: 'odometer', type: 'uint32', scale: 100, offset: 0, units: 'm', }, 4: { field: 'speed_source', type: 'bool', scale: null, offset: 0, units: '', }, 5: { field: 'sdm_ant_id_trans_type', type: 'uint8z', scale: null, offset: 0, units: '', }, 7: { field: 'odometer_rollover', type: 'uint8', scale: null, offset: 0, units: '', }, }, 6: { name: 'bike_profile', 254: { field: 'message_index', type: 'message_index', scale: null, offset: 0, units: '', }, 0: { field: 'name', type: 'string', scale: null, offset: 0, units: '' }, 1: { field: 'sport', type: 'sport', scale: null, offset: 0, units: '' }, 2: { field: 'sub_sport', type: 'sub_sport', scale: null, offset: 0, units: '', }, 3: { field: 'odometer', type: 'uint32', scale: 100, offset: 0, units: 'm', }, 4: { field: 'bike_spd_ant_id', type: 'uint16z', scale: null, offset: 0, units: '', }, 5: { field: 'bike_cad_ant_id', type: 'uint16z', scale: null, offset: 0, units: '', }, 6: { field: 'bike_spdcad_ant_id', type: 'uint16z', scale: null, offset: 0, units: '', }, 7: { field: 'bike_power_ant_id', type: 'uint16z', scale: null, offset: 0, units: '', }, 8: { field: 'custom_wheelsize', type: 'uint16', scale: 1000, offset: 0, units: 'm', }, 9: { field: 'auto_wheelsize', type: 'uint16', scale: 1000, offset: 0, units: 'm', }, 10: { field: 'bike_weight', type: 'uint16', scale: 10, offset: 0, units: 'kg', }, 11: { field: 'power_cal_factor', type: 'uint16', scale: 10, offset: 0, units: '%', }, 12: { field: 'auto_wheel_cal', type: 'bool', scale: null, offset: 0, units: '', }, 13: { field: 'auto_power_zero', type: 'bool', scale: null, offset: 0, units: '', }, 14: { field: 'id', type: 'uint8', scale: null, offset: 0, units: '' }, 15: { field: 'spd_enabled', type: 'bool', scale: null, offset: 0, units: '', }, 16: { field: 'cad_enabled', type: 'bool', scale: null, offset: 0, units: '', }, 17: { field: 'spdcad_enabled', type: 'bool', scale: null, offset: 0, units: '', }, 18: { field: 'power_enabled', type: 'bool', scale: null, offset: 0, units: '', }, 19: { field: 'crank_length', type: 'uint8', scale: 2, offset: -110, units: 'mm', }, 20: { field: 'enabled', type: 'bool', scale: null, offset: 0, units: '' }, 21: { field: 'bike_spd_ant_id_trans_type', type: 'uint8z', scale: null, offset: 0, units: '', }, 22: { field: 'bike_cad_ant_id_trans_type', type: 'uint8z', scale: null, offset: 0, units: '', }, 23: { field: 'bike_spdcad_ant_id_trans_type', type: 'uint8z', scale: null, offset: 0, units: '', }, 24: { field: 'bike_power_ant_id_trans_type', type: 'uint8z', scale: null, offset: 0, units: '', }, 37: { field: 'odometer_rollover', type: 'uint8', scale: null, offset: 0, units: '', }, 38: { field: 'front_gear_num', type: 'uint8z', scale: null, offset: 0, units: '', }, 39: { field: 'front_gear', type: 'uint8z', scale: null, offset: 0, units: '', }, 40: { field: 'rear_gear_num', type: 'uint8z', scale: null, offset: 0, units: '', }, 41: { field: 'rear_gear', type: 'uint8z', scale: null, offset: 0, units: '', }, 44: { field: 'shimano_di2_enabled', type: 'bool', scale: null, offset: 0, units: '', }, }, 7: { name: 'zones_target', 1: { field: 'max_heart_rate', type: 'uint8', scale: null, offset: 0, units: '', }, 2: { field: 'threshold_heart_rate', type: 'uint8', scale: null, offset: 0, units: '', }, 3: { field: 'functional_threshold_power', type: 'uint16', scale: null, offset: 0, units: '', }, 5: { field: 'hr_calc_type', type: 'hr_zone_calc', scale: null, offset: 0, units: '', }, 7: { field: 'pwr_calc_type', type: 'pwr_zone_calc', scale: null, offset: 0, units: '', }, }, 8: { name: 'hr_zone', 254: { field: 'message_index', type: 'message_index', scale: null, offset: 0, units: '', }, 1: { field: 'high_bpm', type: 'uint8', scale: null, offset: 0, units: 'bpm', }, 2: { field: 'name', type: 'string', scale: null, offset: 0, units: '' }, }, 9: { name: 'power_zone', 254: { field: 'message_index', type: 'message_index', scale: null, offset: 0, units: '', }, 1: { field: 'high_value', type: 'uint16', scale: null, offset: 0, units: 'watts', }, 2: { field: 'name', type: 'string', scale: null, offset: 0, units: '' }, }, 10: { name: 'met_zone', 254: { field: 'message_index', type: 'message_index', scale: null, offset: 0, units: '', }, 1: { field: 'high_bpm', type: 'uint8', scale: null, offset: 0, units: '', }, 2: { field: 'calories', type: 'uint16', scale: 10, offset: 0, units: 'kcal / min', }, 3: { field: 'fat_calories', type: 'uint8', scale: 10, offset: 0, units: 'kcal / min', }, }, 12: { name: 'sport', 0: { field: 'sport', type: 'sport', scale: null, offset: 0, units: '' }, 1: { field: 'sub_sport', type: 'sub_sport', scale: null, offset: 0, units: '', }, 3: { field: 'name', type: 'string', scale: null, offset: 0, units: '' }, }, 15: { name: 'goal', 254: { field: 'message_index', type: 'message_index', scale: null, offset: 0, units: '', }, 0: { field: 'sport', type: 'sport', scale: null, offset: 0, units: '' }, 1: { field: 'sub_sport', type: 'sub_sport', scale: null, offset: 0, units: '', }, 2: { field: 'start_date', type: 'date_time', scale: null, offset: 0, units: '', }, 3: { field: 'end_date', type: 'date_time', scale: null, offset: 0, units: '', }, 4: { field: 'type', type: 'goal', scale: null, offset: 0, units: '' }, 5: { field: 'value', type: 'uint32', scale: null, offset: 0, units: '' }, 6: { field: 'repeat', type: 'bool', scale: null, offset: 0, units: '' }, 7: { field: 'target_value', type: 'uint32', scale: null, offset: 0, units: '', }, 8: { field: 'recurrence', type: 'goal_recurrence', scale: null, offset: 0, units: '', }, 9: { field: 'recurrence_value', type: 'uint16', scale: null, offset: 0, units: '', }, 10: { field: 'enabled', type: 'bool', scale: null, offset: 0, units: '' }, }, 18: { name: 'session', 254: { field: 'message_index', type: 'message_index', scale: null, offset: 0, units: '', }, 253: { field: 'timestamp', type: 'date_time', scale: null, offset: 0, units: 's', }, 0: { field: 'event', type: 'event', scale: null, offset: 0, units: '' }, 1: { field: 'event_type', type: 'event_type', scale: null, offset: 0, units: '', }, 2: { field: 'start_time', type: 'date_time', scale: null, offset: 0, units: '', }, 3: { field: 'start_position_lat', type: 'sint32', scale: null, offset: 0, units: 'semicircles', }, 4: { field: 'start_position_long', type: 'sint32', scale: null, offset: 0, units: 'semicircles', }, 5: { field: 'sport', type: 'sport', scale: null, offset: 0, units: '' }, 6: { field: 'sub_sport', type: 'sub_sport', scale: null, offset: 0, units: '', }, 7: { field: 'total_elapsed_time', type: 'uint32', scale: 1000, offset: 0, units: 's', }, 8: { field: 'total_timer_time', type: 'uint32', scale: 1000, offset: 0, units: 's', }, 9: { field: 'total_distance', type: 'uint32', scale: 100, offset: 0, units: 'm', }, 10: { field: 'total_cycles', type: 'uint32', scale: null, offset: 0, units: 'cycles', }, 11: { field: 'total_calories', type: 'uint16', scale: null, offset: 0, units: 'kcal', }, 13: { field: 'total_fat_calories', type: 'uint16', scale: null, offset: 0, units: 'kcal', }, 14: { field: 'avg_speed', type: 'uint16', scale: 1000, offset: 0, units: 'm/s', }, 15: { field: 'max_speed', type: 'uint16', scale: 1000, offset: 0, units: 'm/s', }, 16: { field: 'avg_heart_rate', type: 'uint8', scale: null, offset: 0, units: 'bpm', }, 17: { field: 'max_heart_rate', type: 'uint8', scale: null, offset: 0, units: 'bpm', }, 18: { field: 'avg_cadence', type: 'uint8', scale: null, offset: 0, units: 'rpm', }, 19: { field: 'max_cadence', type: 'uint8', scale: null, offset: 0, units: 'rpm', }, 20: { field: 'avg_power', type: 'uint16', scale: null, offset: 0, units: 'watts', }, 21: { field: 'max_power', type: 'uint16', scale: null, offset: 0, units: 'watts', }, 22: { field: 'total_ascent', type: 'uint16', scale: null, offset: 0, units: 'm', }, 23: { field: 'total_descent', type: 'uint16', scale: null, offset: 0, units: 'm', }, 24: { field: 'total_training_effect', type: 'uint8', scale: 10, offset: 0, units: '', }, 25: { field: 'first_lap_index', type: 'uint16', scale: null, offset: 0, units: '', }, 26: { field: 'num_laps', type: 'uint16', scale: null, offset: 0, units: '', }, 27: { field: 'event_group', type: 'uint8', scale: null, offset: 0, units: '', }, 28: { field: 'trigger', type: 'session_trigger', scale: null, offset: 0, units: '', }, 29: { field: 'nec_lat', type: 'sint32', scale: null, offset: 0, units: 'semicircles', }, 30: { field: 'nec_long', type: 'sint32', scale: null, offset: 0, units: 'semicircles', }, 31: { field: 'swc_lat', type: 'sint32', scale: null, offset: 0, units: 'semicircles', }, 32: { field: 'swc_long', type: 'sint32', scale: null, offset: 0, units: 'semicircles', }, 34: { field: 'normalized_power', type: 'uint16', scale: null, offset: 0, units: 'watts', }, 35: { field: 'training_stress_score', type: 'uint16', scale: 10, offset: 0, units: 'tss', }, 36: { field: 'intensity_factor', type: 'uint16', scale: 1000, offset: 0, units: 'if', }, 37: { field: 'left_right_balance', type: 'left_right_balance_100', scale: 100, offset: 0, units: '%', }, 38: { field: 'end_position_lat', type: 'sint32', scale: null, offset: 0, units: 'semicircles', }, 39: { field: 'end_position_long', type: 'sint32', scale: null, offset: 0, units: 'semicircles', }, 41: { field: 'avg_stroke_count', type: 'uint32', scale: 10, offset: 0, units: 'strokes/lap', }, 42: { field: 'avg_stroke_distance', type: 'uint16', scale: 100, offset: 0, units: 'm', }, 43: { field: 'swim_stroke', type: 'swim_stroke', scale: null, offset: 0, units: 'swim_stroke', }, 44: { field: 'pool_length', type: 'uint16', scale: 100, offset: 0, units: 'm', }, 45: { field: 'threshold_power', type: 'uint16', scale: null, offset: 0, units: 'watts', }, 46: { field: 'pool_length_unit', type: 'display_measure', scale: null, offset: 0, units: '', }, 47: { field: 'num_active_lengths', type: 'uint16', scale: null, offset: 0, units: 'lengths', }, 48: { field: 'total_work', type: 'uint32', scale: null, offset: 0, units: 'J', }, 49: { field: 'avg_altitude', type: 'uint16', scale: 5, offset: -500, units: 'm', }, 50: { field: 'max_altitude', type: 'uint16', scale: 5, offset: -500, units: 'm', }, 51: { field: 'gps_accuracy', type: 'uint8', scale: null, offset: 0, units: 'm', }, 52: { field: 'avg_grade', type: 'sint16', scale: 100, offset: 0, units: '%', }, 53: { field: 'avg_pos_grade', type: 'sint16', scale: 100, offset: 0, units: '%', }, 54: { field: 'avg_neg_grade', type: 'sint16', scale: 100, offset: 0, units: '%', }, 55: { field: 'max_pos_grade', type: 'sint16', scale: 100, offset: 0, units: '%', }, 56: { field: 'max_neg_grade', type: 'sint16', scale: 100, offset: 0, units: '%', }, 57: { field: 'avg_temperature', type: 'sint8', scale: null, offset: 0, units: 'C', }, 58: { field: 'max_temperature', type: 'sint8', scale: null, offset: 0, units: 'C', }, 59: { field: 'total_moving_time', type: 'uint32', scale: 1000, offset: 0, units: 's', }, 60: { field: 'avg_pos_vertical_speed', type: 'uint16', scale: 1000, offset: 0, units: 'm/s', }, 61: { field: 'avg_neg_vertical_speed', type: 'uint16', scale: 1000, offset: 0, units: 'm/s', }, 62: { field: 'max_pos_vertical_speed', type: 'uint16', scale: 1000, offset: 0, units: 'm/s', }, 63: { field: 'max_neg_vertical_speed', type: 'uint16', scale: 1000, offset: 0, units: 'm/s', }, 64: { field: 'min_heart_rate', type: 'uint8', scale: null, offset: 0, units: 'bpm', }, 65: { field: 'time_in_hr_zone', type: 'uint32_array', scale: 1000, offset: 0, units: 's', }, 66: { field: 'time_in_speed_zone', type: 'uint32_array', scale: 1000, offset: 0, units: 's', }, 67: { field: 'time_in_cadence_zone', type: 'uint32_array', scale: 1000, offset: 0, units: 's', }, 68: { field: 'time_in_power_zone', type: 'uint32_array', scale: 1000, offset: 0, units: 's', }, 69: { field: 'avg_lap_time', type: 'uint32', scale: 1000, offset: 0, units: 's', }, 70: { field: 'best_lap_index', type: 'uint16', scale: null, offset: 0, units: '', }, 71: { field: 'min_altitude', type: 'uint16', scale: 5, offset: -500, units: 'm', }, 82: { field: 'player_score', type: 'uint16', scale: null, offset: 0, units: '', }, 83: { field: 'opponent_score', type: 'uint16', scale: null, offset: 0, units: '', }, 84: { field: 'opponent_name', type: 'string', scale: null, offset: 0, units: '', }, 85: { field: 'stroke_count', type: 'uint16', scale: null, offset: 0, units: 'counts', }, 86: { field: 'zone_count', type: 'uint16', scale: null, offset: 0, units: 'counts', }, 87: { field: 'max_ball_speed', type: 'uint16', scale: 100, offset: 0, units: 'm/s', }, 88: { field: 'avg_ball_speed', type: 'uint16', scale: 100, offset: 0, units: 'm/s', }, 89: { field: 'avg_vertical_oscillation', type: 'uint16', scale: 10, offset: 0, units: 'mm', }, 90: { field: 'avg_stance_time_percent', type: 'uint16', scale: 100, offset: 0, units: 'percent', }, 91: { field: 'avg_stance_time', type: 'uint16', scale: 10, offset: 0, units: 'ms', }, 92: { field: 'avg_fractional_cadence', type: 'uint8', scale: 128, offset: 0, units: 'rpm', }, 93: { field: 'max_fractional_cadence', type: 'uint8', scale: 128, offset: 0, units: 'rpm', }, 94: { field: 'total_fractional_cycles', type: 'uint8', scale: 128, offset: 0, units: 'cycles', }, 95: { field: 'avg_total_hemoglobin_conc', type: 'uint16', scale: 100, offset: 0, units: 'g/dL', }, 96: { field: 'min_total_hemoglobin_conc', type: 'uint16', scale: 100, offset: 0, units: 'g/dL', }, 97: { field: 'max_total_hemoglobin_conc', type: 'uint16', scale: 100, offset: 0, units: 'g/dL', }, 98: { field: 'avg_saturated_hemoglobin_percent', type: 'uint16', scale: 10, offset: 0, units: '%', }, 99: { field: 'min_saturated_hemoglobin_percent', type: 'uint16', scale: 10, offset: 0, units: '%', }, 100: { field: 'max_saturated_hemoglobin_percent', type: 'uint16', scale: 10, offset: 0, units: '%', }, 101: { field: 'avg_left_torque_effectiveness', type: 'uint8', scale: 2, offset: 0, units: 'percent', }, 102: { field: 'avg_right_torque_effectiveness', type: 'uint8', scale: 2, offset: 0, units: 'percent', }, 103: { field: 'avg_left_pedal_smoothness', type: 'uint8', scale: 2, offset: 0, units: 'percent', }, 104: { field: 'avg_right_pedal_smoothness', type: 'uint8', scale: 2, offset: 0, units: 'percent', }, 105: { field: 'avg_combined_pedal_smoothness', type: 'uint8', scale: 2, offset: 0, units: 'percent', }, 111: { field: 'sport_index', type: 'uint8', scale: null, offset: 0, units: '', }, 112: { field: 'time_standing', type: 'uint32', scale: 1000, offset: 0, units: 's', }, 113: { field: 'stand_count', type: 'uint16', scale: null, offset: 0, units: '', }, 114: { field: 'avg_left_pco', type: 'sint8', scale: null, offset: 0, units: 'mm', }, 115: { field: 'avg_right_pco', type: 'sint8', scale: null, offset: 0, units: 'mm', }, 116: { field: 'avg_left_power_phase', type: 'uint8', scale: 0.7111111, offset: 0, units: 'degrees', }, 117: { field: 'avg_left_power_phase_peak', type: 'uint8', scale: 0.7111111, offset: 0, units: 'degrees', }, 118: { field: 'avg_right_power_phase', type: 'uint8', scale: 0.7111111, offset: 0, units: 'degrees', }, 119: { field: 'avg_right_power_phase_peak', type: 'uint8', scale: 0.7111111, offset: 0, units: 'degrees', }, 120: { field: 'avg_power_position', type: 'uint16', scale: null, offset: 0, units: 'watts', }, 121: { field: 'max_power_position', type: 'uint16', scale: null, offset: 0, units: 'watts', }, 122: { field: 'avg_cadence_position', type: 'uint8', scale: null, offset: 0, units: 'rpm', }, 123: { field: 'max_cadence_position', type: 'uint8', scale: null, offset: 0, units: 'rpm', }, 124: { field: 'enhanced_avg_speed', type: 'uint32', scale: 1000, offset: 0, units: 'm/s', }, 125: { field: 'enhanced_max_speed', type: 'uint32', scale: 1000, offset: 0, units: 'm/s', }, 126: { field: 'enhanced_avg_altitude', type: 'uint32', scale: 5, offset: -500, units: 'm', }, 127: { field: 'enhanced_min_altitude', type: 'uint32', scale: 5, offset: -500, units: 'm', }, 128: { field: 'enhanced_max_altitude', type: 'uint32', scale: 5, offset: -500, units: 'm', }, 129: { field: 'avg_lev_motor_power', type: 'uint16', scale: null, offset: 0, units: 'watts', }, 130: { field: 'max_lev_motor_power', type: 'uint16', scale: null, offset: 0, units: 'watts', }, 131: { field: 'lev_battery_consumption', type: 'uint8', scale: 2, offset: 0, units: 'percent', }, 132: { field: 'avg_vertical_ratio', type: 'uint16', scale: 100, offset: 0, units: 'percent', }, 133: { field: 'avg_stance_time_balance', type: 'uint16', scale: 100, offset: 0, units: 'percent', }, 134: { field: 'avg_step_length', type: 'uint16', scale: 10, offset: 0, units: 'mm', }, 137: { field: 'total_anaerobic_training_effect', type: 'uint8', scale: 10, offset: 0, units: '', }, 139: { field: 'avg_vam', type: 'uint16', scale: 1, // Raw 100 -> 100 (User specific m/h) offset: 0, units: 'm/h', }, 192: { field: 'workout_feel', type: 'uint8', scale: null, offset: 0, units: '', }, 193: { field: 'workout_rpe', type: 'uint8', scale: 10, offset: 0, units: '', }, 110: { field: 'sport_profile_name', type: 'string', scale: null, offset: 0, units: '', }, 168: { field: 'training_load_peak', type: 'uint32', scale: 1, offset: 0, units: '', }, 169: { field: 'enhanced_avg_respiration_rate', type: 'uint16', scale: 100, offset: 0, units: 'breaths/min', }, 150: { field: 'min_temperature', type: 'sint8', scale: null, offset: 0, units: 'C', }, 170: { field: 'enhanced_max_respiration_rate', type: 'uint16', scale: 100, offset: 0, units: 'breaths/min', }, 178: { field: 'est_sweat_loss', type: 'uint16', scale: 1, // ml offset: 0, units: 'ml', }, 180: { field: 'enhanced_min_respiration_rate', type: 'uint16', scale: 100, offset: 0, units: 'breaths/min', }, 181: { field: 'total_grit', type: 'float32', scale: 1, offset: 0, units: 'kGrit', }, 182: { field: 'total_flow', type: 'float32', scale: 1, offset: 0, units: 'Flow', }, 183: { field: 'jump_count', type: 'uint16', scale: 1, offset: 0, units: '', }, 186: { field: 'avg_grit', type: 'float32', scale: 1, offset: 0, units: 'kGrit', }, 187: { field: 'avg_flow', type: 'float32', scale: 1, offset: 0, units: 'Flow', }, 188: { field: 'primary_benefi