aboutsummaryrefslogtreecommitdiff
path: root/dataformat
blob: f8a35c28c8825d11e520debb64bb0ae25a1e9ffb (plain)
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
The data is split across two files, LogDataAccessTbl.bin and LogDataStorage.bin. The former provides information about the location of the actual workout data in LogDataStorage. Durations are given in tenths of a second.

## LogDataAccessTbl.bin

Each entry in **LogDataAccessTbl** is 32 bytes, multibyte entries are Little Endian:

| Byte  | Meaning                             |
|------:|-------------------------------------|
| 0     | Magic 0xF0                          |
| 1     | Workout type                        |
| 2-3   | Interval rest time*                 |
| 4-5   | Workout name*                       |
| 6-7   | N/A                                 |
| 8-9   | Timestamp*                          |
| 10-11 | N/A                                 |
| 12-13 | No. of Splits*                      |
| 14-15 | Duration/Distance*                  |
| 16-17 | Record offset in LogDataStorage.bin |
| 18-23 | N/A                                 |
| 24-25 | Size of record in bytes             |
| 26-27 | Index                               |
| 28-31 | N/A                                 |

( * unimportant, because either redundant in actual record or unreliable )


### Workout Types

| Value | Type              |
|-------|-------------------|
| 0x01  | Free Row          |
| 0x03  | Single Distance   |
| 0x05  | Single Time       |
| 0x06  | Timed Interval    |
| 0x07  | Distance Interval |
| 0x08  | Variable Interval |
| 0x0A  | Single Calorie    |


## LogDataStorage.bin

Each entry in **LogDataStorage** has a header and a number of splits or intervals. The header size is either 50 bytes (workout types 0x01, 0x03, 0x05, 0x0A) or 52 bytes (others). The size of each split frame is 32 bytes for all workouts except type 0x08, where it is 48 bytes. Multibyte entries are, contrary to LogDataAccessTbl.bin Big Endian(!)

### Header (types 0x01 - 0x05, 0x0A)

| Byte  | Meaning            |
|------:|--------------------|
| 0     | Magic 0x95         |
| 1     | Type of workout    |
| 2-3   | N/A                |
| 4-7   | Serial number      |
| 8-11  | Timestamp          |
| 12-13 | User ID            |
| 14-17 | N/A                |
| 18    | Record ID          |
| 19-21 | Magic 0x000000     |
| 22-23 | Total Duration*    |
| 24-27 | Total Distance     |
| 28    | SPM                |
| 29    | Split Info         |
| 30-31 | Split Size*        |
| 32-49 | N/A                |

### Header (Fixed Intervals)

| Byte  | Meaning             |
|------:|---------------------|
| 0-18  | As above            |
| 19    | Number of splits    |
| 20-21 | Split size          |
| 22-23 | Interval rest time  |
| 24-27 | Total Work Duration |
| 28-29 | Total Rest Distance |
| 30-51 | N/A                 |

### Header (Variable Intervals)

| Byte  | Meaning             |
|------:|---------------------|
| 0-18  | As above            |
| 19    | Number of splits    |
| 20-21 | Split size          |
| 20-23 | Total Work Duration |
| 24-27 | Total Work Distance |
| 30-51 | N/A                 |



### Timestamp format (bytes 8-11)

| Bits  | Meaning          |
|------:|------------------|
| 0-6   | year after 2000  |
| 7-11  | day              |
| 12-15 | month            |
| 16-23 | hour             |
| 24-31 | minute           |


### Split Frame (Non-Interval Types)

| Byte  | Meaning                 |
|------:|-------------------------|
| 0-1   | Split Duration/Distance |
| 2     | Heart Rate              |
| 3     | SPM                     |
| 4-31  | N/A                     |

### Interval Frame (Timed Interval, Distance Interval)

| Byte  | Meaning                 |
|------:|-------------------------|
| 0-1   | Split Duration/Distance |
| 2     | Heart Rate              |
| 3     | Rest Heart Rate         |
| 4     | SPM                     |
| 5-31  | N/A                     |

### Variable Interval Frame

| Byte  | Meaning                 |
|------:|-------------------------|
| 0     | Split Type              |
| 1     | SPM                     |
| 2-5   | Work Interval Time      |
| 6-9   | Work Interval Distance  |
| 10    | Heart Rate              |
| 11    | Rest Heart Rate         |
| 12-13 | Interval Rest Time      |
| 14-15 | Interval Rest Distance  |
| 16-47 | N/A                     |