Skip to content

Latest commit

 

History

History
90 lines (72 loc) · 3.03 KB

README.md

File metadata and controls

90 lines (72 loc) · 3.03 KB

FIT Print CLI

A program to generate comprehensive human-readable *.txt file containing details extracted from FIT files.

Usage

Run

go run main.go DeveloperData.fit

# Output:
📄 "DeveloperData.fit" -> "DeveloperData-fitprint.txt"

Build or Install

Build

go build -o fitprint main.go

Install

go install .

Run the resulting Binary

fitprint DeveloperData.fit

# Output:
📄 "DeveloperData.fit" -> "DeveloperData-fitprint.txt"

Sample Output

File generated by https://github.com/muktihari/fit/tree/master/cmd/fitprint
Filepath: "testdata/from_official_sdk/DeveloperData.fit"

File Header:
  - Size: 14
  - Protocol Version: 2.0 (32)
  - Profile Version: 1640
  - DataSize: 162
  - DataType: ".FIT"
  - CRC: 53438

file_id (num: 0, arch: 1, fields[-]: 4, developerFields[+]: 0) [0]:
  - manufacturer (num: 1, type: uint16 | manufacturer): 15 <dynastream>
  - type (num: 0, type: enum | file): 4 <activity>
  - garmin_product (num: 2, type: uint16 | garmin_product): 9001 <unknown(9001)> <<DynamicField: "product" (type: uint16)>>
  - serial_number (num: 3, type: uint32z): 1701
developer_data_id (num: 207, arch: 1, fields[-]: 2, developerFields[+]: 0) [1]:
  - application_id (num: 1, type: byte array): [1 1 2 3 5 8 13 21 34 55 89 144 233 121 98 219]
  - developer_data_index (num: 3, type: uint8): 0
field_description (num: 206, arch: 1, fields[-]: 5, developerFields[+]: 0) [2]:
  - developer_data_index (num: 0, type: uint8): 0
  - field_definition_number (num: 1, type: uint8): 0
  - fit_base_type_id (num: 2, type: uint8 | fit_base_type): 1 <sint8>
  - field_name (num: 3, type: string array): ["doughnuts_earned"]
  - units (num: 8, type: string array): ["doughnuts"]
record (num: 20, arch: 1, fields[-]: 5, developerFields[+]: 1) [3]:
  - heart_rate (num: 3, type: uint8): 140 bpm
  - cadence (num: 4, type: uint8): 88 rpm
  - distance (num: 5, type: uint32): 510 m ((51000 / 100) - 0)
  - speed (num: 6, type: uint16): 47.488 m/s ((47488 / 1000) - 0)
  - enhanced_speed (num: 73, type: uint32): 47.488 m/s ((47488 / 1000) - 0) <<ExpandedField>>
  + doughnuts_earned (num: 0, type: sint8): 1 doughnuts
record (num: 20, arch: 1, fields[-]: 5, developerFields[+]: 1) [4]:
  - heart_rate (num: 3, type: uint8): 143 bpm
  - cadence (num: 4, type: uint8): 90 rpm
  - distance (num: 5, type: uint32): 2080 m ((208000 / 100) - 0)
  - speed (num: 6, type: uint16): 36.416 m/s ((36416 / 1000) - 0)
  - enhanced_speed (num: 73, type: uint32): 36.416 m/s ((36416 / 1000) - 0) <<ExpandedField>>
  + doughnuts_earned (num: 0, type: sint8): 2 doughnuts
record (num: 20, arch: 1, fields[-]: 5, developerFields[+]: 1) [5]:
  - heart_rate (num: 3, type: uint8): 144 bpm
  - cadence (num: 4, type: uint8): 92 rpm
  - distance (num: 5, type: uint32): 3710 m ((371000 / 100) - 0)
  - speed (num: 6, type: uint16): 35.344 m/s ((35344 / 1000) - 0)
  - enhanced_speed (num: 73, type: uint32): 35.344 m/s ((35344 / 1000) - 0) <<ExpandedField>>
  + doughnuts_earned (num: 0, type: sint8): 3 doughnuts

File CRC: 40659