fit_parser 0.0.8 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bindata/dsl_field_validator.rb +28 -0
- data/lib/fit_parser/file/data.rb +54 -2
- data/lib/fit_parser/file/definition.rb +103 -0
- data/lib/fit_parser/file/definitions.rb +95 -1
- data/lib/fit_parser/file/record.rb +8 -3
- data/lib/fit_parser/file/record_header.rb +2 -1
- data/lib/fit_parser/file/types.rb +651 -9
- data/lib/fit_parser/file.rb +7 -1
- data/lib/fit_parser/version.rb +1 -1
- data/lib/fit_parser.rb +1 -0
- data/spec/file/data_spec.rb +4 -3
- data/spec/file/record_spec.rb +5 -5
- data/spec/fit_parser_spec.rb +26 -0
- data/spec/support/examples/1375670253.fit +0 -0
- data/spec/support/examples/1379311720.fit +0 -0
- data/spec/support/examples/1426768070-2.fit +0 -0
- data/spec/support/examples/6AUI5200.FIT +0 -0
- metadata +7 -2
@@ -62,6 +62,9 @@ FitParser::File::Types.add_type :uint8z, nil, invalid: 0x00
|
|
62
62
|
FitParser::File::Types.add_type :uint16z, nil, invalid: 0x0000
|
63
63
|
FitParser::File::Types.add_type :uint32z, nil, invalid: 0x00000000
|
64
64
|
FitParser::File::Types.add_type :byte, nil, invalid: 0xFF
|
65
|
+
FitParser::File::Types.add_type :sint64, nil, invalid: 0x7FFFFFFFFFFFFFFF
|
66
|
+
FitParser::File::Types.add_type :uint64, nil, invalid: 0xFFFFFFFFFFFFFFFF
|
67
|
+
FitParser::File::Types.add_type :uint64z, nil, invalid: 0x0000000000000000
|
65
68
|
|
66
69
|
# derived types
|
67
70
|
FitParser::File::Types.add_type :file, :enum, values: {
|
@@ -79,7 +82,13 @@ FitParser::File::Types.add_type :file, :enum, values: {
|
|
79
82
|
15 => 'monitoring_a',
|
80
83
|
20 => 'activity_summary',
|
81
84
|
28 => 'monitoring_daily',
|
82
|
-
32 => 'monitoring_b'
|
85
|
+
32 => 'monitoring_b',
|
86
|
+
34 => 'segment',
|
87
|
+
35 => 'segment_list',
|
88
|
+
40 => 'exd_configuration',
|
89
|
+
247 => 'mfg_range_min',
|
90
|
+
254 => 'mfg_range_max'
|
91
|
+
}
|
83
92
|
FitParser::File::Types.add_type :mesg_num, :uint16, values: {
|
84
93
|
0 => 'file_id',
|
85
94
|
1 => 'capabilities',
|
@@ -123,6 +132,32 @@ FitParser::File::Types.add_type :mesg_num, :uint16, values: {
|
|
123
132
|
106 => 'slave_device',
|
124
133
|
131 => 'cadence_zone',
|
125
134
|
145 => 'memo_glob',
|
135
|
+
148 => 'segment_id',
|
136
|
+
149 => 'segment_leaderboard_entry',
|
137
|
+
150 => 'segment_point',
|
138
|
+
151 => 'segment_file',
|
139
|
+
159 => 'watchface_settings',
|
140
|
+
160 => 'gps_metadata',
|
141
|
+
161 => 'camera_event',
|
142
|
+
162 => 'timestamp_correlation',
|
143
|
+
164 => 'gyroscope_data',
|
144
|
+
165 => 'accelerometer_data',
|
145
|
+
167 => 'three_d_sensor_calibration',
|
146
|
+
169 => 'video_frame',
|
147
|
+
174 => 'obdii_data',
|
148
|
+
177 => 'nmea_sentence',
|
149
|
+
178 => 'aviation_attitude',
|
150
|
+
184 => 'video',
|
151
|
+
185 => 'video_title',
|
152
|
+
186 => 'video_description',
|
153
|
+
187 => 'video_clip',
|
154
|
+
188 => 'ohr_settings',
|
155
|
+
200 => 'exd_screen_configuration',
|
156
|
+
201 => 'exd_data_field_configuration',
|
157
|
+
202 => 'exd_data_concept_configuration',
|
158
|
+
206 => 'field_description',
|
159
|
+
207 => 'developer_data_id',
|
160
|
+
208 => 'magnetometer_data',
|
126
161
|
65280 => 'mfg_range_min',
|
127
162
|
65534 => 'mfg_range_max' }
|
128
163
|
FitParser::File::Types.add_type :checksum, :uint8, values: {
|
@@ -176,7 +211,54 @@ FitParser::File::Types.add_type :language, :enum, values: {
|
|
176
211
|
23 => 'farsi',
|
177
212
|
24 => 'bulgarian',
|
178
213
|
25 => 'romanian',
|
214
|
+
26 => 'chinese',
|
215
|
+
27 => 'japanese',
|
216
|
+
28 => 'korean',
|
217
|
+
29 => 'taiwanese',
|
218
|
+
30 => 'thai',
|
219
|
+
31 => 'hebrew',
|
220
|
+
32 => 'brazilian_portuguese',
|
221
|
+
33 => 'indonesian',
|
179
222
|
254 => 'custom' }
|
223
|
+
FitParser::File::Types.add_type :language_bits_0, :uint8z, values: {
|
224
|
+
0x01 => 'english',
|
225
|
+
0x02 => 'french',
|
226
|
+
0x04 => 'italian',
|
227
|
+
0x08 => 'german',
|
228
|
+
0x10 => 'spanish',
|
229
|
+
0x20 => 'croatian',
|
230
|
+
0x40 => 'czech',
|
231
|
+
0x80 => 'danish' }
|
232
|
+
FitParser::File::Types.add_type :language_bits_1, :uint8z, values: {
|
233
|
+
0x01 => 'dutch',
|
234
|
+
0x02 => 'finnish',
|
235
|
+
0x04 => 'greek',
|
236
|
+
0x08 => 'hungarian',
|
237
|
+
0x10 => 'norwegian',
|
238
|
+
0x20 => 'polish',
|
239
|
+
0x40 => 'portuguese',
|
240
|
+
0x80 => 'slovakian' }
|
241
|
+
FitParser::File::Types.add_type :language_bits_2, :uint8z, values: {
|
242
|
+
0x01 => 'slovenian',
|
243
|
+
0x02 => 'swedish',
|
244
|
+
0x04 => 'russian',
|
245
|
+
0x08 => 'turkish',
|
246
|
+
0x10 => 'latvian',
|
247
|
+
0x20 => 'ukrainian',
|
248
|
+
0x40 => 'arabic',
|
249
|
+
0x80 => 'farsi' }
|
250
|
+
FitParser::File::Types.add_type :language_bits_3, :uint8z, values: {
|
251
|
+
0x01 => 'bulgarian',
|
252
|
+
0x02 => 'romanian',
|
253
|
+
0x04 => 'chinese',
|
254
|
+
0x08 => 'japanese',
|
255
|
+
0x10 => 'korean',
|
256
|
+
0x20 => 'taiwanese',
|
257
|
+
0x40 => 'thai',
|
258
|
+
0x80 => 'hebrew' }
|
259
|
+
FitParser::File::Types.add_type :language_bits_4, :uint8z, values: {
|
260
|
+
0x01 => 'brazilian_portuguese',
|
261
|
+
0x02 => 'indonesian' }
|
180
262
|
FitParser::File::Types.add_type :time_zone, :enum, values: {
|
181
263
|
0 => 'almaty',
|
182
264
|
1 => 'bangkok',
|
@@ -337,6 +419,10 @@ FitParser::File::Types.add_type :display_position, :enum, values: {
|
|
337
419
|
39 => 'estonian_grid',
|
338
420
|
40 => 'latvian_grid',
|
339
421
|
41 => 'swedish_ref_99_grid' }
|
422
|
+
FitParser::File::Types.add_type :switch, :enum, values: {
|
423
|
+
0 => 'off',
|
424
|
+
1 => 'on',
|
425
|
+
2 => 'auto' }
|
340
426
|
FitParser::File::Types.add_type :sport, :enum, values: {
|
341
427
|
0 => 'generic',
|
342
428
|
1 => 'running',
|
@@ -358,6 +444,35 @@ FitParser::File::Types.add_type :sport, :enum, values: {
|
|
358
444
|
17 => 'hiking',
|
359
445
|
18 => 'multisport',
|
360
446
|
19 => 'paddling',
|
447
|
+
20 => 'flying',
|
448
|
+
21 => 'e_biking',
|
449
|
+
22 => 'motorcycling',
|
450
|
+
23 => 'boating',
|
451
|
+
24 => 'driving',
|
452
|
+
25 => 'golf',
|
453
|
+
26 => 'hang_gliding',
|
454
|
+
27 => 'horseback_riding',
|
455
|
+
28 => 'hunting',
|
456
|
+
29 => 'fishing',
|
457
|
+
30 => 'inline_skating',
|
458
|
+
31 => 'rock_climbing',
|
459
|
+
32 => 'sailing',
|
460
|
+
33 => 'ice_skating',
|
461
|
+
34 => 'sky_diving',
|
462
|
+
35 => 'snowshoeing',
|
463
|
+
36 => 'snowmobiling',
|
464
|
+
37 => 'stand_up_paddleboarding',
|
465
|
+
38 => 'surfing',
|
466
|
+
39 => 'wakeboarding',
|
467
|
+
40 => 'water_skiing',
|
468
|
+
41 => 'kayaking',
|
469
|
+
42 => 'rafting',
|
470
|
+
43 => 'windsurfing',
|
471
|
+
44 => 'kitesurfing',
|
472
|
+
45 => 'tactical',
|
473
|
+
46 => 'jumpmaster',
|
474
|
+
47 => 'boxing',
|
475
|
+
48 => 'floor_climbing',
|
361
476
|
254 => 'all' }
|
362
477
|
FitParser::File::Types.add_type :sport_bits_0, :uint8z, values: {
|
363
478
|
1 => 'generic',
|
@@ -381,7 +496,40 @@ FitParser::File::Types.add_type :sport_bits_2, :uint8z, values: {
|
|
381
496
|
1 => 'mountaineering',
|
382
497
|
2 => 'hiking',
|
383
498
|
4 => 'multisport',
|
384
|
-
8 => 'paddling'
|
499
|
+
8 => 'paddling',
|
500
|
+
16 => 'flying',
|
501
|
+
32 => 'e_biking',
|
502
|
+
64 => 'motorcycling',
|
503
|
+
128 => 'boating' }
|
504
|
+
FitParser::File::Types.add_type :sport_bits_3, :uint8z, values: {
|
505
|
+
1 => 'driving',
|
506
|
+
2 => 'golf',
|
507
|
+
4 => 'hang_gliding',
|
508
|
+
8 => 'horseback_riding',
|
509
|
+
16 => 'hunting',
|
510
|
+
32 => 'fishing',
|
511
|
+
64 => 'inline_skating',
|
512
|
+
128 => 'rock_climbing' }
|
513
|
+
FitParser::File::Types.add_type :sport_bits_4, :uint8z, values: {
|
514
|
+
1 => 'sailing',
|
515
|
+
2 => 'ice_skating',
|
516
|
+
4 => 'sky_diving',
|
517
|
+
8 => 'snowshoeing',
|
518
|
+
16 => 'snowmobiling',
|
519
|
+
32 => 'stand_up_paddleboarding',
|
520
|
+
64 => 'surfing',
|
521
|
+
128 => 'wakeboarding' }
|
522
|
+
FitParser::File::Types.add_type :sport_bits_5, :uint8z, values: {
|
523
|
+
1 => 'water_skiing',
|
524
|
+
2 => 'kayaking',
|
525
|
+
4 => 'rafting',
|
526
|
+
8 => 'windsurfing',
|
527
|
+
16 => 'kitesurfing',
|
528
|
+
32 => 'tactical',
|
529
|
+
64 => 'jumpmaster',
|
530
|
+
128 => 'boxing' }
|
531
|
+
FitParser::File::Types.add_type :sport_bits_6, :uint8z, values: {
|
532
|
+
1 => 'floor_climbing' }
|
385
533
|
FitParser::File::Types.add_type :sub_sport, :enum, values: {
|
386
534
|
0 => 'generic',
|
387
535
|
1 => 'treadmill',
|
@@ -410,7 +558,42 @@ FitParser::File::Types.add_type :sub_sport, :enum, values: {
|
|
410
558
|
24 => 'challenge',
|
411
559
|
25 => 'indoor_skiing',
|
412
560
|
26 => 'cardio_training',
|
561
|
+
27 => 'indoor_walking',
|
562
|
+
28 => 'e_bike_fitness',
|
563
|
+
29 => 'bmx',
|
564
|
+
30 => 'casual_walking',
|
565
|
+
31 => 'speed_walking',
|
566
|
+
32 => 'bike_to_run_transition',
|
567
|
+
33 => 'run_to_bike_transition',
|
568
|
+
34 => 'swim_to_bike_transition',
|
569
|
+
35 => 'atv',
|
570
|
+
36 => 'motocross',
|
571
|
+
37 => 'backcountry',
|
572
|
+
38 => 'resort',
|
573
|
+
39 => 'rc_drone',
|
574
|
+
40 => 'wingsuit',
|
575
|
+
41 => 'whitewater',
|
576
|
+
42 => 'skate_skiing',
|
577
|
+
43 => 'yoga',
|
578
|
+
44 => 'pilates',
|
579
|
+
45 => 'indoor_running',
|
580
|
+
46 => 'gravel_cycling',
|
581
|
+
47 => 'e_bike_mountain',
|
582
|
+
48 => 'commuting',
|
583
|
+
49 => 'mixed_surface',
|
584
|
+
50 => 'navigate',
|
585
|
+
51 => 'track_me',
|
413
586
|
254 => 'all' }
|
587
|
+
FitParser::File::Types.add_type :sport_event, :enum, values: {
|
588
|
+
0 => 'uncategorized',
|
589
|
+
1 => 'geocaching',
|
590
|
+
2 => 'fitness',
|
591
|
+
3 => 'recreation',
|
592
|
+
4 => 'race',
|
593
|
+
5 => 'special_event',
|
594
|
+
6 => 'training',
|
595
|
+
7 => 'transportation',
|
596
|
+
8 => 'touring' }
|
414
597
|
FitParser::File::Types.add_type :activity, :enum, values: {
|
415
598
|
0 => 'manual',
|
416
599
|
1 => 'auto_multi_sport' }
|
@@ -442,6 +625,24 @@ FitParser::File::Types.add_type :lap_trigger, :enum, values: {
|
|
442
625
|
6 => 'position_marked',
|
443
626
|
7 => 'session_end',
|
444
627
|
8 => 'fitness_equipment' }
|
628
|
+
FitParser::File::Types.add_type :time_mode, :enum, values: {
|
629
|
+
0 => 'hour12',
|
630
|
+
1 => 'hour24',
|
631
|
+
2 => 'military',
|
632
|
+
3 => 'hour_12_with_seconds',
|
633
|
+
4 => 'hour_24_with_seconds',
|
634
|
+
5 => 'utc' }
|
635
|
+
FitParser::File::Types.add_type :backlight_mode, :enum, values: {
|
636
|
+
0 => 'off',
|
637
|
+
1 => 'manual',
|
638
|
+
2 => 'key_and_messages',
|
639
|
+
3 => 'auto_brightness',
|
640
|
+
4 => 'smart_notifications',
|
641
|
+
5 => 'key_and_messages_night',
|
642
|
+
6 => 'key_and_messages_and_smart_notifications' }
|
643
|
+
FitParser::File::Types.add_type :date_mode, :enum, values: {
|
644
|
+
0 => 'day_month',
|
645
|
+
1 => 'month_day' }
|
445
646
|
FitParser::File::Types.add_type :event, :enum, values: {
|
446
647
|
0 => 'timer',
|
447
648
|
3 => 'workout',
|
@@ -476,7 +677,8 @@ FitParser::File::Types.add_type :event, :enum, values: {
|
|
476
677
|
42 => 'front_gear_change',
|
477
678
|
43 => 'rear_gear_change',
|
478
679
|
45 => 'elev_high_alert',
|
479
|
-
46 => 'elev_low_alert'
|
680
|
+
46 => 'elev_low_alert',
|
681
|
+
47 => 'comm_timeout' }
|
480
682
|
FitParser::File::Types.add_type :event_type, :enum, values: {
|
481
683
|
0 => 'start',
|
482
684
|
1 => 'stop',
|
@@ -497,6 +699,11 @@ FitParser::File::Types.add_type :fitness_equipment_state, :enum, values: {
|
|
497
699
|
1 => 'in_use',
|
498
700
|
2 => 'paused',
|
499
701
|
3 => 'unknown' }
|
702
|
+
FitParser::File::Types.add_type :autoscroll, :enum, values: {
|
703
|
+
0 => 'none',
|
704
|
+
1 => 'slow',
|
705
|
+
2 => 'medium',
|
706
|
+
3 => 'fast' }
|
500
707
|
FitParser::File::Types.add_type :activity_class, :enum, values: {
|
501
708
|
127 => 'level',
|
502
709
|
100 => 'level_max',
|
@@ -539,7 +746,9 @@ FitParser::File::Types.add_type :goal, :enum, values: {
|
|
539
746
|
1 => 'distance',
|
540
747
|
2 => 'calories',
|
541
748
|
3 => 'frequency',
|
542
|
-
4 => 'steps'
|
749
|
+
4 => 'steps',
|
750
|
+
5 => 'ascent',
|
751
|
+
6 => 'active_minutes' }
|
543
752
|
FitParser::File::Types.add_type :goal_recurrence, :enum, values: {
|
544
753
|
0 => 'off',
|
545
754
|
1 => 'daily',
|
@@ -547,6 +756,10 @@ FitParser::File::Types.add_type :goal_recurrence, :enum, values: {
|
|
547
756
|
3 => 'monthly',
|
548
757
|
4 => 'yearly',
|
549
758
|
5 => 'custom' }
|
759
|
+
FitParser::File::Types.add_type :goal_source, :enum, values: {
|
760
|
+
0 => 'auto',
|
761
|
+
1 => 'community',
|
762
|
+
2 => 'user' }
|
550
763
|
FitParser::File::Types.add_type :schedule, :enum, values: {
|
551
764
|
0 => 'workout',
|
552
765
|
1 => 'course' }
|
@@ -574,7 +787,9 @@ FitParser::File::Types.add_type :course_point, :enum, values: {
|
|
574
787
|
20 => 'sharp_left',
|
575
788
|
21 => 'slight_right',
|
576
789
|
22 => 'sharp_right',
|
577
|
-
23 => 'u_turn'
|
790
|
+
23 => 'u_turn',
|
791
|
+
24 => 'segment_start',
|
792
|
+
25 => 'segment_end' }
|
578
793
|
FitParser::File::Types.add_type :manufacturer, :uint16, values: {
|
579
794
|
1 => 'garmin',
|
580
795
|
2 => 'garmin_fr405_antfs',
|
@@ -666,10 +881,38 @@ FitParser::File::Types.add_type :manufacturer, :uint16, values: {
|
|
666
881
|
91 => 'magtonic',
|
667
882
|
92 => '1partcarbon',
|
668
883
|
93 => 'inside_ride_technologies',
|
884
|
+
94 => 'sound_of_motion',
|
885
|
+
95 => 'stryd',
|
886
|
+
96 => 'icg',
|
887
|
+
97 => 'MiPulse',
|
888
|
+
98 => 'bsx_athletics',
|
889
|
+
99 => 'look',
|
890
|
+
100 => 'campagnolo_srl',
|
891
|
+
101 => 'body_bike_smart',
|
892
|
+
102 => 'praxisworks',
|
893
|
+
103 => 'limits_technology',
|
894
|
+
104 => 'topaction_technology',
|
895
|
+
105 => 'cosinuss',
|
896
|
+
106 => 'fitcare',
|
669
897
|
255 => 'development',
|
670
898
|
257 => 'healthandlife',
|
671
899
|
258 => 'lezyne',
|
672
900
|
259 => 'scribe_labs',
|
901
|
+
260 => 'zwift',
|
902
|
+
261 => 'watteam',
|
903
|
+
262 => 'recon',
|
904
|
+
263 => 'favero_electronics',
|
905
|
+
264 => 'dynovelo',
|
906
|
+
265 => 'strava',
|
907
|
+
266 => 'precor',
|
908
|
+
267 => 'bryton',
|
909
|
+
268 => 'sram',
|
910
|
+
269 => 'navman',
|
911
|
+
270 => 'cobi',
|
912
|
+
271 => 'spivi',
|
913
|
+
272 => 'mio_magellan',
|
914
|
+
273 => 'evesports',
|
915
|
+
274 => 'sensitivus_gauge',
|
673
916
|
5759 => 'actigraphcorp' }
|
674
917
|
FitParser::File::Types.add_type :garmin_product, :uint16, values: {
|
675
918
|
1 => 'hrm1',
|
@@ -682,6 +925,9 @@ FitParser::File::Types.add_type :garmin_product, :uint16, values: {
|
|
682
925
|
8 => 'hrm_run_single_byte_product_id',
|
683
926
|
9 => 'bsm',
|
684
927
|
10 => 'bcm',
|
928
|
+
11 => 'axs01',
|
929
|
+
12 => 'hrm_tri_single_byte_product_id',
|
930
|
+
14 => 'fr225_single_byte_product_id',
|
685
931
|
473 => 'fr301_china',
|
686
932
|
474 => 'fr301_japan',
|
687
933
|
475 => 'fr301_korea',
|
@@ -734,6 +980,7 @@ FitParser::File::Types.add_type :garmin_product, :uint16, values: {
|
|
734
980
|
1736 => 'edge_touring',
|
735
981
|
1742 => 'edge510_japan',
|
736
982
|
1752 => 'hrm_run',
|
983
|
+
1765 => 'fr920xt',
|
737
984
|
1821 => 'edge510_asia',
|
738
985
|
1822 => 'edge810_china',
|
739
986
|
1823 => 'edge810_taiwan',
|
@@ -742,12 +989,70 @@ FitParser::File::Types.add_type :garmin_product, :uint16, values: {
|
|
742
989
|
1853 => 'virb_remote',
|
743
990
|
1885 => 'vivo_ki',
|
744
991
|
1903 => 'fr15',
|
992
|
+
1907 => 'vivo_active',
|
745
993
|
1918 => 'edge510_korea',
|
746
994
|
1928 => 'fr620_japan',
|
747
995
|
1929 => 'fr620_china',
|
748
996
|
1930 => 'fr220_japan',
|
749
997
|
1931 => 'fr220_china',
|
750
998
|
1967 => 'fenix2',
|
999
|
+
1988 => 'epix',
|
1000
|
+
2050 => 'fenix3',
|
1001
|
+
2052 => 'edge1000_taiwan',
|
1002
|
+
2053 => 'edge1000_japan',
|
1003
|
+
2061 => 'fr15_japan',
|
1004
|
+
2067 => 'edge520',
|
1005
|
+
2070 => 'edge1000_china',
|
1006
|
+
2072 => 'fr620_russia',
|
1007
|
+
2073 => 'fr220_russia',
|
1008
|
+
2079 => 'vector_s',
|
1009
|
+
2100 => 'edge1000_korea',
|
1010
|
+
2130 => 'fr920xt_taiwan',
|
1011
|
+
2131 => 'fr920xt_china',
|
1012
|
+
2132 => 'fr920xt_japan',
|
1013
|
+
2134 => 'virbx',
|
1014
|
+
2135 => 'vivo_smart_apac',
|
1015
|
+
2140 => 'etrex_touch',
|
1016
|
+
2147 => 'edge25',
|
1017
|
+
2148 => 'fr25',
|
1018
|
+
2150 => 'vivo_fit2',
|
1019
|
+
2153 => 'fr225',
|
1020
|
+
2156 => 'fr630',
|
1021
|
+
2157 => 'fr230',
|
1022
|
+
2160 => 'vivo_active_apac',
|
1023
|
+
2161 => 'vector_2',
|
1024
|
+
2162 => 'vector_2s',
|
1025
|
+
2172 => 'virbxe',
|
1026
|
+
2173 => 'fr620_taiwan',
|
1027
|
+
2174 => 'fr220_taiwan',
|
1028
|
+
2175 => 'truswing',
|
1029
|
+
2188 => 'fenix3_china',
|
1030
|
+
2189 => 'fenix3_twn',
|
1031
|
+
2192 => 'varia_headlight',
|
1032
|
+
2193 => 'varia_taillight_old',
|
1033
|
+
2204 => 'edge_explore_1000',
|
1034
|
+
2219 => 'fr225_asia',
|
1035
|
+
2225 => 'varia_radar_taillight',
|
1036
|
+
2226 => 'varia_radar_display',
|
1037
|
+
2238 => 'edge20',
|
1038
|
+
2262 => 'd2_bravo',
|
1039
|
+
2266 => 'approach_s20',
|
1040
|
+
2276 => 'varia_remote',
|
1041
|
+
2327 => 'hrm4_run',
|
1042
|
+
2337 => 'vivo_active_hr',
|
1043
|
+
2347 => 'vivo_smart_gps_hr',
|
1044
|
+
2348 => 'vivo_smart_hr',
|
1045
|
+
2368 => 'vivo_move',
|
1046
|
+
2398 => 'varia_vision',
|
1047
|
+
2406 => 'vivo_fit3',
|
1048
|
+
2413 => 'fenix3_hr',
|
1049
|
+
2429 => 'index_smart_scale',
|
1050
|
+
2431 => 'fr235',
|
1051
|
+
2441 => 'oregon7xx',
|
1052
|
+
2444 => 'rino7xx',
|
1053
|
+
2496 => 'nautix',
|
1054
|
+
2530 => 'edge_820',
|
1055
|
+
2531 => 'edge_explore_820',
|
751
1056
|
10007 => 'sdm4',
|
752
1057
|
10014 => 'edge_remote',
|
753
1058
|
20119 => 'training_center',
|
@@ -765,6 +1070,12 @@ FitParser::File::Types.add_type :antplus_device_type, :uint8, values: {
|
|
765
1070
|
20 => 'light_electric_vehicle',
|
766
1071
|
25 => 'env_sensor',
|
767
1072
|
26 => 'racquet',
|
1073
|
+
27 => 'control_hub',
|
1074
|
+
31 => 'muscle_oxygen',
|
1075
|
+
35 => 'bike_light_main',
|
1076
|
+
36 => 'bike_light_shared',
|
1077
|
+
38 => 'exd',
|
1078
|
+
40 => 'bike_radar',
|
768
1079
|
119 => 'weight_scale',
|
769
1080
|
120 => 'heart_rate',
|
770
1081
|
121 => 'bike_speed_cadence',
|
@@ -796,7 +1107,9 @@ FitParser::File::Types.add_type :battery_status, :uint8, values: {
|
|
796
1107
|
2 => 'good',
|
797
1108
|
3 => 'ok',
|
798
1109
|
4 => 'low',
|
799
|
-
5 => 'critical'
|
1110
|
+
5 => 'critical',
|
1111
|
+
6 => 'charging',
|
1112
|
+
7 => 'unknown' }
|
800
1113
|
FitParser::File::Types.add_type :hr_type, :enum, values: {
|
801
1114
|
0 => 'normal',
|
802
1115
|
1 => 'irregular' }
|
@@ -810,7 +1123,8 @@ FitParser::File::Types.add_type :course_capabilities, :uint32z, values: {
|
|
810
1123
|
0x00000040 => 'power',
|
811
1124
|
0x00000080 => 'cadence',
|
812
1125
|
0x00000100 => 'training',
|
813
|
-
0x00000200 => 'navigation'
|
1126
|
+
0x00000200 => 'navigation',
|
1127
|
+
0x00000400 => 'bikeway' }, method: :bitfield_value
|
814
1128
|
FitParser::File::Types.add_type :weight, :uint16, values: {
|
815
1129
|
65534 => 'calculating' }
|
816
1130
|
FitParser::File::Types.add_type :workout_hr, :uint32, values: {
|
@@ -846,6 +1160,7 @@ FitParser::File::Types.add_type :activity_type, :enum, values: {
|
|
846
1160
|
4 => 'fitness_equipment',
|
847
1161
|
5 => 'swimming',
|
848
1162
|
6 => 'walking',
|
1163
|
+
8 => 'sedentary',
|
849
1164
|
254 => 'all' }
|
850
1165
|
FitParser::File::Types.add_type :activity_subtype, :enum, values: {
|
851
1166
|
0 => 'generic',
|
@@ -872,6 +1187,9 @@ FitParser::File::Types.add_type :activity_level, :enum, values: {
|
|
872
1187
|
0 => 'low',
|
873
1188
|
1 => 'medium',
|
874
1189
|
2 => 'high' }
|
1190
|
+
FitParser::File::Types.add_type :side, :enum, values: {
|
1191
|
+
0 => 'right',
|
1192
|
+
1 => 'left' }
|
875
1193
|
FitParser::File::Types.add_type :left_right_balance, :uint8, values: {
|
876
1194
|
127 => 'mask',
|
877
1195
|
128 => 'right' }
|
@@ -881,6 +1199,14 @@ FitParser::File::Types.add_type :left_right_balance_100, :uint16, values: {
|
|
881
1199
|
FitParser::File::Types.add_type :length_type, :enum, values: {
|
882
1200
|
0 => 'idle',
|
883
1201
|
1 => 'active' }
|
1202
|
+
FitParser::File::Types.add_type :day_of_week, :enum, values: {
|
1203
|
+
0 => 'sunday',
|
1204
|
+
1 => 'monday',
|
1205
|
+
2 => 'tuesday',
|
1206
|
+
3 => 'wednesday',
|
1207
|
+
4 => 'thursday',
|
1208
|
+
5 => 'friday',
|
1209
|
+
6 => 'saturday' }
|
884
1210
|
FitParser::File::Types.add_type :connectivity_capabilities, :uint32z, values: {
|
885
1211
|
1 => 'bluetooth',
|
886
1212
|
2 => 'bluetooth_le',
|
@@ -895,7 +1221,24 @@ FitParser::File::Types.add_type :connectivity_capabilities, :uint32z, values: {
|
|
895
1221
|
1024 => 'explicit_archive',
|
896
1222
|
2048 => 'setup_incomplete',
|
897
1223
|
4096 => 'continue_sync_after_software_update',
|
898
|
-
8192 => 'connect_iq_app_download'
|
1224
|
+
8192 => 'connect_iq_app_download',
|
1225
|
+
16384 => 'golf_course_download',
|
1226
|
+
32768 => 'device_initiates_sync',
|
1227
|
+
65536 => 'connect_iq_watch_app_download',
|
1228
|
+
131072 => 'connect_iq_widget_download',
|
1229
|
+
262144 => 'connect_iq_watch_face_download',
|
1230
|
+
524288 => 'connect_iq_data_field_download',
|
1231
|
+
1048576 => 'connect_iq_app_managment',
|
1232
|
+
2097152 => 'swing_sensor',
|
1233
|
+
4194304 => 'swing_sensor_remote',
|
1234
|
+
8388608 => 'incident_detection',
|
1235
|
+
16777216 => 'audio_prompts',
|
1236
|
+
33554432 => 'wifi_verification',
|
1237
|
+
67108864 => 'true_up',
|
1238
|
+
134217728 => 'find_my_watch',
|
1239
|
+
268435456 => 'remote_manual_sync',
|
1240
|
+
536870912 => 'live_track_auto_start',
|
1241
|
+
1073741824 => 'live_track_messaging' }
|
899
1242
|
FitParser::File::Types.add_type :stroke_type, :enum, values: {
|
900
1243
|
0 => 'no_event',
|
901
1244
|
1 => 'other',
|
@@ -939,7 +1282,11 @@ FitParser::File::Types.add_type :body_location, :enum, values: {
|
|
939
1282
|
32 => 'right_brachioradialis',
|
940
1283
|
33 => 'right_forearm_extensors',
|
941
1284
|
34 => 'neck',
|
942
|
-
35 => 'throat'
|
1285
|
+
35 => 'throat',
|
1286
|
+
36 => 'waist_mid_back',
|
1287
|
+
37 => 'waist_front',
|
1288
|
+
38 => 'waist_left',
|
1289
|
+
39 => 'waist_right' }
|
943
1290
|
FitParser::File::Types.add_type :source_type, :enum, values: {
|
944
1291
|
0 => 'ant',
|
945
1292
|
1 => 'antplus',
|
@@ -947,6 +1294,301 @@ FitParser::File::Types.add_type :source_type, :enum, values: {
|
|
947
1294
|
3 => 'bluetooth_low_energy',
|
948
1295
|
4 => 'wifi',
|
949
1296
|
5 => 'local' }
|
1297
|
+
FitParser::File::Types.add_type :attitude_stage, :enum, values: {
|
1298
|
+
0 => 'failed',
|
1299
|
+
1 => 'aligning',
|
1300
|
+
2 => 'degraded',
|
1301
|
+
3 => 'valid' }
|
1302
|
+
FitParser::File::Types.add_type :attitude_validity, :uint16, values: {
|
1303
|
+
0x0001 => 'track_angle_heading_valid',
|
1304
|
+
0x0002 => 'pitch_valid',
|
1305
|
+
0x0004 => 'roll_valid',
|
1306
|
+
0x0008 => 'lateral_body_accel_valid',
|
1307
|
+
0x0010 => 'normal_body_accel_valid',
|
1308
|
+
0x0020 => 'turn_rate_valid',
|
1309
|
+
0x0040 => 'hw_fail',
|
1310
|
+
0x0080 => 'mag_invalid',
|
1311
|
+
0x0100 => 'no_gps',
|
1312
|
+
0x0200 => 'gps_invalid',
|
1313
|
+
0x0400 => 'solution_coasting',
|
1314
|
+
0x0800 => 'true_track_angle',
|
1315
|
+
0x1000 => 'magnetic_heading' }
|
1316
|
+
FitParser::File::Types.add_type :auto_sync_frequency, :enum, values: {
|
1317
|
+
0 => 'never',
|
1318
|
+
1 => 'occasionally',
|
1319
|
+
2 => 'frequent',
|
1320
|
+
3 => 'once_a_day' }
|
1321
|
+
FitParser::File::Types.add_type :exd_layout, :enum, values: {
|
1322
|
+
0 => 'full_screen',
|
1323
|
+
1 => 'half_vertical',
|
1324
|
+
2 => 'half_horizontal',
|
1325
|
+
3 => 'half_vertical_right_split',
|
1326
|
+
4 => 'half_horizontal_bottom_split',
|
1327
|
+
5 => 'full_quarter_split',
|
1328
|
+
6 => 'half_vertical_left_split',
|
1329
|
+
7 => 'half_horizontal_top_split' }
|
1330
|
+
FitParser::File::Types.add_type :exd_display_type, :enum, values: {
|
1331
|
+
0 => 'numerical',
|
1332
|
+
1 => 'simple',
|
1333
|
+
2 => 'graph',
|
1334
|
+
3 => 'bar',
|
1335
|
+
4 => 'circle_graph',
|
1336
|
+
5 => 'virtual_partner',
|
1337
|
+
6 => 'balance',
|
1338
|
+
7 => 'string_list',
|
1339
|
+
8 => 'string',
|
1340
|
+
9 => 'simple_dynamic_icon',
|
1341
|
+
10 => 'gauge' }
|
1342
|
+
FitParser::File::Types.add_type :exd_data_units, :enum, values: {
|
1343
|
+
0 => 'no_units',
|
1344
|
+
1 => 'laps',
|
1345
|
+
2 => 'miles_per_hour',
|
1346
|
+
3 => 'kilometers_per_hour',
|
1347
|
+
4 => 'feet_per_hour',
|
1348
|
+
5 => 'meters_per_hour',
|
1349
|
+
6 => 'degrees_celsius',
|
1350
|
+
7 => 'degrees_farenheit',
|
1351
|
+
8 => 'zone',
|
1352
|
+
9 => 'gear',
|
1353
|
+
10 => 'rpm',
|
1354
|
+
11 => 'bpm',
|
1355
|
+
12 => 'degrees',
|
1356
|
+
13 => 'millimeters',
|
1357
|
+
14 => 'meters',
|
1358
|
+
15 => 'kilometers',
|
1359
|
+
16 => 'feet',
|
1360
|
+
17 => 'yards',
|
1361
|
+
18 => 'kilofeet',
|
1362
|
+
19 => 'miles',
|
1363
|
+
20 => 'time',
|
1364
|
+
21 => 'enum_turn_type',
|
1365
|
+
22 => 'percent',
|
1366
|
+
23 => 'watts',
|
1367
|
+
24 => 'watts_per_kilogram',
|
1368
|
+
25 => 'enum_battery_status',
|
1369
|
+
26 => 'enum_bike_light_beam_angle_mode',
|
1370
|
+
27 => 'enum_bike_light_battery_status',
|
1371
|
+
28 => 'enum_bike_light_network_config_type',
|
1372
|
+
29 => 'lights',
|
1373
|
+
30 => 'seconds',
|
1374
|
+
31 => 'minutes',
|
1375
|
+
32 => 'hours',
|
1376
|
+
33 => 'calories',
|
1377
|
+
34 => 'kilojoules',
|
1378
|
+
35 => 'milliseconds',
|
1379
|
+
36 => 'second_per_mile',
|
1380
|
+
37 => 'second_per_kilometer',
|
1381
|
+
38 => 'centimeter',
|
1382
|
+
39 => 'enum_course_point',
|
1383
|
+
40 => 'bradians',
|
1384
|
+
41 => 'enum_sport' }
|
1385
|
+
FitParser::File::Types.add_type :exd_qualifiers, :enum, values: {
|
1386
|
+
0 => 'no_qualifier',
|
1387
|
+
1 => 'instantaneous',
|
1388
|
+
2 => 'average',
|
1389
|
+
3 => 'lap',
|
1390
|
+
4 => 'maximum',
|
1391
|
+
5 => 'maximum_average',
|
1392
|
+
6 => 'maximum_lap',
|
1393
|
+
7 => 'last_lap',
|
1394
|
+
8 => 'average_lap',
|
1395
|
+
9 => 'to_destination',
|
1396
|
+
10 => 'to_go',
|
1397
|
+
11 => 'to_next',
|
1398
|
+
12 => 'next_course_point',
|
1399
|
+
13 => 'total',
|
1400
|
+
14 => 'three_second_average',
|
1401
|
+
15 => 'ten_second_average',
|
1402
|
+
16 => 'thirty_second_average',
|
1403
|
+
17 => 'percent_maximum',
|
1404
|
+
18 => 'percent_maximum_average',
|
1405
|
+
19 => 'lap_percent_maximum',
|
1406
|
+
20 => 'elapsed',
|
1407
|
+
21 => 'sunrise',
|
1408
|
+
22 => 'sunset',
|
1409
|
+
23 => 'compared_to_virtual_partner',
|
1410
|
+
24 => 'maximum_24h',
|
1411
|
+
25 => 'minimum_24h',
|
1412
|
+
26 => 'minimum',
|
1413
|
+
27 => 'first',
|
1414
|
+
28 => 'second',
|
1415
|
+
29 => 'third',
|
1416
|
+
30 => 'shifter',
|
1417
|
+
31 => 'last_sport',
|
1418
|
+
242 => 'zone_9',
|
1419
|
+
243 => 'zone_8',
|
1420
|
+
244 => 'zone_7',
|
1421
|
+
245 => 'zone_6',
|
1422
|
+
246 => 'zone_5',
|
1423
|
+
247 => 'zone_4',
|
1424
|
+
248 => 'zone_3',
|
1425
|
+
249 => 'zone_2',
|
1426
|
+
250 => 'zone_1' }
|
1427
|
+
FitParser::File::Types.add_type :exd_descriptors, :enum, values: {
|
1428
|
+
0 => 'bike_light_battery_status',
|
1429
|
+
1 => 'beam_angle_status',
|
1430
|
+
2 => 'batery_level',
|
1431
|
+
3 => 'light_network_mode',
|
1432
|
+
4 => 'number_lights_connected',
|
1433
|
+
5 => 'cadence',
|
1434
|
+
6 => 'distance',
|
1435
|
+
7 => 'estimated_time_of_arrival',
|
1436
|
+
8 => 'heading',
|
1437
|
+
9 => 'time',
|
1438
|
+
10 => 'battery_level',
|
1439
|
+
11 => 'trainer_resistance',
|
1440
|
+
12 => 'trainer_target_power',
|
1441
|
+
13 => 'time_seated',
|
1442
|
+
14 => 'time_standing',
|
1443
|
+
15 => 'elevation',
|
1444
|
+
16 => 'grade',
|
1445
|
+
17 => 'ascent',
|
1446
|
+
18 => 'descent',
|
1447
|
+
19 => 'vertical_speed',
|
1448
|
+
20 => 'di2_battery_level',
|
1449
|
+
21 => 'front_gear',
|
1450
|
+
22 => 'rear_gear',
|
1451
|
+
23 => 'gear_ratio',
|
1452
|
+
24 => 'heart_rate',
|
1453
|
+
25 => 'heart_rate_zone',
|
1454
|
+
26 => 'time_in_heart_rate_zone',
|
1455
|
+
27 => 'heart_rate_reserve',
|
1456
|
+
28 => 'calories',
|
1457
|
+
29 => 'gps_accuracy',
|
1458
|
+
30 => 'gps_signal_strength',
|
1459
|
+
31 => 'temperature',
|
1460
|
+
32 => 'time_of_day',
|
1461
|
+
33 => 'balance',
|
1462
|
+
34 => 'pedal_smoothness',
|
1463
|
+
35 => 'power',
|
1464
|
+
36 => 'functional_threshold_power',
|
1465
|
+
37 => 'intensity_factor',
|
1466
|
+
38 => 'work',
|
1467
|
+
39 => 'power_ratio',
|
1468
|
+
40 => 'normalized_power',
|
1469
|
+
41 => 'training_stress_Score',
|
1470
|
+
42 => 'time_on_zone',
|
1471
|
+
43 => 'speed',
|
1472
|
+
44 => 'laps',
|
1473
|
+
45 => 'reps',
|
1474
|
+
46 => 'workout_step',
|
1475
|
+
47 => 'course_distance',
|
1476
|
+
48 => 'navigation_distance',
|
1477
|
+
49 => 'course_estimated_time_of_arrival',
|
1478
|
+
50 => 'navigation_estimated_time_of_arrival',
|
1479
|
+
51 => 'course_time',
|
1480
|
+
52 => 'navigation_time',
|
1481
|
+
53 => 'course_heading',
|
1482
|
+
54 => 'navigation_heading',
|
1483
|
+
55 => 'power_zone',
|
1484
|
+
56 => 'torque_effectiveness',
|
1485
|
+
57 => 'timer_time',
|
1486
|
+
58 => 'power_weight_ratio',
|
1487
|
+
59 => 'left_platform_center_offset',
|
1488
|
+
60 => 'right_platform_center_offset',
|
1489
|
+
61 => 'left_power_phase_start_angle',
|
1490
|
+
62 => 'right_power_phase_start_angle',
|
1491
|
+
63 => 'left_power_phase_finish_angle',
|
1492
|
+
64 => 'right_power_phase_finish_angle',
|
1493
|
+
65 => 'gears',
|
1494
|
+
66 => 'pace',
|
1495
|
+
67 => 'training_effect',
|
1496
|
+
68 => 'vertical_oscillation',
|
1497
|
+
69 => 'vertical_ratio',
|
1498
|
+
70 => 'ground_contact_time',
|
1499
|
+
71 => 'left_ground_contact_time_balance',
|
1500
|
+
72 => 'right_ground_contact_time_balance',
|
1501
|
+
73 => 'stride_length',
|
1502
|
+
74 => 'running_cadence',
|
1503
|
+
75 => 'performance_condition',
|
1504
|
+
76 => 'course_type',
|
1505
|
+
77 => 'time_in_power_zone',
|
1506
|
+
78 => 'navigation_turn',
|
1507
|
+
79 => 'course_location',
|
1508
|
+
80 => 'navigation_location',
|
1509
|
+
81 => 'compass',
|
1510
|
+
82 => 'gear_combo',
|
1511
|
+
83 => 'muscle_oxygen',
|
1512
|
+
84 => 'icon' }
|
1513
|
+
FitParser::File::Types.add_type :auto_activity_detect, :uint32, values: {
|
1514
|
+
0x00000000 => 'none',
|
1515
|
+
0x00000001 => 'running',
|
1516
|
+
0x00000002 => 'cycling',
|
1517
|
+
0x00000004 => 'swimming',
|
1518
|
+
0x00000008 => 'walking',
|
1519
|
+
0x00000020 => 'elliptical',
|
1520
|
+
0x00000400 => 'sedentary' }
|
1521
|
+
FitParser::File::Types.add_type :supported_exd_screen_layouts, :uint32z, values: {
|
1522
|
+
0x00000001 => 'full_screen',
|
1523
|
+
0x00000002 => 'half_vertical',
|
1524
|
+
0x00000004 => 'half_horizontal',
|
1525
|
+
0x00000008 => 'half_vertical_right_split',
|
1526
|
+
0x00000010 => 'half_horizontal_bottom_split',
|
1527
|
+
0x00000020 => 'full_quarter_split',
|
1528
|
+
0x00000040 => 'half_vertical_left_split',
|
1529
|
+
0x00000080 => 'half_horizontal_top_split' }
|
1530
|
+
FitParser::File::Types.add_type :fit_base_type, :uint8, values: {
|
1531
|
+
0 => 'enum',
|
1532
|
+
1 => 'sint8',
|
1533
|
+
2 => 'uint8',
|
1534
|
+
131 => 'sint16',
|
1535
|
+
132 => 'uint16',
|
1536
|
+
133 => 'sint32',
|
1537
|
+
134 => 'uint32',
|
1538
|
+
7 => 'string',
|
1539
|
+
136 => 'float32',
|
1540
|
+
137 => 'float64',
|
1541
|
+
10 => 'uint8z',
|
1542
|
+
139 => 'uint16z',
|
1543
|
+
140 => 'uint32z',
|
1544
|
+
13 => 'byte',
|
1545
|
+
142 => 'sint64',
|
1546
|
+
143 => 'uint64',
|
1547
|
+
144 => 'uint64z' }
|
1548
|
+
FitParser::File::Types.add_type :turn_type, :enum, values: {
|
1549
|
+
0 => 'arriving_idx',
|
1550
|
+
1 => 'arriving_left_idx',
|
1551
|
+
2 => 'arriving_right_idx',
|
1552
|
+
3 => 'arriving_via_idx',
|
1553
|
+
4 => 'arriving_via_left_idx',
|
1554
|
+
5 => 'arriving_via_right_idx',
|
1555
|
+
6 => 'bear_keep_left_idx',
|
1556
|
+
7 => 'bear_keep_right_idx',
|
1557
|
+
8 => 'continue_idx',
|
1558
|
+
9 => 'exit_left_idx',
|
1559
|
+
10 => 'exit_right_idx',
|
1560
|
+
11 => 'ferry_idx',
|
1561
|
+
12 => 'roundabout_45_idx',
|
1562
|
+
13 => 'roundabout_90_idx',
|
1563
|
+
14 => 'roundabout_135_idx',
|
1564
|
+
15 => 'roundabout_180_idx',
|
1565
|
+
16 => 'roundabout_225_idx',
|
1566
|
+
17 => 'roundabout_270_idx',
|
1567
|
+
18 => 'roundabout_315_idx',
|
1568
|
+
19 => 'roundabout_360_idx',
|
1569
|
+
20 => 'roundabout_neg_45_idx',
|
1570
|
+
21 => 'roundabout_neg_90_idx',
|
1571
|
+
22 => 'roundabout_neg_135_idx',
|
1572
|
+
23 => 'roundabout_neg_180_idx',
|
1573
|
+
24 => 'roundabout_neg_225_idx',
|
1574
|
+
25 => 'roundabout_neg_270_idx',
|
1575
|
+
26 => 'roundabout_neg_315_idx',
|
1576
|
+
27 => 'roundabout_neg_360_idx',
|
1577
|
+
28 => 'roundabout_generic_idx',
|
1578
|
+
29 => 'roundabout_neg_generic_idx',
|
1579
|
+
30 => 'sharp_turn_left_idx',
|
1580
|
+
31 => 'sharp_turn_right_idx',
|
1581
|
+
32 => 'turn_left_idx',
|
1582
|
+
33 => 'turn_right_idx',
|
1583
|
+
34 => 'uturn_left_idx',
|
1584
|
+
35 => 'uturn_right_idx',
|
1585
|
+
36 => 'icon_inv_idx',
|
1586
|
+
37 => 'icon_idx_cnt' }
|
1587
|
+
FitParser::File::Types.add_type :bike_light_beam_angle_mode, :uint8, values: {
|
1588
|
+
0 => 'manual',
|
1589
|
+
1 => 'auto' }
|
1590
|
+
FitParser::File::Types.add_type :fit_base_unit, :uint16, values: {
|
1591
|
+
0 => 'other' }
|
950
1592
|
|
951
1593
|
# the type below is assigned to some fileds, but
|
952
1594
|
# it is not defined in terms of values and basic type in FIT SDK as
|