forked from dtcooper/python-fitparse
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathprofile.py
More file actions
5565 lines (5530 loc) · 182 KB
/
profile.py
File metadata and controls
5565 lines (5530 loc) · 182 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
################# BEGIN AUTOMATICALLY GENERATED FIT PROFILE ##################
########################### DO NOT EDIT THIS FILE ############################
####### EXPORTED PROFILE FROM SDK VERSION 13.2 AT 2015-01-14 23:34:25 ########
########### PARSED 64 TYPES (821 VALUES), 41 MESSAGES (519 FIELDS) ###########
from fitparse.records import (
ComponentField,
Field,
FieldType,
MessageType,
ReferenceField,
SubField,
BASE_TYPES,
)
FIELD_TYPES = {
'activity': FieldType(
name='activity',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'manual',
1: 'auto_multi_sport',
},
),
'activity_class': FieldType(
name='activity_class',
base_type=BASE_TYPES[0x00], # enum
values={
100: 'level_max',
0x7F: 'level', # 0 to 100
0x80: 'athlete',
},
),
'activity_level': FieldType(
name='activity_level',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'low',
1: 'medium',
2: 'high',
},
),
'activity_subtype': FieldType(
name='activity_subtype',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'generic',
1: 'treadmill', # Run
2: 'street', # Run
3: 'trail', # Run
4: 'track', # Run
5: 'spin', # Cycling
6: 'indoor_cycling', # Cycling
7: 'road', # Cycling
8: 'mountain', # Cycling
9: 'downhill', # Cycling
10: 'recumbent', # Cycling
11: 'cyclocross', # Cycling
12: 'hand_cycling', # Cycling
13: 'track_cycling', # Cycling
14: 'indoor_rowing', # Fitness Equipment
15: 'elliptical', # Fitness Equipment
16: 'stair_climbing', # Fitness Equipment
17: 'lap_swimming', # Swimming
18: 'open_water', # Swimming
254: 'all',
},
),
'activity_type': FieldType(
name='activity_type',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'generic',
1: 'running',
2: 'cycling',
3: 'transition', # Mulitsport transition
4: 'fitness_equipment',
5: 'swimming',
6: 'walking',
254: 'all', # All is for goals only to include all sports.
},
),
'ant_network': FieldType(
name='ant_network',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'public',
1: 'antplus',
2: 'antfs',
3: 'private',
},
),
'antplus_device_type': FieldType(
name='antplus_device_type',
base_type=BASE_TYPES[0x02], # uint8
values={
1: 'antfs',
11: 'bike_power',
12: 'environment_sensor_legacy',
15: 'multi_sport_speed_distance',
16: 'control',
17: 'fitness_equipment',
18: 'blood_pressure',
19: 'geocache_node',
20: 'light_electric_vehicle',
25: 'env_sensor',
26: 'racquet',
119: 'weight_scale',
120: 'heart_rate',
121: 'bike_speed_cadence',
122: 'bike_cadence',
123: 'bike_speed',
124: 'stride_speed_distance',
},
),
'autolap_trigger': FieldType(
name='autolap_trigger',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'time',
1: 'distance',
2: 'position_start',
3: 'position_lap',
4: 'position_waypoint',
5: 'position_marked',
6: 'off',
},
),
'battery_status': FieldType(
name='battery_status',
base_type=BASE_TYPES[0x02], # uint8
values={
1: 'new',
2: 'good',
3: 'ok',
4: 'low',
5: 'critical',
},
),
'body_location': FieldType(
name='body_location',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'left_leg',
1: 'left_calf',
2: 'left_shin',
3: 'left_hamstring',
4: 'left_quad',
5: 'left_glute',
6: 'right_leg',
7: 'right_calf',
8: 'right_shin',
9: 'right_hamstring',
10: 'right_quad',
11: 'right_glute',
12: 'torso_back',
13: 'left_lower_back',
14: 'left_upper_back',
15: 'right_lower_back',
16: 'right_upper_back',
17: 'torso_front',
18: 'left_abdomen',
19: 'left_chest',
20: 'right_abdomen',
21: 'right_chest',
22: 'left_arm',
23: 'left_shoulder',
24: 'left_bicep',
25: 'left_tricep',
26: 'left_brachioradialis', # Left anterior forearm
27: 'left_forearm_extensors', # Left posterior forearm
28: 'right_arm',
29: 'right_shoulder',
30: 'right_bicep',
31: 'right_tricep',
32: 'right_brachioradialis', # Right anterior forearm
33: 'right_forearm_extensors', # Right posterior forearm
34: 'neck',
35: 'throat',
},
),
'bool': FieldType(
name='bool',
base_type=BASE_TYPES[0x00], # enum
),
'bp_status': FieldType(
name='bp_status',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'no_error',
1: 'error_incomplete_data',
2: 'error_no_measurement',
3: 'error_data_out_of_range',
4: 'error_irregular_heart_rate',
},
),
'checksum': FieldType(
name='checksum',
base_type=BASE_TYPES[0x02], # uint8
values={
0: 'clear', # Allows clear of checksum for flash memory where can only write 1 to 0 without erasing sector.
1: 'ok', # Set to mark checksum as valid if computes to invalid values 0 or 0xFF. Checksum can also be set to ok to save encoding computation time.
},
),
'connectivity_capabilities': FieldType(
name='connectivity_capabilities',
base_type=BASE_TYPES[0x8C], # uint32z
values={
0x00000001: 'bluetooth',
0x00000002: 'bluetooth_le',
0x00000004: 'ant',
0x00000008: 'activity_upload',
0x00000010: 'course_download',
0x00000020: 'workout_download',
0x00000040: 'live_track',
0x00000080: 'weather_conditions',
0x00000100: 'weather_alerts',
0x00000200: 'gps_ephemeris_download',
0x00000400: 'explicit_archive',
0x00000800: 'setup_incomplete',
0x00001000: 'continue_sync_after_software_update',
0x00002000: 'connect_iq_app_download',
},
),
'course_capabilities': FieldType(
name='course_capabilities',
base_type=BASE_TYPES[0x8C], # uint32z
values={
0x00000001: 'processed',
0x00000002: 'valid',
0x00000004: 'time',
0x00000008: 'distance',
0x00000010: 'position',
0x00000020: 'heart_rate',
0x00000040: 'power',
0x00000080: 'cadence',
0x00000100: 'training',
0x00000200: 'navigation',
},
),
'course_point': FieldType(
name='course_point',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'generic',
1: 'summit',
2: 'valley',
3: 'water',
4: 'food',
5: 'danger',
6: 'left',
7: 'right',
8: 'straight',
9: 'first_aid',
10: 'fourth_category',
11: 'third_category',
12: 'second_category',
13: 'first_category',
14: 'hors_category',
15: 'sprint',
16: 'left_fork',
17: 'right_fork',
18: 'middle_fork',
19: 'slight_left',
20: 'sharp_left',
21: 'slight_right',
22: 'sharp_right',
23: 'u_turn',
},
),
'date_time': FieldType( # seconds since UTC 00:00 Dec 31 1989
name='date_time',
base_type=BASE_TYPES[0x86], # uint32
),
'device_index': FieldType(
name='device_index',
base_type=BASE_TYPES[0x02], # uint8
values={
0: 'creator', # Creator of the file is always device index 0.
},
),
'display_heart': FieldType(
name='display_heart',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'bpm',
1: 'max',
2: 'reserve',
},
),
'display_measure': FieldType(
name='display_measure',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'metric',
1: 'statute',
},
),
'display_position': FieldType(
name='display_position',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'degree', # dd.dddddd
1: 'degree_minute', # dddmm.mmm
2: 'degree_minute_second', # dddmmss
3: 'austrian_grid', # Austrian Grid (BMN)
4: 'british_grid', # British National Grid
4: 'elevation',
5: 'dutch_grid', # Dutch grid system
6: 'hungarian_grid', # Hungarian grid system
7: 'finnish_grid', # Finnish grid system Zone3 KKJ27
8: 'german_grid', # Gausss Krueger (German)
9: 'icelandic_grid', # Icelandic Grid
10: 'indonesian_equatorial', # Indonesian Equatorial LCO
11: 'indonesian_irian', # Indonesian Irian LCO
12: 'indonesian_southern', # Indonesian Southern LCO
13: 'india_zone_0', # India zone 0
14: 'india_zone_IA', # India zone IA
15: 'india_zone_IB', # India zone IB
16: 'india_zone_IIA', # India zone IIA
17: 'india_zone_IIB', # India zone IIB
18: 'india_zone_IIIA', # India zone IIIA
19: 'india_zone_IIIB', # India zone IIIB
20: 'india_zone_IVA', # India zone IVA
21: 'india_zone_IVB', # India zone IVB
22: 'irish_transverse', # Irish Transverse Mercator
23: 'irish_grid', # Irish Grid
24: 'loran', # Loran TD
25: 'maidenhead_grid', # Maidenhead grid system
26: 'mgrs_grid', # MGRS grid system
27: 'new_zealand_grid', # New Zealand grid system
28: 'new_zealand_transverse', # New Zealand Transverse Mercator
29: 'qatar_grid', # Qatar National Grid
30: 'modified_swedish_grid', # Modified RT-90 (Sweden)
31: 'swedish_grid', # RT-90 (Sweden)
32: 'south_african_grid', # South African Grid
33: 'swiss_grid', # Swiss CH-1903 grid
34: 'taiwan_grid', # Taiwan Grid
35: 'united_states_grid', # United States National Grid
36: 'utm_ups_grid', # UTM/UPS grid system
37: 'west_malayan', # West Malayan RSO
38: 'borneo_rso', # Borneo RSO
39: 'estonian_grid', # Estonian grid system
40: 'latvian_grid', # Latvian Transverse Mercator
41: 'swedish_ref_99_grid', # Reference Grid 99 TM (Swedish)
},
),
'display_power': FieldType(
name='display_power',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'watts',
1: 'percent_ftp',
},
),
'event': FieldType(
name='event',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'timer', # Group 0. Start / stop_all
3: 'workout', # start / stop
4: 'workout_step', # Start at beginning of workout. Stop at end of each step.
5: 'power_down', # stop_all group 0
6: 'power_up', # stop_all group 0
7: 'off_course', # start / stop group 0
8: 'session', # Stop at end of each session.
9: 'lap', # Stop at end of each lap.
10: 'course_point', # marker
11: 'battery', # marker
12: 'virtual_partner_pace', # Group 1. Start at beginning of activity if VP enabled, when VP pace is changed during activity or VP enabled mid activity. stop_disable when VP disabled.
13: 'hr_high_alert', # Group 0. Start / stop when in alert condition.
14: 'hr_low_alert', # Group 0. Start / stop when in alert condition.
15: 'speed_high_alert', # Group 0. Start / stop when in alert condition.
16: 'speed_low_alert', # Group 0. Start / stop when in alert condition.
17: 'cad_high_alert', # Group 0. Start / stop when in alert condition.
18: 'cad_low_alert', # Group 0. Start / stop when in alert condition.
19: 'power_high_alert', # Group 0. Start / stop when in alert condition.
20: 'power_low_alert', # Group 0. Start / stop when in alert condition.
21: 'recovery_hr', # marker
22: 'battery_low', # marker
23: 'time_duration_alert', # Group 1. Start if enabled mid activity (not required at start of activity). Stop when duration is reached. stop_disable if disabled.
24: 'distance_duration_alert', # Group 1. Start if enabled mid activity (not required at start of activity). Stop when duration is reached. stop_disable if disabled.
25: 'calorie_duration_alert', # Group 1. Start if enabled mid activity (not required at start of activity). Stop when duration is reached. stop_disable if disabled.
26: 'activity', # Group 1.. Stop at end of activity.
27: 'fitness_equipment', # marker
28: 'length', # Stop at end of each length.
32: 'user_marker', # marker
33: 'sport_point', # marker
36: 'calibration', # start/stop/marker
42: 'front_gear_change', # marker
43: 'rear_gear_change', # marker
45: 'elev_high_alert', # Group 0. Start / stop when in alert condition.
46: 'elev_low_alert', # Group 0. Start / stop when in alert condition.
},
),
'event_type': FieldType(
name='event_type',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'start',
1: 'stop',
2: 'consecutive_depreciated',
3: 'marker',
4: 'stop_all',
5: 'begin_depreciated',
6: 'end_depreciated',
7: 'end_all_depreciated',
8: 'stop_disable',
9: 'stop_disable_all',
},
),
'file': FieldType(
name='file',
base_type=BASE_TYPES[0x00], # enum
values={
1: 'device', # Read only, single file. Must be in root directory.
2: 'settings', # Read/write, single file. Directory=Settings
3: 'sport', # Read/write, multiple files, file number = sport type. Directory=Sports
4: 'activity', # Read/erase, multiple files. Directory=Activities
5: 'workout', # Read/write/erase, multiple files. Directory=Workouts
6: 'course', # Read/write/erase, multiple files. Directory=Courses
7: 'schedules', # Read/write, single file. Directory=Schedules
9: 'weight', # Read only, single file. Circular buffer. All message definitions at start of file. Directory=Weight
10: 'totals', # Read only, single file. Directory=Totals
11: 'goals', # Read/write, single file. Directory=Goals
14: 'blood_pressure', # Read only. Directory=Blood Pressure
15: 'monitoring_a', # Read only. Directory=Monitoring. File number=sub type.
20: 'activity_summary', # Read/erase, multiple files. Directory=Activities
28: 'monitoring_daily',
32: 'monitoring_b', # Read only. Directory=Monitoring. File number=identifier
0xF7: 'mfg_range_min', # 0xF7 - 0xFE reserved for manufacturer specific file types
0xFE: 'mfg_range_max', # 0xF7 - 0xFE reserved for manufacturer specific file types
},
),
'file_flags': FieldType(
name='file_flags',
base_type=BASE_TYPES[0x0A], # uint8z
values={
0x02: 'read',
0x04: 'write',
0x08: 'erase',
},
),
'fitness_equipment_state': FieldType( # fitness equipment event data
name='fitness_equipment_state',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'ready',
1: 'in_use',
2: 'paused',
3: 'unknown', # lost connection to fitness equipment
},
),
'garmin_product': FieldType(
name='garmin_product',
base_type=BASE_TYPES[0x84], # uint16
values={
1: 'hrm1',
2: 'axh01', # AXH01 HRM chipset
3: 'axb01',
4: 'axb02',
5: 'hrm2ss',
6: 'dsi_alf02',
7: 'hrm3ss',
8: 'hrm_run_single_byte_product_id', # hrm_run model for HRM ANT+ messaging
9: 'bsm', # BSM model for ANT+ messaging
10: 'bcm', # BCM model for ANT+ messaging
473: 'fr301_china',
474: 'fr301_japan',
475: 'fr301_korea',
494: 'fr301_taiwan',
717: 'fr405', # Forerunner 405
782: 'fr50', # Forerunner 50
987: 'fr405_japan',
988: 'fr60', # Forerunner 60
1011: 'dsi_alf01',
1018: 'fr310xt', # Forerunner 310
1036: 'edge500',
1124: 'fr110', # Forerunner 110
1169: 'edge800',
1199: 'edge500_taiwan',
1213: 'edge500_japan',
1253: 'chirp',
1274: 'fr110_japan',
1325: 'edge200',
1328: 'fr910xt',
1333: 'edge800_taiwan',
1334: 'edge800_japan',
1341: 'alf04',
1345: 'fr610',
1360: 'fr210_japan',
1380: 'vector_ss',
1381: 'vector_cp',
1386: 'edge800_china',
1387: 'edge500_china',
1410: 'fr610_japan',
1422: 'edge500_korea',
1436: 'fr70',
1446: 'fr310xt_4t',
1461: 'amx',
1482: 'fr10',
1497: 'edge800_korea',
1499: 'swim',
1537: 'fr910xt_china',
1551: 'fenix',
1555: 'edge200_taiwan',
1561: 'edge510',
1567: 'edge810',
1570: 'tempe',
1600: 'fr910xt_japan',
1623: 'fr620',
1632: 'fr220',
1664: 'fr910xt_korea',
1688: 'fr10_japan',
1721: 'edge810_japan',
1735: 'virb_elite',
1736: 'edge_touring', # Also Edge Touring Plus
1742: 'edge510_japan',
1752: 'hrm_run',
1821: 'edge510_asia',
1822: 'edge810_china',
1823: 'edge810_taiwan',
1836: 'edge1000',
1837: 'vivo_fit',
1853: 'virb_remote',
1885: 'vivo_ki',
1903: 'fr15',
1918: 'edge510_korea',
1928: 'fr620_japan',
1929: 'fr620_china',
1930: 'fr220_japan',
1931: 'fr220_china',
1967: 'fenix2',
10007: 'sdm4', # SDM4 footpod
10014: 'edge_remote',
20119: 'training_center',
65532: 'android_antplus_plugin',
65534: 'connect', # Garmin Connect website
},
),
'gender': FieldType(
name='gender',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'female',
1: 'male',
},
),
'goal': FieldType(
name='goal',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'time',
1: 'distance',
2: 'calories',
3: 'frequency',
4: 'steps',
},
),
'goal_recurrence': FieldType(
name='goal_recurrence',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'off',
1: 'daily',
2: 'weekly',
3: 'monthly',
4: 'yearly',
5: 'custom',
},
),
'hr_type': FieldType(
name='hr_type',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'normal',
1: 'irregular',
},
),
'hr_zone_calc': FieldType(
name='hr_zone_calc',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'custom',
1: 'percent_max_hr',
2: 'percent_hrr',
},
),
'intensity': FieldType(
name='intensity',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'active',
1: 'rest',
2: 'warmup',
3: 'cooldown',
},
),
'language': FieldType(
name='language',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'english',
1: 'french',
2: 'italian',
3: 'german',
4: 'spanish',
5: 'croatian',
6: 'czech',
7: 'danish',
8: 'dutch',
9: 'finnish',
10: 'greek',
11: 'hungarian',
12: 'norwegian',
13: 'polish',
14: 'portuguese',
15: 'slovakian',
16: 'slovenian',
17: 'swedish',
18: 'russian',
19: 'turkish',
20: 'latvian',
21: 'ukrainian',
22: 'arabic',
23: 'farsi',
24: 'bulgarian',
25: 'romanian',
254: 'custom',
},
),
'lap_trigger': FieldType(
name='lap_trigger',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'manual',
1: 'time',
2: 'distance',
3: 'position_start',
4: 'position_lap',
5: 'position_waypoint',
6: 'position_marked',
7: 'session_end',
8: 'fitness_equipment',
},
),
'left_right_balance': FieldType(
name='left_right_balance',
base_type=BASE_TYPES[0x02], # uint8
values={
0x7F: 'mask', # % contribution
0x80: 'right', # data corresponds to right if set, otherwise unknown
},
),
'left_right_balance_100': FieldType(
name='left_right_balance_100',
base_type=BASE_TYPES[0x84], # uint16
values={
0x3FFF: 'mask', # % contribution scaled by 100
0x8000: 'right', # data corresponds to right if set, otherwise unknown
},
),
'length_type': FieldType(
name='length_type',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'idle', # Rest period. Length with no strokes
1: 'active', # Length with strokes.
},
),
'local_date_time': FieldType( # seconds since 00:00 Dec 31 1989 in local time zone
name='local_date_time',
base_type=BASE_TYPES[0x86], # uint32
values={
0x10000000: 'min', # if date_time is < 0x10000000 then it is system time (seconds from device power on)
},
),
'manufacturer': FieldType(
name='manufacturer',
base_type=BASE_TYPES[0x84], # uint16
values={
1: 'garmin',
2: 'garmin_fr405_antfs', # Do not use. Used by FR405 for ANTFS man id.
3: 'zephyr',
4: 'dayton',
5: 'idt',
6: 'srm',
7: 'quarq',
8: 'ibike',
9: 'saris',
10: 'spark_hk',
11: 'tanita',
12: 'echowell',
13: 'dynastream_oem',
14: 'nautilus',
15: 'dynastream',
16: 'timex',
17: 'metrigear',
18: 'xelic',
19: 'beurer',
20: 'cardiosport',
21: 'a_and_d',
22: 'hmm',
23: 'suunto',
24: 'thita_elektronik',
25: 'gpulse',
26: 'clean_mobile',
27: 'pedal_brain',
28: 'peaksware',
29: 'saxonar',
30: 'lemond_fitness',
31: 'dexcom',
32: 'wahoo_fitness',
33: 'octane_fitness',
34: 'archinoetics',
35: 'the_hurt_box',
36: 'citizen_systems',
37: 'magellan',
38: 'osynce',
39: 'holux',
40: 'concept2',
42: 'one_giant_leap',
43: 'ace_sensor',
44: 'brim_brothers',
45: 'xplova',
46: 'perception_digital',
47: 'bf1systems',
48: 'pioneer',
49: 'spantec',
50: 'metalogics',
51: '4iiiis',
52: 'seiko_epson',
53: 'seiko_epson_oem',
54: 'ifor_powell',
55: 'maxwell_guider',
56: 'star_trac',
57: 'breakaway',
58: 'alatech_technology_ltd',
59: 'mio_technology_europe',
60: 'rotor',
61: 'geonaute',
62: 'id_bike',
63: 'specialized',
64: 'wtek',
65: 'physical_enterprises',
66: 'north_pole_engineering',
67: 'bkool',
68: 'cateye',
69: 'stages_cycling',
70: 'sigmasport',
71: 'tomtom',
72: 'peripedal',
73: 'wattbike',
76: 'moxy',
77: 'ciclosport',
78: 'powerbahn',
79: 'acorn_projects_aps',
80: 'lifebeam',
81: 'bontrager',
82: 'wellgo',
83: 'scosche',
84: 'magura',
85: 'woodway',
86: 'elite',
87: 'nielsen_kellerman',
88: 'dk_city',
89: 'tacx',
90: 'direction_technology',
91: 'magtonic',
92: '1partcarbon',
93: 'inside_ride_technologies',
255: 'development',
257: 'healthandlife',
258: 'lezyne',
259: 'scribe_labs',
5759: 'actigraphcorp',
},
),
'mesg_count': FieldType(
name='mesg_count',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'num_per_file',
1: 'max_per_file',
2: 'max_per_file_type',
},
),
'mesg_num': FieldType(
name='mesg_num',
base_type=BASE_TYPES[0x84], # uint16
values={
0: 'file_id',
1: 'capabilities',
2: 'device_settings',
3: 'user_profile',
4: 'hrm_profile',
5: 'sdm_profile',
6: 'bike_profile',
7: 'zones_target',
8: 'hr_zone',
9: 'power_zone',
10: 'met_zone',
12: 'sport',
15: 'goal',
18: 'session',
19: 'lap',
20: 'record',
21: 'event',
23: 'device_info',
26: 'workout',
27: 'workout_step',
28: 'schedule',
30: 'weight_scale',
31: 'course',
32: 'course_point',
33: 'totals',
34: 'activity',
35: 'software',
37: 'file_capabilities',
38: 'mesg_capabilities',
39: 'field_capabilities',
49: 'file_creator',
51: 'blood_pressure',
53: 'speed_zone',
55: 'monitoring',
72: 'training_file',
78: 'hrv',
101: 'length',
103: 'monitoring_info',
105: 'pad',
106: 'slave_device',
131: 'cadence_zone',
145: 'memo_glob',
},
),
'message_index': FieldType(
name='message_index',
base_type=BASE_TYPES[0x84], # uint16
values={
0x0FFF: 'mask', # index
0x7000: 'reserved', # reserved (default 0)
0x8000: 'selected', # message is selected if set
},
),
'pwr_zone_calc': FieldType(
name='pwr_zone_calc',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'custom',
1: 'percent_ftp',
},
),
'schedule': FieldType(
name='schedule',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'workout',
1: 'course',
},
),
'session_trigger': FieldType(
name='session_trigger',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'activity_end',
1: 'manual', # User changed sport.
2: 'auto_multi_sport', # Auto multi-sport feature is enabled and user pressed lap button to advance session.
3: 'fitness_equipment', # Auto sport change caused by user linking to fitness equipment.
},
),
'source_type': FieldType(
name='source_type',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'ant', # External device connected with ANT
1: 'antplus', # External device connected with ANT+
2: 'bluetooth', # External device connected with BT
3: 'bluetooth_low_energy', # External device connected with BLE
4: 'wifi', # External device connected with Wifi
5: 'local', # Onboard device
},
),
'sport': FieldType(
name='sport',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'generic',
1: 'running',
2: 'cycling',
3: 'transition', # Mulitsport transition
4: 'fitness_equipment',
5: 'swimming',
6: 'basketball',
7: 'soccer',
8: 'tennis',
9: 'american_football',
10: 'training',
11: 'walking',
12: 'cross_country_skiing',
13: 'alpine_skiing',
14: 'snowboarding',
15: 'rowing',
16: 'mountaineering',
17: 'hiking',
18: 'multisport',
19: 'paddling',
254: 'all', # All is for goals only to include all sports.
},
),
'sport_bits_0': FieldType( # Bit field corresponding to sport enum type (1 << sport).
name='sport_bits_0',
base_type=BASE_TYPES[0x0A], # uint8z
values={
0x01: 'generic',
0x02: 'running',
0x04: 'cycling',
0x08: 'transition', # Mulitsport transition
0x10: 'fitness_equipment',
0x20: 'swimming',
0x40: 'basketball',
0x80: 'soccer',
},
),
'sport_bits_1': FieldType( # Bit field corresponding to sport enum type (1 << (sport-8)).
name='sport_bits_1',
base_type=BASE_TYPES[0x0A], # uint8z
values={
0x01: 'tennis',
0x02: 'american_football',
0x04: 'training',
0x08: 'walking',
0x10: 'cross_country_skiing',
0x20: 'alpine_skiing',
0x40: 'snowboarding',
0x80: 'rowing',
},
),
'sport_bits_2': FieldType( # Bit field corresponding to sport enum type (1 << (sport-16)).
name='sport_bits_2',
base_type=BASE_TYPES[0x0A], # uint8z
values={
0x01: 'mountaineering',
0x02: 'hiking',
0x04: 'multisport',
0x08: 'paddling',
},
),
'stroke_type': FieldType(
name='stroke_type',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'no_event',
1: 'other', # stroke was detected but cannot be identified
2: 'serve',
3: 'forehand',
4: 'backhand',
5: 'smash',
},
),
'sub_sport': FieldType(
name='sub_sport',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'generic',
1: 'treadmill', # Run/Fitness Equipment
2: 'street', # Run
3: 'trail', # Run
4: 'track', # Run
5: 'spin', # Cycling
6: 'indoor_cycling', # Cycling/Fitness Equipment
7: 'road', # Cycling
8: 'mountain', # Cycling
9: 'downhill', # Cycling
10: 'recumbent', # Cycling
11: 'cyclocross', # Cycling
12: 'hand_cycling', # Cycling
13: 'track_cycling', # Cycling
14: 'indoor_rowing', # Fitness Equipment
15: 'elliptical', # Fitness Equipment
16: 'stair_climbing', # Fitness Equipment
17: 'lap_swimming', # Swimming
18: 'open_water', # Swimming
19: 'flexibility_training', # Training
20: 'strength_training', # Training
21: 'warm_up', # Tennis
22: 'match', # Tennis
23: 'exercise', # Tennis
24: 'challenge', # Tennis
25: 'indoor_skiing', # Fitness Equipment
26: 'cardio_training', # Training
27: 'indoor_walking', # Walking/Fitness Equipment
254: 'all',
},
),
'swim_stroke': FieldType(
name='swim_stroke',
base_type=BASE_TYPES[0x00], # enum
values={
0: 'freestyle',