fit-file-parser 3.0.0 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -102,6 +102,8 @@ class FitParser {
102
102
  const tank_updates = [];
103
103
  const tank_summaries = [];
104
104
  const jumps = [];
105
+ const splits = [];
106
+ const split_summaries = [];
105
107
  const time_in_zone = [];
106
108
  const activity_metrics = [];
107
109
  const user_metrics = [];
@@ -203,6 +205,12 @@ class FitParser {
203
205
  case 'jump':
204
206
  jumps.push(message);
205
207
  break;
208
+ case 'split':
209
+ splits.push(message);
210
+ break;
211
+ case 'split_summary':
212
+ split_summaries.push(message);
213
+ break;
206
214
  case 'time_in_zone':
207
215
  time_in_zone.push(message);
208
216
  break;
@@ -232,6 +240,8 @@ class FitParser {
232
240
  fitObj.tank_updates = tank_updates;
233
241
  fitObj.tank_summaries = tank_summaries;
234
242
  fitObj.jumps = jumps;
243
+ fitObj.splits = splits;
244
+ fitObj.split_summaries = split_summaries;
235
245
  fitObj.time_in_zone = time_in_zone;
236
246
  fitObj.activity_metrics = activity_metrics;
237
247
  fitObj.user_metrics = user_metrics;
@@ -243,7 +253,9 @@ class FitParser {
243
253
  sessions,
244
254
  events,
245
255
  hrv,
246
- device_infos, developer_data_ids: applications, field_descriptions: fieldDescriptions, sports });
256
+ device_infos, developer_data_ids: applications, field_descriptions: fieldDescriptions, sports,
257
+ splits,
258
+ split_summaries });
247
259
  }
248
260
  if (!isModeCascade) {
249
261
  fitObj.sessions = sessions;
package/dist/cjs/fit.js CHANGED
@@ -1776,6 +1776,27 @@ exports.FIT = {
1776
1776
  offset: 0,
1777
1777
  units: 'kcal',
1778
1778
  },
1779
+ 205: {
1780
+ field: 'beginning_potential_stamina',
1781
+ type: 'uint8',
1782
+ scale: 1,
1783
+ offset: 0,
1784
+ units: 'percent',
1785
+ },
1786
+ 206: {
1787
+ field: 'ending_potential_stamina',
1788
+ type: 'uint8',
1789
+ scale: 1,
1790
+ offset: 0,
1791
+ units: 'percent',
1792
+ },
1793
+ 207: {
1794
+ field: 'min_stamina',
1795
+ type: 'uint8',
1796
+ scale: 1,
1797
+ offset: 0,
1798
+ units: 'percent',
1799
+ },
1779
1800
  214: {
1780
1801
  field: 'avg_grit',
1781
1802
  type: 'float32',
@@ -3004,6 +3025,292 @@ exports.FIT = {
3004
3025
  offset: 0,
3005
3026
  units: 'percent',
3006
3027
  },
3028
+ 137: {
3029
+ field: 'potential_stamina',
3030
+ type: 'uint8',
3031
+ scale: 1,
3032
+ offset: 0,
3033
+ units: 'percent',
3034
+ },
3035
+ 138: {
3036
+ field: 'stamina',
3037
+ type: 'uint8',
3038
+ scale: 1,
3039
+ offset: 0,
3040
+ units: 'percent',
3041
+ },
3042
+ },
3043
+ 312: {
3044
+ name: 'split',
3045
+ 254: {
3046
+ field: 'message_index',
3047
+ type: 'message_index',
3048
+ scale: null,
3049
+ offset: 0,
3050
+ units: '',
3051
+ },
3052
+ 0: {
3053
+ field: 'split_type',
3054
+ type: 'split_type',
3055
+ scale: null,
3056
+ offset: 0,
3057
+ units: '',
3058
+ },
3059
+ 1: {
3060
+ field: 'total_elapsed_time',
3061
+ type: 'uint32',
3062
+ scale: 1000,
3063
+ offset: 0,
3064
+ units: 's',
3065
+ },
3066
+ 2: {
3067
+ field: 'total_timer_time',
3068
+ type: 'uint32',
3069
+ scale: 1000,
3070
+ offset: 0,
3071
+ units: 's',
3072
+ },
3073
+ 3: {
3074
+ field: 'total_distance',
3075
+ type: 'uint32',
3076
+ scale: 100,
3077
+ offset: 0,
3078
+ units: 'm',
3079
+ },
3080
+ 4: {
3081
+ field: 'avg_speed',
3082
+ type: 'uint32',
3083
+ scale: 1000,
3084
+ offset: 0,
3085
+ units: 'm/s',
3086
+ },
3087
+ 9: {
3088
+ field: 'start_time',
3089
+ type: 'date_time',
3090
+ scale: null,
3091
+ offset: 0,
3092
+ units: '',
3093
+ },
3094
+ 13: {
3095
+ field: 'total_ascent',
3096
+ type: 'uint16',
3097
+ scale: null,
3098
+ offset: 0,
3099
+ units: 'm',
3100
+ },
3101
+ 14: {
3102
+ field: 'total_descent',
3103
+ type: 'uint16',
3104
+ scale: null,
3105
+ offset: 0,
3106
+ units: 'm',
3107
+ },
3108
+ 21: {
3109
+ field: 'start_position_lat',
3110
+ type: 'sint32',
3111
+ scale: null,
3112
+ offset: 0,
3113
+ units: 'semicircles',
3114
+ },
3115
+ 22: {
3116
+ field: 'start_position_long',
3117
+ type: 'sint32',
3118
+ scale: null,
3119
+ offset: 0,
3120
+ units: 'semicircles',
3121
+ },
3122
+ 23: {
3123
+ field: 'end_position_lat',
3124
+ type: 'sint32',
3125
+ scale: null,
3126
+ offset: 0,
3127
+ units: 'semicircles',
3128
+ },
3129
+ 24: {
3130
+ field: 'end_position_long',
3131
+ type: 'sint32',
3132
+ scale: null,
3133
+ offset: 0,
3134
+ units: 'semicircles',
3135
+ },
3136
+ 25: {
3137
+ field: 'max_speed',
3138
+ type: 'uint32',
3139
+ scale: 1000,
3140
+ offset: 0,
3141
+ units: 'm/s',
3142
+ },
3143
+ 26: {
3144
+ field: 'avg_vert_speed',
3145
+ type: 'sint32',
3146
+ scale: 1000,
3147
+ offset: 0,
3148
+ units: 'm/s',
3149
+ },
3150
+ 27: {
3151
+ field: 'end_time',
3152
+ type: 'date_time',
3153
+ scale: null,
3154
+ offset: 0,
3155
+ units: '',
3156
+ },
3157
+ 28: {
3158
+ field: 'total_calories',
3159
+ type: 'uint32',
3160
+ scale: null,
3161
+ offset: 0,
3162
+ units: 'kcal',
3163
+ },
3164
+ 74: {
3165
+ field: 'start_elevation',
3166
+ type: 'uint32',
3167
+ scale: 5,
3168
+ offset: -500,
3169
+ units: 'm',
3170
+ },
3171
+ 78: {
3172
+ field: 'active_time',
3173
+ type: 'uint32',
3174
+ scale: 1000,
3175
+ offset: 0,
3176
+ units: 's',
3177
+ },
3178
+ 107: {
3179
+ field: 'beginning_potential_stamina',
3180
+ type: 'uint8',
3181
+ scale: 1,
3182
+ offset: 0,
3183
+ units: 'percent',
3184
+ },
3185
+ 108: {
3186
+ field: 'ending_potential_stamina',
3187
+ type: 'uint8',
3188
+ scale: 1,
3189
+ offset: 0,
3190
+ units: 'percent',
3191
+ },
3192
+ 109: {
3193
+ field: 'min_stamina',
3194
+ type: 'uint8',
3195
+ scale: 1,
3196
+ offset: 0,
3197
+ units: 'percent',
3198
+ },
3199
+ 110: {
3200
+ field: 'total_moving_time',
3201
+ type: 'uint32',
3202
+ scale: 1000,
3203
+ offset: 0,
3204
+ units: 's',
3205
+ },
3206
+ },
3207
+ 313: {
3208
+ name: 'split_summary',
3209
+ 254: {
3210
+ field: 'message_index',
3211
+ type: 'message_index',
3212
+ scale: null,
3213
+ offset: 0,
3214
+ units: '',
3215
+ },
3216
+ 0: {
3217
+ field: 'split_type',
3218
+ type: 'split_type',
3219
+ scale: null,
3220
+ offset: 0,
3221
+ units: '',
3222
+ },
3223
+ 3: {
3224
+ field: 'num_splits',
3225
+ type: 'uint16',
3226
+ scale: null,
3227
+ offset: 0,
3228
+ units: '',
3229
+ },
3230
+ 4: {
3231
+ field: 'total_timer_time',
3232
+ type: 'uint32',
3233
+ scale: 1000,
3234
+ offset: 0,
3235
+ units: 's',
3236
+ },
3237
+ 5: {
3238
+ field: 'total_distance',
3239
+ type: 'uint32',
3240
+ scale: 100,
3241
+ offset: 0,
3242
+ units: 'm',
3243
+ },
3244
+ 6: {
3245
+ field: 'avg_speed',
3246
+ type: 'uint32',
3247
+ scale: 1000,
3248
+ offset: 0,
3249
+ units: 'm/s',
3250
+ },
3251
+ 7: {
3252
+ field: 'max_speed',
3253
+ type: 'uint32',
3254
+ scale: 1000,
3255
+ offset: 0,
3256
+ units: 'm/s',
3257
+ },
3258
+ 8: {
3259
+ field: 'total_ascent',
3260
+ type: 'uint16',
3261
+ scale: null,
3262
+ offset: 0,
3263
+ units: 'm',
3264
+ },
3265
+ 9: {
3266
+ field: 'total_descent',
3267
+ type: 'uint16',
3268
+ scale: null,
3269
+ offset: 0,
3270
+ units: 'm',
3271
+ },
3272
+ 10: {
3273
+ field: 'avg_heart_rate',
3274
+ type: 'uint8',
3275
+ scale: null,
3276
+ offset: 0,
3277
+ units: 'bpm',
3278
+ },
3279
+ 11: {
3280
+ field: 'max_heart_rate',
3281
+ type: 'uint8',
3282
+ scale: null,
3283
+ offset: 0,
3284
+ units: 'bpm',
3285
+ },
3286
+ 12: {
3287
+ field: 'avg_vert_speed',
3288
+ type: 'sint32',
3289
+ scale: 1000,
3290
+ offset: 0,
3291
+ units: 'm/s',
3292
+ },
3293
+ 13: {
3294
+ field: 'total_calories',
3295
+ type: 'uint32',
3296
+ scale: null,
3297
+ offset: 0,
3298
+ units: 'kcal',
3299
+ },
3300
+ 65: {
3301
+ field: 'active_time',
3302
+ type: 'uint32',
3303
+ scale: 1000,
3304
+ offset: 0,
3305
+ units: 's',
3306
+ },
3307
+ 77: {
3308
+ field: 'total_moving_time',
3309
+ type: 'uint32',
3310
+ scale: 1000,
3311
+ offset: 0,
3312
+ units: 's',
3313
+ },
3007
3314
  },
3008
3315
  285: {
3009
3316
  name: 'jump',
@@ -5085,6 +5392,8 @@ exports.FIT = {
5085
5392
  264: 'exercise_title',
5086
5393
  268: 'dive_summary',
5087
5394
  285: 'jump',
5395
+ 312: 'split',
5396
+ 313: 'split_summary',
5088
5397
  317: 'climb_pro',
5089
5398
  319: 'tank_update',
5090
5399
  323: 'tank_summary',
@@ -5840,6 +6149,33 @@ exports.FIT = {
5840
6149
  23: 'u_turn',
5841
6150
  24: 'segment_start',
5842
6151
  25: 'segment_end',
6152
+ 27: 'campsite',
6153
+ 28: 'aid_station',
6154
+ 29: 'rest_area',
6155
+ 30: 'general_distance',
6156
+ 31: 'service',
6157
+ 32: 'energy_gel',
6158
+ 33: 'sports_drink',
6159
+ 34: 'mile_marker',
6160
+ 35: 'checkpoint',
6161
+ 36: 'shelter',
6162
+ 37: 'meeting_spot',
6163
+ 38: 'overlook',
6164
+ 39: 'toilet',
6165
+ 40: 'shower',
6166
+ 41: 'gear',
6167
+ 42: 'sharp_curve',
6168
+ 43: 'steep_incline',
6169
+ 44: 'tunnel',
6170
+ 45: 'bridge',
6171
+ 46: 'obstacle',
6172
+ 47: 'crossing',
6173
+ 48: 'store',
6174
+ 49: 'transition',
6175
+ 50: 'navaid',
6176
+ 51: 'transport',
6177
+ 52: 'alert',
6178
+ 53: 'info',
5843
6179
  },
5844
6180
  manufacturer: {
5845
6181
  0: 0,
@@ -6601,6 +6937,29 @@ exports.FIT = {
6601
6937
  0: 'starred',
6602
6938
  1: 'suggested',
6603
6939
  },
6940
+ split_type: {
6941
+ 1: 'ascent_split',
6942
+ 2: 'descent_split',
6943
+ 3: 'interval_active',
6944
+ 4: 'interval_rest',
6945
+ 5: 'interval_warmup',
6946
+ 6: 'interval_cooldown',
6947
+ 7: 'interval_recovery',
6948
+ 8: 'interval_other',
6949
+ 9: 'climb_active',
6950
+ 10: 'climb_rest',
6951
+ 11: 'surf_active',
6952
+ 12: 'run_active',
6953
+ 13: 'run_rest',
6954
+ 14: 'workout_round',
6955
+ 17: 'rwd_run',
6956
+ 18: 'rwd_walk',
6957
+ 21: 'windsurf_active',
6958
+ 22: 'rwd_stand',
6959
+ 23: 'transition',
6960
+ 28: 'ski_lift_split',
6961
+ 29: 'ski_run_split',
6962
+ },
6604
6963
  source_type: {
6605
6964
  0: 'ant',
6606
6965
  1: 'antplus',
@@ -16,7 +16,7 @@ export interface MessageIndex {
16
16
  selected: boolean;
17
17
  }
18
18
  export type File = 'device' | 'settings' | 'sport' | 'activity' | 'workout' | 'course' | 'schedules' | 'weight' | 'totals' | 'goals' | 'blood_pressure' | 'monitoring_a' | 'activity_summary' | 'monitoring_daily' | 'monitoring_b' | 'segment' | 'segment_list' | 'exd_configuration' | 'mfg_range_min' | 'mfg_range_max';
19
- export type MesgNum = 'file_id' | 'capabilities' | 'device_settings' | 'user_profile' | 'hrm_profile' | 'sdm_profile' | 'bike_profile' | 'zones_target' | 'hr_zone' | 'power_zone' | 'met_zone' | 'sport' | 'goal' | 'session' | 'lap' | 'record' | 'event' | 'device_info' | 'workout' | 'workout_step' | 'schedule' | 'weight_scale' | 'course' | 'course_point' | 'totals' | 'activity' | 'software' | 'file_capabilities' | 'mesg_capabilities' | 'field_capabilities' | 'file_creator' | 'blood_pressure' | 'speed_zone' | 'monitoring' | 'training_file' | 'hrv' | 'user_metrics' | 'ant_rx' | 'ant_tx' | 'ant_channel_id' | 'length' | 'monitoring_info' | 'pad' | 'slave_device' | 'connectivity' | 'weather_conditions' | 'weather_alert' | 'cadence_zone' | 'hr' | 'activity_metrics' | 'segment_lap' | 'memo_glob' | 'segment_id' | 'segment_leaderboard_entry' | 'segment_point' | 'segment_file' | 'workout_session' | 'watchface_settings' | 'gps_metadata' | 'camera_event' | 'timestamp_correlation' | 'gyroscope_data' | 'accelerometer_data' | 'three_d_sensor_calibration' | 'video_frame' | 'obdii_data' | 'nmea_sentence' | 'aviation_attitude' | 'video' | 'video_title' | 'video_description' | 'video_clip' | 'exd_screen_configuration' | 'exd_data_field_configuration' | 'exd_data_concept_configuration' | 'field_description' | 'developer_data_id' | 'magnetometer_data' | 'barometer_data' | 'one_d_sensor_calibration' | 'time_in_zone' | 'set' | 'stress_level' | 'dive_settings' | 'dive_gas' | 'dive_alarm' | 'exercise_title' | 'dive_summary' | 'jump' | 'climb_pro' | 'tank_update' | 'tank_summary' | 'o_hr_settings' | 'mfg_range_min' | 'mfg_range_max' | 'definition';
19
+ export type MesgNum = 'file_id' | 'capabilities' | 'device_settings' | 'user_profile' | 'hrm_profile' | 'sdm_profile' | 'bike_profile' | 'zones_target' | 'hr_zone' | 'power_zone' | 'met_zone' | 'sport' | 'goal' | 'session' | 'lap' | 'record' | 'event' | 'device_info' | 'workout' | 'workout_step' | 'schedule' | 'weight_scale' | 'course' | 'course_point' | 'totals' | 'activity' | 'software' | 'file_capabilities' | 'mesg_capabilities' | 'field_capabilities' | 'file_creator' | 'blood_pressure' | 'speed_zone' | 'monitoring' | 'training_file' | 'hrv' | 'user_metrics' | 'ant_rx' | 'ant_tx' | 'ant_channel_id' | 'length' | 'monitoring_info' | 'pad' | 'slave_device' | 'connectivity' | 'weather_conditions' | 'weather_alert' | 'cadence_zone' | 'hr' | 'activity_metrics' | 'segment_lap' | 'memo_glob' | 'segment_id' | 'segment_leaderboard_entry' | 'segment_point' | 'segment_file' | 'workout_session' | 'watchface_settings' | 'gps_metadata' | 'camera_event' | 'timestamp_correlation' | 'gyroscope_data' | 'accelerometer_data' | 'three_d_sensor_calibration' | 'video_frame' | 'obdii_data' | 'nmea_sentence' | 'aviation_attitude' | 'video' | 'video_title' | 'video_description' | 'video_clip' | 'exd_screen_configuration' | 'exd_data_field_configuration' | 'exd_data_concept_configuration' | 'field_description' | 'developer_data_id' | 'magnetometer_data' | 'barometer_data' | 'one_d_sensor_calibration' | 'time_in_zone' | 'set' | 'stress_level' | 'dive_settings' | 'dive_gas' | 'dive_alarm' | 'exercise_title' | 'dive_summary' | 'jump' | 'split' | 'split_summary' | 'climb_pro' | 'tank_update' | 'tank_summary' | 'o_hr_settings' | 'mfg_range_min' | 'mfg_range_max' | 'definition';
20
20
  export type Checksum = 'clear' | 'ok';
21
21
  export type FileFlags = '0' | 'read' | 'write' | 'erase';
22
22
  export type MesgCount = 'num_per_file' | 'max_per_file' | 'max_per_file_type';
@@ -69,7 +69,7 @@ export type Goal = 'time' | 'distance' | 'calories' | 'frequency' | 'steps' | 'a
69
69
  export type GoalRecurrence = 'off' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'custom';
70
70
  export type GoalSource = 'auto' | 'community' | 'user';
71
71
  export type Schedule = 'workout' | 'course';
72
- export type CoursePoint = 'generic' | 'summit' | 'valley' | 'water' | 'food' | 'danger' | 'left' | 'right' | 'straight' | 'first_aid' | 'fourth_category' | 'third_category' | 'second_category' | 'first_category' | 'hors_category' | 'sprint' | 'left_fork' | 'right_fork' | 'middle_fork' | 'slight_left' | 'sharp_left' | 'slight_right' | 'sharp_right' | 'u_turn' | 'segment_start' | 'segment_end';
72
+ export type CoursePoint = 'generic' | 'summit' | 'valley' | 'water' | 'food' | 'danger' | 'left' | 'right' | 'straight' | 'first_aid' | 'fourth_category' | 'third_category' | 'second_category' | 'first_category' | 'hors_category' | 'sprint' | 'left_fork' | 'right_fork' | 'middle_fork' | 'slight_left' | 'sharp_left' | 'slight_right' | 'sharp_right' | 'u_turn' | 'segment_start' | 'segment_end' | 'campsite' | 'aid_station' | 'rest_area' | 'general_distance' | 'service' | 'energy_gel' | 'sports_drink' | 'mile_marker' | 'checkpoint' | 'shelter' | 'meeting_spot' | 'overlook' | 'toilet' | 'shower' | 'gear' | 'sharp_curve' | 'steep_incline' | 'tunnel' | 'bridge' | 'obstacle' | 'crossing' | 'store' | 'transition' | 'navaid' | 'transport' | 'alert' | 'info';
73
73
  export type Manufacturer = '0' | 'garmin' | 'garmin_fr405_antfs' | 'zephyr' | 'dayton' | 'idt' | 'srm' | 'quarq' | 'ibike' | 'saris' | 'spark_hk' | 'tanita' | 'echowell' | 'dynastream_oem' | 'nautilus' | 'dynastream' | 'timex' | 'metrigear' | 'xelic' | 'beurer' | 'cardiosport' | 'a_and_d' | 'hmm' | 'suunto' | 'thita_elektronik' | 'gpulse' | 'clean_mobile' | 'pedal_brain' | 'peaksware' | 'saxonar' | 'lemond_fitness' | 'dexcom' | 'wahoo_fitness' | 'octane_fitness' | 'archinoetics' | 'the_hurt_box' | 'citizen_systems' | 'magellan' | 'osynce' | 'holux' | 'concept2' | 'one_giant_leap' | 'ace_sensor' | 'brim_brothers' | 'xplova' | 'perception_digital' | 'bf1systems' | 'pioneer' | 'spantec' | 'metalogics' | '4iiiis' | 'seiko_epson' | 'seiko_epson_oem' | 'ifor_powell' | 'maxwell_guider' | 'star_trac' | 'breakaway' | 'alatech_technology_ltd' | 'mio_technology_europe' | 'rotor' | 'geonaute' | 'id_bike' | 'specialized' | 'wtek' | 'physical_enterprises' | 'north_pole_engineering' | 'bkool' | 'cateye' | 'stages_cycling' | 'sigmasport' | 'tomtom' | 'peripedal' | 'wattbike' | 'moxy' | 'ciclosport' | 'powerbahn' | 'acorn_projects_aps' | 'lifebeam' | 'bontrager' | 'wellgo' | 'scosche' | 'magura' | 'woodway' | 'elite' | 'nielsen_kellerman' | 'dk_city' | 'tacx' | 'direction_technology' | 'magtonic' | '1partcarbon' | 'inside_ride_technologies' | 'sound_of_motion' | 'stryd' | 'icg' | 'mipulse' | 'bsx_athletics' | 'look' | 'campagnolo_srl' | 'body_bike_smart' | 'praxisworks' | 'limits_technology' | 'topaction_technology' | 'cosinuss' | 'fitcare' | 'magene' | 'giant_manufacturing_co' | 'tigrasport' | 'salutron' | 'technogym' | 'bryton_sensors' | 'latitude_limited' | 'soaring_technology' | 'igpsport' | 'thinkrider' | 'gopher_sport' | 'waterrower' | 'orangetheory' | 'inpeak' | 'kinetic' | 'johnson_health_tech' | 'polar_electro' | 'seesense' | 'nci_technology' | 'development' | 'healthandlife' | 'lezyne' | 'scribe_labs' | 'zwift' | 'watteam' | 'recon' | 'favero_electronics' | 'dynovelo' | 'strava' | 'precor' | 'bryton' | 'sram' | 'navman' | 'cobi' | 'spivi' | 'mio_magellan' | 'evesports' | 'sensitivus_gauge' | 'podoon' | 'life_time_fitness' | 'falco_e_motors' | 'minoura' | 'cycliq' | 'luxottica' | 'trainer_road' | 'the_sufferfest' | 'fullspeedahead' | 'virtualtraining' | 'feedbacksports' | 'omata' | 'vdo' | 'magneticdays' | 'hammerhead' | 'kinetic_by_kurt' | 'shapelog' | 'dabuziduo' | 'jetblack' | 'coros' | 'virtugo' | 'velosense' | 'actigraphcorp';
74
74
  export type GarminProduct = 'hrm_bike' | 'hrm1' | 'axh01' | 'axb01' | 'axb02' | 'hrm2ss' | 'dsi_alf02' | 'hrm3ss' | 'hrm_run_single_byte_product_id' | 'bsm' | 'bcm' | 'axs01' | 'hrm_tri_single_byte_product_id' | 'fr225_single_byte_product_id' | 'fr301_china' | 'fr301_japan' | 'fr301_korea' | 'fr301_taiwan' | 'fr405' | 'fr50' | 'fr405_japan' | 'fr60' | 'dsi_alf01' | 'fr310xt' | 'edge500' | 'fr110' | 'edge800' | 'edge500_taiwan' | 'edge500_japan' | 'chirp' | 'fr110_japan' | 'edge200' | 'fr910xt' | 'edge800_taiwan' | 'edge800_japan' | 'alf04' | 'fr610' | 'fr210_japan' | 'vector_ss' | 'vector_cp' | 'edge800_china' | 'edge500_china' | 'fr610_japan' | 'edge500_korea' | 'fr70' | 'fr310xt_4t' | 'amx' | 'fr10' | 'edge800_korea' | 'swim' | 'fr910xt_china' | 'fenix' | 'edge200_taiwan' | 'edge510' | 'edge810' | 'tempe' | 'fr910xt_japan' | 'fr620' | 'fr220' | 'fr910xt_korea' | 'fr10_japan' | 'edge810_japan' | 'virb_elite' | 'edge_touring' | 'edge510_japan' | 'hrm_tri' | 'hrm_run' | 'fr920xt' | 'edge510_asia' | 'edge810_china' | 'edge810_taiwan' | 'edge1000' | 'vivo_fit' | 'virb_remote' | 'vivo_ki' | 'fr15' | 'vivo_active' | 'edge510_korea' | 'fr620_japan' | 'fr620_china' | 'fr220_japan' | 'fr220_china' | 'approach_s6' | 'vivo_smart' | 'fenix2' | 'epix' | 'fenix3' | 'edge1000_taiwan' | 'edge1000_japan' | 'fr15_japan' | 'edge520' | 'edge1000_china' | 'fr620_russia' | 'fr220_russia' | 'vector_s' | 'edge1000_korea' | 'fr920xt_taiwan' | 'fr920xt_china' | 'fr920xt_japan' | 'virbx' | 'vivo_smart_apac' | 'etrex_touch' | 'edge25' | 'fr25' | 'vivo_fit2' | 'fr225' | 'fr630' | 'fr230' | 'fr735xt' | 'vivo_active_apac' | 'vector_2' | 'vector_2s' | 'virbxe' | 'fr620_taiwan' | 'fr220_taiwan' | 'truswing' | 'fenix3_china' | 'fenix3_twn' | 'varia_headlight' | 'varia_taillight_old' | 'edge_explore_1000' | 'fr225_asia' | 'varia_radar_taillight' | 'varia_radar_display' | 'edge20' | 'd2_bravo' | 'approach_s20' | 'varia_remote' | 'hrm4_run' | 'vivo_active_hr' | 'vivo_smart_hr' | 'vivo_move' | 'varia_vision' | 'vivo_fit3' | 'fenix3_hr' | 'virb_ultra_30' | 'index_smart_scale' | 'fr235' | 'fenix3_chronos' | 'oregon7xx' | 'rino7xx' | 'nautix' | 'edge_820' | 'edge_explore_820' | 'fenix5s' | 'd2_bravo_titanium' | 'varia_ut800' | 'running_dynamics_pod' | 'fenix5x' | 'vivo_fit_jr' | 'fr935' | 'fenix5' | 'descent' | 'sdm4' | 'edge_remote' | 'training_center' | 'connectiq_simulator' | 'android_antplus_plugin' | 'connect';
75
75
  export type AntplusDeviceType = 'antfs' | 'bike_power' | 'environment_sensor_legacy' | 'multi_sport_speed_distance' | 'control' | 'fitness_equipment' | 'blood_pressure' | 'geocache_node' | 'light_electric_vehicle' | 'env_sensor' | 'racquet' | 'control_hub' | 'muscle_oxygen' | 'shifting' | 'bike_light_main' | 'bike_light_shared' | 'exd' | 'bike_radar' | 'bike_aero' | 'weight_scale' | 'heart_rate' | 'bike_speed_cadence' | 'bike_cadence' | 'bike_speed' | 'stride_speed_distance';
@@ -105,6 +105,7 @@ export type SegmentLapStatus = 'end' | 'fail';
105
105
  export type SegmentLeaderboardType = 'overall' | 'personal_best' | 'connections' | 'group' | 'challenger' | 'kom' | 'qom' | 'pr' | 'goal' | 'rival' | 'club_leader';
106
106
  export type SegmentDeleteStatus = 'do_not_delete' | 'delete_one' | 'delete_all';
107
107
  export type SegmentSelectionType = 'starred' | 'suggested';
108
+ export type SplitType = 'ascent_split' | 'descent_split' | 'interval_active' | 'interval_rest' | 'interval_warmup' | 'interval_cooldown' | 'interval_recovery' | 'interval_other' | 'climb_active' | 'climb_rest' | 'surf_active' | 'run_active' | 'run_rest' | 'workout_round' | 'rwd_run' | 'rwd_walk' | 'windsurf_active' | 'rwd_stand' | 'transition' | 'ski_lift_split' | 'ski_run_split';
108
109
  export type SourceType = 'ant' | 'antplus' | 'bluetooth' | 'bluetooth_low_energy' | 'wifi' | 'local';
109
110
  export type DisplayOrientation = 'auto' | 'portrait' | 'landscape' | 'portrait_flipped' | 'landscape_flipped';
110
111
  export type WorkoutEquipment = 'none' | 'swim_fins' | 'swim_kickboard' | 'swim_paddles' | 'swim_pull_buoy' | 'swim_snorkel';
@@ -465,6 +466,9 @@ export interface ParsedSession {
465
466
  workout_feel?: number;
466
467
  workout_rpe?: number;
467
468
  resting_calories?: number;
469
+ beginning_potential_stamina?: number;
470
+ ending_potential_stamina?: number;
471
+ min_stamina?: number;
468
472
  timestamp: string;
469
473
  message_index?: MessageIndex;
470
474
  laps?: ParsedLap[];
@@ -648,6 +652,8 @@ export interface ParsedRecord {
648
652
  n2_load?: number;
649
653
  grit?: number;
650
654
  flow?: number;
655
+ potential_stamina?: number;
656
+ stamina?: number;
651
657
  timestamp: string;
652
658
  }
653
659
  export interface ParsedEvent {
@@ -762,6 +768,8 @@ export interface ParsedActivity {
762
768
  developer_data_ids?: ParsedDeveloperDataId[];
763
769
  field_descriptions?: ParsedFieldDescription[];
764
770
  sports?: ParsedSport[];
771
+ splits?: ParsedSplit[];
772
+ split_summaries?: ParsedSplitSummary[];
765
773
  }
766
774
  export interface ParsedSoftware {
767
775
  version?: number;
@@ -1010,6 +1018,48 @@ export interface ParsedJump {
1010
1018
  enhanced_speed?: number;
1011
1019
  timestamp: string;
1012
1020
  }
1021
+ export interface ParsedSplit {
1022
+ split_type?: SplitType;
1023
+ total_elapsed_time?: number;
1024
+ total_timer_time?: number;
1025
+ total_distance?: number;
1026
+ avg_speed?: number;
1027
+ start_time: string;
1028
+ total_ascent?: number;
1029
+ total_descent?: number;
1030
+ start_position_lat?: number;
1031
+ start_position_long?: number;
1032
+ end_position_lat?: number;
1033
+ end_position_long?: number;
1034
+ max_speed?: number;
1035
+ avg_vert_speed?: number;
1036
+ end_time?: string;
1037
+ total_calories?: number;
1038
+ start_elevation?: number;
1039
+ active_time?: number;
1040
+ beginning_potential_stamina?: number;
1041
+ ending_potential_stamina?: number;
1042
+ min_stamina?: number;
1043
+ total_moving_time?: number;
1044
+ message_index?: MessageIndex;
1045
+ }
1046
+ export interface ParsedSplitSummary {
1047
+ split_type?: SplitType;
1048
+ num_splits?: number;
1049
+ total_timer_time?: number;
1050
+ total_distance?: number;
1051
+ avg_speed?: number;
1052
+ max_speed?: number;
1053
+ total_ascent?: number;
1054
+ total_descent?: number;
1055
+ avg_heart_rate?: number;
1056
+ max_heart_rate?: number;
1057
+ avg_vert_speed?: number;
1058
+ total_calories?: number;
1059
+ active_time?: number;
1060
+ total_moving_time?: number;
1061
+ message_index?: MessageIndex;
1062
+ }
1013
1063
  export interface ParsedTankUpdate {
1014
1064
  sensor?: number;
1015
1065
  pressure?: number;
@@ -1054,6 +1104,8 @@ export interface ParsedFit {
1054
1104
  tank_updates?: ParsedTankUpdate[];
1055
1105
  tank_summaries?: ParsedTankSummary[];
1056
1106
  jumps?: ParsedJump[];
1107
+ splits?: ParsedSplit[];
1108
+ split_summaries?: ParsedSplitSummary[];
1057
1109
  time_in_zone?: ParsedTimeInZone[];
1058
1110
  activity_metrics?: ParsedActivityMetrics[];
1059
1111
  user_metrics?: ParsedUserMetrics[];
@@ -180,6 +180,8 @@ function generateAdditionalFields(msg) {
180
180
  developer_data_ids: 'parsed_developer_data_id',
181
181
  field_descriptions: 'parsed_field_description',
182
182
  sports: 'parsed_sport',
183
+ splits: 'parsed_split',
184
+ split_summaries: 'parsed_split_summary',
183
185
  };
184
186
  return Object.keys(props).map(prop => generateArrayProperty(prop, typescript_1.default.factory.createTypeReferenceNode(snakeToCamel(props[prop]))));
185
187
  }
@@ -209,6 +211,8 @@ function generateFitType() {
209
211
  tank_updates: 'parsed_tank_update',
210
212
  tank_summaries: 'parsed_tank_summary',
211
213
  jumps: 'parsed_jump',
214
+ splits: 'parsed_split',
215
+ split_summaries: 'parsed_split_summary',
212
216
  time_in_zone: 'parsed_time_in_zone',
213
217
  activity_metrics: 'parsed_activity_metrics',
214
218
  user_metrics: 'parsed_user_metrics',
@@ -100,6 +100,8 @@ export default class FitParser {
100
100
  const tank_updates = [];
101
101
  const tank_summaries = [];
102
102
  const jumps = [];
103
+ const splits = [];
104
+ const split_summaries = [];
103
105
  const time_in_zone = [];
104
106
  const activity_metrics = [];
105
107
  const user_metrics = [];
@@ -201,6 +203,12 @@ export default class FitParser {
201
203
  case 'jump':
202
204
  jumps.push(message);
203
205
  break;
206
+ case 'split':
207
+ splits.push(message);
208
+ break;
209
+ case 'split_summary':
210
+ split_summaries.push(message);
211
+ break;
204
212
  case 'time_in_zone':
205
213
  time_in_zone.push(message);
206
214
  break;
@@ -230,6 +238,8 @@ export default class FitParser {
230
238
  fitObj.tank_updates = tank_updates;
231
239
  fitObj.tank_summaries = tank_summaries;
232
240
  fitObj.jumps = jumps;
241
+ fitObj.splits = splits;
242
+ fitObj.split_summaries = split_summaries;
233
243
  fitObj.time_in_zone = time_in_zone;
234
244
  fitObj.activity_metrics = activity_metrics;
235
245
  fitObj.user_metrics = user_metrics;
@@ -241,7 +251,9 @@ export default class FitParser {
241
251
  sessions,
242
252
  events,
243
253
  hrv,
244
- device_infos, developer_data_ids: applications, field_descriptions: fieldDescriptions, sports });
254
+ device_infos, developer_data_ids: applications, field_descriptions: fieldDescriptions, sports,
255
+ splits,
256
+ split_summaries });
245
257
  }
246
258
  if (!isModeCascade) {
247
259
  fitObj.sessions = sessions;