fit-file-parser 2.3.3 → 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/binary.js +13 -5
- package/dist/cjs/binary.js +13 -5
- package/dist/cjs/fit-parser.js +18 -1
- package/dist/cjs/fit.js +436 -0
- package/dist/cjs/fit_types.d.ts +70 -1
- package/dist/cjs/type_generator.js +5 -0
- package/dist/fit-parser.js +18 -1
- package/dist/fit.js +436 -0
- package/dist/fit_types.d.ts +70 -1
- package/dist/type_generator.js +5 -0
- package/package.json +1 -1
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' | '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;
|
|
@@ -841,6 +849,22 @@ export interface ParsedMonitoring {
|
|
|
841
849
|
export interface ParsedHrv {
|
|
842
850
|
time?: number[];
|
|
843
851
|
}
|
|
852
|
+
export interface ParsedUserMetrics {
|
|
853
|
+
vo2_max?: number;
|
|
854
|
+
age?: number;
|
|
855
|
+
height?: number;
|
|
856
|
+
weight?: number;
|
|
857
|
+
gender?: Gender;
|
|
858
|
+
max_heart_rate?: number;
|
|
859
|
+
remaining_recovery_time?: number;
|
|
860
|
+
lthr?: number;
|
|
861
|
+
ltpower?: number;
|
|
862
|
+
ltspeed?: number;
|
|
863
|
+
start_of_activity?: string;
|
|
864
|
+
first_vo2_max?: number;
|
|
865
|
+
end_of_previous_activity?: string;
|
|
866
|
+
timestamp: string;
|
|
867
|
+
}
|
|
844
868
|
export interface ParsedLength {
|
|
845
869
|
event?: Event;
|
|
846
870
|
event_type?: EventType;
|
|
@@ -994,6 +1018,48 @@ export interface ParsedJump {
|
|
|
994
1018
|
enhanced_speed?: number;
|
|
995
1019
|
timestamp: string;
|
|
996
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
|
+
}
|
|
997
1063
|
export interface ParsedTankUpdate {
|
|
998
1064
|
sensor?: number;
|
|
999
1065
|
pressure?: number;
|
|
@@ -1038,6 +1104,9 @@ export interface ParsedFit {
|
|
|
1038
1104
|
tank_updates?: ParsedTankUpdate[];
|
|
1039
1105
|
tank_summaries?: ParsedTankSummary[];
|
|
1040
1106
|
jumps?: ParsedJump[];
|
|
1107
|
+
splits?: ParsedSplit[];
|
|
1108
|
+
split_summaries?: ParsedSplitSummary[];
|
|
1041
1109
|
time_in_zone?: ParsedTimeInZone[];
|
|
1042
1110
|
activity_metrics?: ParsedActivityMetrics[];
|
|
1111
|
+
user_metrics?: ParsedUserMetrics[];
|
|
1043
1112
|
}
|
|
@@ -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,8 +211,11 @@ 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',
|
|
218
|
+
user_metrics: 'parsed_user_metrics',
|
|
214
219
|
};
|
|
215
220
|
const referenceProperties = {
|
|
216
221
|
file_creator: 'parsed_file_creator',
|
package/dist/fit-parser.js
CHANGED
|
@@ -100,8 +100,11 @@ 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 = [];
|
|
107
|
+
const user_metrics = [];
|
|
105
108
|
let loopIndex = headerLength;
|
|
106
109
|
const messageTypes = [];
|
|
107
110
|
const developerFields = [];
|
|
@@ -200,12 +203,21 @@ export default class FitParser {
|
|
|
200
203
|
case 'jump':
|
|
201
204
|
jumps.push(message);
|
|
202
205
|
break;
|
|
206
|
+
case 'split':
|
|
207
|
+
splits.push(message);
|
|
208
|
+
break;
|
|
209
|
+
case 'split_summary':
|
|
210
|
+
split_summaries.push(message);
|
|
211
|
+
break;
|
|
203
212
|
case 'time_in_zone':
|
|
204
213
|
time_in_zone.push(message);
|
|
205
214
|
break;
|
|
206
215
|
case 'activity_metrics':
|
|
207
216
|
activity_metrics.push(message);
|
|
208
217
|
break;
|
|
218
|
+
case 'user_metrics':
|
|
219
|
+
user_metrics.push(message);
|
|
220
|
+
break;
|
|
209
221
|
default:
|
|
210
222
|
if (messageType !== '') {
|
|
211
223
|
fitObj[messageType] = message;
|
|
@@ -226,8 +238,11 @@ export default class FitParser {
|
|
|
226
238
|
fitObj.tank_updates = tank_updates;
|
|
227
239
|
fitObj.tank_summaries = tank_summaries;
|
|
228
240
|
fitObj.jumps = jumps;
|
|
241
|
+
fitObj.splits = splits;
|
|
242
|
+
fitObj.split_summaries = split_summaries;
|
|
229
243
|
fitObj.time_in_zone = time_in_zone;
|
|
230
244
|
fitObj.activity_metrics = activity_metrics;
|
|
245
|
+
fitObj.user_metrics = user_metrics;
|
|
231
246
|
if (isCascadeNeeded) {
|
|
232
247
|
laps = mapDataIntoLap(laps, 'records', records);
|
|
233
248
|
laps = mapDataIntoLap(laps, 'lengths', lengths);
|
|
@@ -236,7 +251,9 @@ export default class FitParser {
|
|
|
236
251
|
sessions,
|
|
237
252
|
events,
|
|
238
253
|
hrv,
|
|
239
|
-
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 });
|
|
240
257
|
}
|
|
241
258
|
if (!isModeCascade) {
|
|
242
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',
|
|
@@ -4131,6 +4438,109 @@ export const FIT = {
|
|
|
4131
4438
|
units: 'counts',
|
|
4132
4439
|
},
|
|
4133
4440
|
},
|
|
4441
|
+
// Undocumented Garmin user metrics message. Observed in activity FIT files exported
|
|
4442
|
+
// from Garmin Connect and displayed by fitfileviewer as "User Metrics".
|
|
4443
|
+
79: {
|
|
4444
|
+
name: 'user_metrics',
|
|
4445
|
+
253: {
|
|
4446
|
+
field: 'timestamp',
|
|
4447
|
+
type: 'date_time',
|
|
4448
|
+
scale: null,
|
|
4449
|
+
offset: 0,
|
|
4450
|
+
units: '',
|
|
4451
|
+
},
|
|
4452
|
+
0: {
|
|
4453
|
+
field: 'vo2_max',
|
|
4454
|
+
type: 'uint16',
|
|
4455
|
+
scale: 1024 / 3.5,
|
|
4456
|
+
offset: 0,
|
|
4457
|
+
units: 'ml/kg/min',
|
|
4458
|
+
},
|
|
4459
|
+
1: {
|
|
4460
|
+
field: 'age',
|
|
4461
|
+
type: 'uint8',
|
|
4462
|
+
scale: null,
|
|
4463
|
+
offset: 0,
|
|
4464
|
+
units: 'years',
|
|
4465
|
+
},
|
|
4466
|
+
2: {
|
|
4467
|
+
field: 'height',
|
|
4468
|
+
type: 'uint8',
|
|
4469
|
+
scale: 100,
|
|
4470
|
+
offset: 0,
|
|
4471
|
+
units: 'm',
|
|
4472
|
+
},
|
|
4473
|
+
3: {
|
|
4474
|
+
field: 'weight',
|
|
4475
|
+
type: 'uint16',
|
|
4476
|
+
scale: 10,
|
|
4477
|
+
offset: 0,
|
|
4478
|
+
units: 'kg',
|
|
4479
|
+
},
|
|
4480
|
+
4: {
|
|
4481
|
+
field: 'gender',
|
|
4482
|
+
type: 'gender',
|
|
4483
|
+
scale: null,
|
|
4484
|
+
offset: 0,
|
|
4485
|
+
units: '',
|
|
4486
|
+
},
|
|
4487
|
+
6: {
|
|
4488
|
+
field: 'max_heart_rate',
|
|
4489
|
+
type: 'uint8',
|
|
4490
|
+
scale: null,
|
|
4491
|
+
offset: 0,
|
|
4492
|
+
units: 'bpm',
|
|
4493
|
+
},
|
|
4494
|
+
8: {
|
|
4495
|
+
field: 'remaining_recovery_time',
|
|
4496
|
+
type: 'uint16',
|
|
4497
|
+
scale: null,
|
|
4498
|
+
offset: 0,
|
|
4499
|
+
units: '',
|
|
4500
|
+
},
|
|
4501
|
+
11: {
|
|
4502
|
+
field: 'lthr',
|
|
4503
|
+
type: 'uint16',
|
|
4504
|
+
scale: null,
|
|
4505
|
+
offset: 0,
|
|
4506
|
+
units: 'bpm',
|
|
4507
|
+
},
|
|
4508
|
+
12: {
|
|
4509
|
+
field: 'ltpower',
|
|
4510
|
+
type: 'uint16',
|
|
4511
|
+
scale: null,
|
|
4512
|
+
offset: 0,
|
|
4513
|
+
units: 'watts',
|
|
4514
|
+
},
|
|
4515
|
+
13: {
|
|
4516
|
+
field: 'ltspeed',
|
|
4517
|
+
type: 'uint16',
|
|
4518
|
+
scale: 1000,
|
|
4519
|
+
offset: 0,
|
|
4520
|
+
units: 'm/s',
|
|
4521
|
+
},
|
|
4522
|
+
16: {
|
|
4523
|
+
field: 'start_of_activity',
|
|
4524
|
+
type: 'date_time',
|
|
4525
|
+
scale: null,
|
|
4526
|
+
offset: 0,
|
|
4527
|
+
units: '',
|
|
4528
|
+
},
|
|
4529
|
+
19: {
|
|
4530
|
+
field: 'first_vo2_max',
|
|
4531
|
+
type: 'uint32',
|
|
4532
|
+
scale: 65536 / 3.5,
|
|
4533
|
+
offset: 0,
|
|
4534
|
+
units: 'ml/kg/min',
|
|
4535
|
+
},
|
|
4536
|
+
35: {
|
|
4537
|
+
field: 'end_of_previous_activity',
|
|
4538
|
+
type: 'date_time',
|
|
4539
|
+
scale: null,
|
|
4540
|
+
offset: 0,
|
|
4541
|
+
units: '',
|
|
4542
|
+
},
|
|
4543
|
+
},
|
|
4134
4544
|
103: {
|
|
4135
4545
|
name: 'monitoring_info',
|
|
4136
4546
|
253: {
|
|
@@ -4927,6 +5337,7 @@ export const FIT = {
|
|
|
4927
5337
|
55: 'monitoring',
|
|
4928
5338
|
72: 'training_file',
|
|
4929
5339
|
78: 'hrv',
|
|
5340
|
+
79: 'user_metrics',
|
|
4930
5341
|
80: 'ant_rx',
|
|
4931
5342
|
81: 'ant_tx',
|
|
4932
5343
|
82: 'ant_channel_id',
|
|
@@ -4978,6 +5389,8 @@ export const FIT = {
|
|
|
4978
5389
|
264: 'exercise_title',
|
|
4979
5390
|
268: 'dive_summary',
|
|
4980
5391
|
285: 'jump',
|
|
5392
|
+
312: 'split',
|
|
5393
|
+
313: 'split_summary',
|
|
4981
5394
|
317: 'climb_pro',
|
|
4982
5395
|
319: 'tank_update',
|
|
4983
5396
|
323: 'tank_summary',
|
|
@@ -6494,6 +6907,29 @@ export const FIT = {
|
|
|
6494
6907
|
0: 'starred',
|
|
6495
6908
|
1: 'suggested',
|
|
6496
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
|
+
},
|
|
6497
6933
|
source_type: {
|
|
6498
6934
|
0: 'ant',
|
|
6499
6935
|
1: 'antplus',
|