fit-file-parser 3.0.0 → 3.0.1
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.
- package/dist/cjs/fit-parser.js +13 -1
- package/dist/cjs/fit.js +332 -0
- package/dist/cjs/fit_types.d.ts +53 -1
- package/dist/cjs/type_generator.js +4 -0
- package/dist/fit-parser.js +13 -1
- package/dist/fit.js +332 -0
- package/dist/fit_types.d.ts +53 -1
- package/dist/type_generator.js +4 -0
- package/package.json +1 -1
package/dist/cjs/fit-parser.js
CHANGED
|
@@ -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',
|
|
@@ -6601,6 +6910,29 @@ exports.FIT = {
|
|
|
6601
6910
|
0: 'starred',
|
|
6602
6911
|
1: 'suggested',
|
|
6603
6912
|
},
|
|
6913
|
+
split_type: {
|
|
6914
|
+
1: 'ascent_split',
|
|
6915
|
+
2: 'descent_split',
|
|
6916
|
+
3: 'interval_active',
|
|
6917
|
+
4: 'interval_rest',
|
|
6918
|
+
5: 'interval_warmup',
|
|
6919
|
+
6: 'interval_cooldown',
|
|
6920
|
+
7: 'interval_recovery',
|
|
6921
|
+
8: 'interval_other',
|
|
6922
|
+
9: 'climb_active',
|
|
6923
|
+
10: 'climb_rest',
|
|
6924
|
+
11: 'surf_active',
|
|
6925
|
+
12: 'run_active',
|
|
6926
|
+
13: 'run_rest',
|
|
6927
|
+
14: 'workout_round',
|
|
6928
|
+
17: 'rwd_run',
|
|
6929
|
+
18: 'rwd_walk',
|
|
6930
|
+
21: 'windsurf_active',
|
|
6931
|
+
22: 'rwd_stand',
|
|
6932
|
+
23: 'transition',
|
|
6933
|
+
28: 'ski_lift_split',
|
|
6934
|
+
29: 'ski_run_split',
|
|
6935
|
+
},
|
|
6604
6936
|
source_type: {
|
|
6605
6937
|
0: 'ant',
|
|
6606
6938
|
1: 'antplus',
|
package/dist/cjs/fit_types.d.ts
CHANGED
|
@@ -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';
|
|
@@ -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',
|
package/dist/fit-parser.js
CHANGED
|
@@ -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;
|
package/dist/fit.js
CHANGED
|
@@ -1773,6 +1773,27 @@ export const FIT = {
|
|
|
1773
1773
|
offset: 0,
|
|
1774
1774
|
units: 'kcal',
|
|
1775
1775
|
},
|
|
1776
|
+
205: {
|
|
1777
|
+
field: 'beginning_potential_stamina',
|
|
1778
|
+
type: 'uint8',
|
|
1779
|
+
scale: 1,
|
|
1780
|
+
offset: 0,
|
|
1781
|
+
units: 'percent',
|
|
1782
|
+
},
|
|
1783
|
+
206: {
|
|
1784
|
+
field: 'ending_potential_stamina',
|
|
1785
|
+
type: 'uint8',
|
|
1786
|
+
scale: 1,
|
|
1787
|
+
offset: 0,
|
|
1788
|
+
units: 'percent',
|
|
1789
|
+
},
|
|
1790
|
+
207: {
|
|
1791
|
+
field: 'min_stamina',
|
|
1792
|
+
type: 'uint8',
|
|
1793
|
+
scale: 1,
|
|
1794
|
+
offset: 0,
|
|
1795
|
+
units: 'percent',
|
|
1796
|
+
},
|
|
1776
1797
|
214: {
|
|
1777
1798
|
field: 'avg_grit',
|
|
1778
1799
|
type: 'float32',
|
|
@@ -3001,6 +3022,292 @@ export const FIT = {
|
|
|
3001
3022
|
offset: 0,
|
|
3002
3023
|
units: 'percent',
|
|
3003
3024
|
},
|
|
3025
|
+
137: {
|
|
3026
|
+
field: 'potential_stamina',
|
|
3027
|
+
type: 'uint8',
|
|
3028
|
+
scale: 1,
|
|
3029
|
+
offset: 0,
|
|
3030
|
+
units: 'percent',
|
|
3031
|
+
},
|
|
3032
|
+
138: {
|
|
3033
|
+
field: 'stamina',
|
|
3034
|
+
type: 'uint8',
|
|
3035
|
+
scale: 1,
|
|
3036
|
+
offset: 0,
|
|
3037
|
+
units: 'percent',
|
|
3038
|
+
},
|
|
3039
|
+
},
|
|
3040
|
+
312: {
|
|
3041
|
+
name: 'split',
|
|
3042
|
+
254: {
|
|
3043
|
+
field: 'message_index',
|
|
3044
|
+
type: 'message_index',
|
|
3045
|
+
scale: null,
|
|
3046
|
+
offset: 0,
|
|
3047
|
+
units: '',
|
|
3048
|
+
},
|
|
3049
|
+
0: {
|
|
3050
|
+
field: 'split_type',
|
|
3051
|
+
type: 'split_type',
|
|
3052
|
+
scale: null,
|
|
3053
|
+
offset: 0,
|
|
3054
|
+
units: '',
|
|
3055
|
+
},
|
|
3056
|
+
1: {
|
|
3057
|
+
field: 'total_elapsed_time',
|
|
3058
|
+
type: 'uint32',
|
|
3059
|
+
scale: 1000,
|
|
3060
|
+
offset: 0,
|
|
3061
|
+
units: 's',
|
|
3062
|
+
},
|
|
3063
|
+
2: {
|
|
3064
|
+
field: 'total_timer_time',
|
|
3065
|
+
type: 'uint32',
|
|
3066
|
+
scale: 1000,
|
|
3067
|
+
offset: 0,
|
|
3068
|
+
units: 's',
|
|
3069
|
+
},
|
|
3070
|
+
3: {
|
|
3071
|
+
field: 'total_distance',
|
|
3072
|
+
type: 'uint32',
|
|
3073
|
+
scale: 100,
|
|
3074
|
+
offset: 0,
|
|
3075
|
+
units: 'm',
|
|
3076
|
+
},
|
|
3077
|
+
4: {
|
|
3078
|
+
field: 'avg_speed',
|
|
3079
|
+
type: 'uint32',
|
|
3080
|
+
scale: 1000,
|
|
3081
|
+
offset: 0,
|
|
3082
|
+
units: 'm/s',
|
|
3083
|
+
},
|
|
3084
|
+
9: {
|
|
3085
|
+
field: 'start_time',
|
|
3086
|
+
type: 'date_time',
|
|
3087
|
+
scale: null,
|
|
3088
|
+
offset: 0,
|
|
3089
|
+
units: '',
|
|
3090
|
+
},
|
|
3091
|
+
13: {
|
|
3092
|
+
field: 'total_ascent',
|
|
3093
|
+
type: 'uint16',
|
|
3094
|
+
scale: null,
|
|
3095
|
+
offset: 0,
|
|
3096
|
+
units: 'm',
|
|
3097
|
+
},
|
|
3098
|
+
14: {
|
|
3099
|
+
field: 'total_descent',
|
|
3100
|
+
type: 'uint16',
|
|
3101
|
+
scale: null,
|
|
3102
|
+
offset: 0,
|
|
3103
|
+
units: 'm',
|
|
3104
|
+
},
|
|
3105
|
+
21: {
|
|
3106
|
+
field: 'start_position_lat',
|
|
3107
|
+
type: 'sint32',
|
|
3108
|
+
scale: null,
|
|
3109
|
+
offset: 0,
|
|
3110
|
+
units: 'semicircles',
|
|
3111
|
+
},
|
|
3112
|
+
22: {
|
|
3113
|
+
field: 'start_position_long',
|
|
3114
|
+
type: 'sint32',
|
|
3115
|
+
scale: null,
|
|
3116
|
+
offset: 0,
|
|
3117
|
+
units: 'semicircles',
|
|
3118
|
+
},
|
|
3119
|
+
23: {
|
|
3120
|
+
field: 'end_position_lat',
|
|
3121
|
+
type: 'sint32',
|
|
3122
|
+
scale: null,
|
|
3123
|
+
offset: 0,
|
|
3124
|
+
units: 'semicircles',
|
|
3125
|
+
},
|
|
3126
|
+
24: {
|
|
3127
|
+
field: 'end_position_long',
|
|
3128
|
+
type: 'sint32',
|
|
3129
|
+
scale: null,
|
|
3130
|
+
offset: 0,
|
|
3131
|
+
units: 'semicircles',
|
|
3132
|
+
},
|
|
3133
|
+
25: {
|
|
3134
|
+
field: 'max_speed',
|
|
3135
|
+
type: 'uint32',
|
|
3136
|
+
scale: 1000,
|
|
3137
|
+
offset: 0,
|
|
3138
|
+
units: 'm/s',
|
|
3139
|
+
},
|
|
3140
|
+
26: {
|
|
3141
|
+
field: 'avg_vert_speed',
|
|
3142
|
+
type: 'sint32',
|
|
3143
|
+
scale: 1000,
|
|
3144
|
+
offset: 0,
|
|
3145
|
+
units: 'm/s',
|
|
3146
|
+
},
|
|
3147
|
+
27: {
|
|
3148
|
+
field: 'end_time',
|
|
3149
|
+
type: 'date_time',
|
|
3150
|
+
scale: null,
|
|
3151
|
+
offset: 0,
|
|
3152
|
+
units: '',
|
|
3153
|
+
},
|
|
3154
|
+
28: {
|
|
3155
|
+
field: 'total_calories',
|
|
3156
|
+
type: 'uint32',
|
|
3157
|
+
scale: null,
|
|
3158
|
+
offset: 0,
|
|
3159
|
+
units: 'kcal',
|
|
3160
|
+
},
|
|
3161
|
+
74: {
|
|
3162
|
+
field: 'start_elevation',
|
|
3163
|
+
type: 'uint32',
|
|
3164
|
+
scale: 5,
|
|
3165
|
+
offset: -500,
|
|
3166
|
+
units: 'm',
|
|
3167
|
+
},
|
|
3168
|
+
78: {
|
|
3169
|
+
field: 'active_time',
|
|
3170
|
+
type: 'uint32',
|
|
3171
|
+
scale: 1000,
|
|
3172
|
+
offset: 0,
|
|
3173
|
+
units: 's',
|
|
3174
|
+
},
|
|
3175
|
+
107: {
|
|
3176
|
+
field: 'beginning_potential_stamina',
|
|
3177
|
+
type: 'uint8',
|
|
3178
|
+
scale: 1,
|
|
3179
|
+
offset: 0,
|
|
3180
|
+
units: 'percent',
|
|
3181
|
+
},
|
|
3182
|
+
108: {
|
|
3183
|
+
field: 'ending_potential_stamina',
|
|
3184
|
+
type: 'uint8',
|
|
3185
|
+
scale: 1,
|
|
3186
|
+
offset: 0,
|
|
3187
|
+
units: 'percent',
|
|
3188
|
+
},
|
|
3189
|
+
109: {
|
|
3190
|
+
field: 'min_stamina',
|
|
3191
|
+
type: 'uint8',
|
|
3192
|
+
scale: 1,
|
|
3193
|
+
offset: 0,
|
|
3194
|
+
units: 'percent',
|
|
3195
|
+
},
|
|
3196
|
+
110: {
|
|
3197
|
+
field: 'total_moving_time',
|
|
3198
|
+
type: 'uint32',
|
|
3199
|
+
scale: 1000,
|
|
3200
|
+
offset: 0,
|
|
3201
|
+
units: 's',
|
|
3202
|
+
},
|
|
3203
|
+
},
|
|
3204
|
+
313: {
|
|
3205
|
+
name: 'split_summary',
|
|
3206
|
+
254: {
|
|
3207
|
+
field: 'message_index',
|
|
3208
|
+
type: 'message_index',
|
|
3209
|
+
scale: null,
|
|
3210
|
+
offset: 0,
|
|
3211
|
+
units: '',
|
|
3212
|
+
},
|
|
3213
|
+
0: {
|
|
3214
|
+
field: 'split_type',
|
|
3215
|
+
type: 'split_type',
|
|
3216
|
+
scale: null,
|
|
3217
|
+
offset: 0,
|
|
3218
|
+
units: '',
|
|
3219
|
+
},
|
|
3220
|
+
3: {
|
|
3221
|
+
field: 'num_splits',
|
|
3222
|
+
type: 'uint16',
|
|
3223
|
+
scale: null,
|
|
3224
|
+
offset: 0,
|
|
3225
|
+
units: '',
|
|
3226
|
+
},
|
|
3227
|
+
4: {
|
|
3228
|
+
field: 'total_timer_time',
|
|
3229
|
+
type: 'uint32',
|
|
3230
|
+
scale: 1000,
|
|
3231
|
+
offset: 0,
|
|
3232
|
+
units: 's',
|
|
3233
|
+
},
|
|
3234
|
+
5: {
|
|
3235
|
+
field: 'total_distance',
|
|
3236
|
+
type: 'uint32',
|
|
3237
|
+
scale: 100,
|
|
3238
|
+
offset: 0,
|
|
3239
|
+
units: 'm',
|
|
3240
|
+
},
|
|
3241
|
+
6: {
|
|
3242
|
+
field: 'avg_speed',
|
|
3243
|
+
type: 'uint32',
|
|
3244
|
+
scale: 1000,
|
|
3245
|
+
offset: 0,
|
|
3246
|
+
units: 'm/s',
|
|
3247
|
+
},
|
|
3248
|
+
7: {
|
|
3249
|
+
field: 'max_speed',
|
|
3250
|
+
type: 'uint32',
|
|
3251
|
+
scale: 1000,
|
|
3252
|
+
offset: 0,
|
|
3253
|
+
units: 'm/s',
|
|
3254
|
+
},
|
|
3255
|
+
8: {
|
|
3256
|
+
field: 'total_ascent',
|
|
3257
|
+
type: 'uint16',
|
|
3258
|
+
scale: null,
|
|
3259
|
+
offset: 0,
|
|
3260
|
+
units: 'm',
|
|
3261
|
+
},
|
|
3262
|
+
9: {
|
|
3263
|
+
field: 'total_descent',
|
|
3264
|
+
type: 'uint16',
|
|
3265
|
+
scale: null,
|
|
3266
|
+
offset: 0,
|
|
3267
|
+
units: 'm',
|
|
3268
|
+
},
|
|
3269
|
+
10: {
|
|
3270
|
+
field: 'avg_heart_rate',
|
|
3271
|
+
type: 'uint8',
|
|
3272
|
+
scale: null,
|
|
3273
|
+
offset: 0,
|
|
3274
|
+
units: 'bpm',
|
|
3275
|
+
},
|
|
3276
|
+
11: {
|
|
3277
|
+
field: 'max_heart_rate',
|
|
3278
|
+
type: 'uint8',
|
|
3279
|
+
scale: null,
|
|
3280
|
+
offset: 0,
|
|
3281
|
+
units: 'bpm',
|
|
3282
|
+
},
|
|
3283
|
+
12: {
|
|
3284
|
+
field: 'avg_vert_speed',
|
|
3285
|
+
type: 'sint32',
|
|
3286
|
+
scale: 1000,
|
|
3287
|
+
offset: 0,
|
|
3288
|
+
units: 'm/s',
|
|
3289
|
+
},
|
|
3290
|
+
13: {
|
|
3291
|
+
field: 'total_calories',
|
|
3292
|
+
type: 'uint32',
|
|
3293
|
+
scale: null,
|
|
3294
|
+
offset: 0,
|
|
3295
|
+
units: 'kcal',
|
|
3296
|
+
},
|
|
3297
|
+
65: {
|
|
3298
|
+
field: 'active_time',
|
|
3299
|
+
type: 'uint32',
|
|
3300
|
+
scale: 1000,
|
|
3301
|
+
offset: 0,
|
|
3302
|
+
units: 's',
|
|
3303
|
+
},
|
|
3304
|
+
77: {
|
|
3305
|
+
field: 'total_moving_time',
|
|
3306
|
+
type: 'uint32',
|
|
3307
|
+
scale: 1000,
|
|
3308
|
+
offset: 0,
|
|
3309
|
+
units: 's',
|
|
3310
|
+
},
|
|
3004
3311
|
},
|
|
3005
3312
|
285: {
|
|
3006
3313
|
name: 'jump',
|
|
@@ -5082,6 +5389,8 @@ export const FIT = {
|
|
|
5082
5389
|
264: 'exercise_title',
|
|
5083
5390
|
268: 'dive_summary',
|
|
5084
5391
|
285: 'jump',
|
|
5392
|
+
312: 'split',
|
|
5393
|
+
313: 'split_summary',
|
|
5085
5394
|
317: 'climb_pro',
|
|
5086
5395
|
319: 'tank_update',
|
|
5087
5396
|
323: 'tank_summary',
|
|
@@ -6598,6 +6907,29 @@ export const FIT = {
|
|
|
6598
6907
|
0: 'starred',
|
|
6599
6908
|
1: 'suggested',
|
|
6600
6909
|
},
|
|
6910
|
+
split_type: {
|
|
6911
|
+
1: 'ascent_split',
|
|
6912
|
+
2: 'descent_split',
|
|
6913
|
+
3: 'interval_active',
|
|
6914
|
+
4: 'interval_rest',
|
|
6915
|
+
5: 'interval_warmup',
|
|
6916
|
+
6: 'interval_cooldown',
|
|
6917
|
+
7: 'interval_recovery',
|
|
6918
|
+
8: 'interval_other',
|
|
6919
|
+
9: 'climb_active',
|
|
6920
|
+
10: 'climb_rest',
|
|
6921
|
+
11: 'surf_active',
|
|
6922
|
+
12: 'run_active',
|
|
6923
|
+
13: 'run_rest',
|
|
6924
|
+
14: 'workout_round',
|
|
6925
|
+
17: 'rwd_run',
|
|
6926
|
+
18: 'rwd_walk',
|
|
6927
|
+
21: 'windsurf_active',
|
|
6928
|
+
22: 'rwd_stand',
|
|
6929
|
+
23: 'transition',
|
|
6930
|
+
28: 'ski_lift_split',
|
|
6931
|
+
29: 'ski_run_split',
|
|
6932
|
+
},
|
|
6601
6933
|
source_type: {
|
|
6602
6934
|
0: 'ant',
|
|
6603
6935
|
1: 'antplus',
|
package/dist/fit_types.d.ts
CHANGED
|
@@ -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';
|
|
@@ -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[];
|
package/dist/type_generator.js
CHANGED
|
@@ -160,6 +160,8 @@ function generateAdditionalFields(msg) {
|
|
|
160
160
|
developer_data_ids: 'parsed_developer_data_id',
|
|
161
161
|
field_descriptions: 'parsed_field_description',
|
|
162
162
|
sports: 'parsed_sport',
|
|
163
|
+
splits: 'parsed_split',
|
|
164
|
+
split_summaries: 'parsed_split_summary',
|
|
163
165
|
};
|
|
164
166
|
return Object.keys(props).map(prop => generateArrayProperty(prop, ts.factory.createTypeReferenceNode(snakeToCamel(props[prop]))));
|
|
165
167
|
}
|
|
@@ -189,6 +191,8 @@ export function generateFitType() {
|
|
|
189
191
|
tank_updates: 'parsed_tank_update',
|
|
190
192
|
tank_summaries: 'parsed_tank_summary',
|
|
191
193
|
jumps: 'parsed_jump',
|
|
194
|
+
splits: 'parsed_split',
|
|
195
|
+
split_summaries: 'parsed_split_summary',
|
|
192
196
|
time_in_zone: 'parsed_time_in_zone',
|
|
193
197
|
activity_metrics: 'parsed_activity_metrics',
|
|
194
198
|
user_metrics: 'parsed_user_metrics',
|