summaryrefslogtreecommitdiff
path: root/README.md
blob: 8f443e828d506c37d84266ff2f20ab70c4cec1a3 (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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# PostRunner

PostRunner is an application to manage FIT files such as those
produced by Garmin products like the Forerunner 620 (FR620) and Fenix
3. It allows you to import the files from the device and inspect them.
It can also update satellite orbit prediction (EPO) data on the device
to speed-up fix times. It is an offline alternative to Garmin Connect.

## Installation

PostRunner is a [http://www.ruby-lang.org](Ruby) application. You need
to have a Ruby 2.0 or later runtime environment installed.  This
application was developed and tested on Linux but may work on other
operating systems as well.

```
$ gem install postrunner
```

## Usage

### Importing FIT files

To get started you need to connect your device to your computer and
mount it as a disk drive. Only devices that expose their data as FAT file
system are supported. Older devices use proprietary drivers and are
not supported by postrunner. Once the device is mounted find out the
full path to the directory that contains your FIT files. You can then
import all files on the device.

```
$ postrunner import /var/run/media/user/GARMIN/GARMIN/ACTIVITY/
```
    
The above command assumes that your device is mounted as
/var/run/media/user. Please replace this with the path to your device.
Files that have been imported previously will not be imported again. 

### Viewing FIT file data on the console

Now you can list all the FIT files in your data base.

```
$ postrunner list
```
    
The first column is the index you can use to reference FIT files. To
get a summary of the most recent activity use the following command.
References to already imported activities start with a colon followed
by the index number.

```
$ postrunner summary :1
```

To get a summary of the oldest activity you can use

```
$ postrunner summary :-1
```

To select multiple activities you can use a range.

```
$ postrunner summary :1-3
```

You can also get a full dump of the content of a FIT file.

```
$ postrunner dump 1234568.FIT
```
    
If the file is already in the data base you can also use the reference
notation.

```
$ postrunner dump :1
```
    
This will provide you with a lot more information contained in the FIT
files that is not available through Garmin Connect or most other
tools.

When you upload your FIT data to the Garmin Connect site using WiFi or
Garmin Software, your device will be updated with 7 days worth of
Extended Prediction Orbit (EPO) data. The GPS receiver in your device
can use this data to acquire GPS locks much faster during the next 7
days. To fetch the current set of EPO data, just use the following
command while you have your device mounted via USB.

```
$ postrunner update-gps
```

This was tested on the FR620 and will probably also work on the FR220.
Other devices may work, but you use this at your own risk. This
feature will download a file called EPO.BIN and copy it to
GARMIN/REMOTESW/EPO.BIN.

### Viewing FIT file data in your web browser

You can also view the full details of your activity in your browser.
This view includes a map (internet connection for map data required)
and charts for speed, pace, heart rate, cadence and the like.

```
$ postrunner show
```

This will open an overview of the most recent activities in your web
browser. It will use Firefox by default. You can overwrite this by
setting the BROWSER environment variable.

To view a specific run directly, you can use similar specifications
like those explained above.

```
$ postrunner show :1
```

## Contributing

PostRunner is currently work in progress. It does some things I want
with files from my Garmin FR620. It's certainly possible to do more
things and support more devices. Patches are welcome!

1. Fork it ( https://github.com/scrapper/postrunner/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

## License

PostRunner is licensed under the GNU GPL version 2.

The distribution includes third party components that are licensed
under different OSI compatible terms.

* flot: MIT License
* jquery: MIT License
* openlayers: 2 clause BSD license
* Oxygen Icons: GNU LGPLv3 (https://techbase.kde.org/Projects/Oxygen/Licensing)