stressfactor 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.rspec +2 -0
- data/.ruby-version +1 -0
- data/.travis.yml +7 -0
- data/Gemfile +5 -0
- data/Guardfile +10 -0
- data/LICENSE.txt +22 -0
- data/README.md +70 -0
- data/Rakefile +8 -0
- data/bin/stressfactor +27 -0
- data/examples/data/sample.gpx +246 -0
- data/examples/load_gpx.rb +5 -0
- data/lib/stressfactor.rb +14 -0
- data/lib/stressfactor/average_pace_accumulator.rb +24 -0
- data/lib/stressfactor/gpx_loader.rb +39 -0
- data/lib/stressfactor/grade_adjusted_pace_strategy.rb +24 -0
- data/lib/stressfactor/interval.rb +35 -0
- data/lib/stressfactor/pace_calculator.rb +24 -0
- data/lib/stressfactor/pace_strategy.rb +11 -0
- data/lib/stressfactor/raw_pace_strategy.rb +14 -0
- data/lib/stressfactor/stress_calculator.rb +29 -0
- data/lib/stressfactor/version.rb +3 -0
- data/scripts/analyze_sample_gpx.rb +7 -0
- data/spec/spec_helper.rb +91 -0
- data/spec/stressfactor/gpx_loader_spec.rb +59 -0
- data/spec/stressfactor/grade_adjusted_pace_strategy_spec.rb +55 -0
- data/spec/stressfactor/interval_spec.rb +51 -0
- data/spec/stressfactor/pace_calculator_spec.rb +68 -0
- data/spec/stressfactor/raw_pace_strategy_spec.rb +47 -0
- data/spec/stressfactor/stress_calculator_spec.rb +34 -0
- data/stressfactor.gemspec +29 -0
- metadata +181 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0695c0470b324715e0602a6354b6bb422858b626
|
4
|
+
data.tar.gz: 7463a74912001e9d14c8bd4c3beae78db67034b4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c21680c855088c08ffca9f5f4f01b20007bb597e91719607590063a0bf9e14866bb843a4b45c029e6948e2b3a3bca109e61500af5a653ade16589a64e72daa5f
|
7
|
+
data.tar.gz: 0e2fdaa9e876778514ab5a1d54b36a91e80b4dde8aee35f502509da196d3f80fe6cae7f5d55408679784509208775787411331e63ed73bd5292ad313a6bc8617
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.1.3
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Guardfile
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
guard :rspec do
|
5
|
+
watch(%r{^spec/.+_spec\.rb$})
|
6
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
7
|
+
watch('spec/spec_helper.rb') { "spec" }
|
8
|
+
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
|
9
|
+
end
|
10
|
+
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Andrew Hao
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
# Stressfactor
|
2
|
+
|
3
|
+
[![Build
|
4
|
+
Status](https://travis-ci.org/andrewhao/stressfactor.svg)](https://travis-ci.org/andrewhao/stressfactor)
|
5
|
+
[![Code
|
6
|
+
Climate](https://codeclimate.com/github/andrewhao/stressfactor/badges/gpa.svg)](https://codeclimate.com/github/andrewhao/stressfactor)
|
7
|
+
|
8
|
+
|
9
|
+
Calculate workout intensity based on heart rate. Exploratory coding of
|
10
|
+
the Training Stress Score as detailed here:
|
11
|
+
|
12
|
+
* https://chris-lamb.co.uk/posts/estimating-training-stress-score-tss-running-strava
|
13
|
+
* http://home.trainingpeaks.com/blog/article/running-training-stress-score-rtss-explained
|
14
|
+
|
15
|
+
## Calculating the stressor score by run pace and normalized graded pace.
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
(duration_seconds * normalized_graded_pace * intensity_factor) /
|
19
|
+
(functional_threshold_pace * 3600) * 100
|
20
|
+
```
|
21
|
+
|
22
|
+
### Define some terms:
|
23
|
+
|
24
|
+
`duration_seconds`: The length of the workout, in seconds
|
25
|
+
|
26
|
+
`normalized_graded_pace`: Adjusted pace for the incline/decline.
|
27
|
+
|
28
|
+
`intensity_factor`: Ratio of NGP / FTP
|
29
|
+
|
30
|
+
`functional_threshold_pace`: Your average pace, "all out" for 1 hour.
|
31
|
+
|
32
|
+
## Grade Adjusted Pace
|
33
|
+
|
34
|
+
* http://engineering.strava.com/improving-grade-adjusted-pace/
|
35
|
+
* http://www.runnersworld.com/races/downhill-all-way
|
36
|
+
|
37
|
+
> More than a quarter century ago, British researcher Mervyn Davies
|
38
|
+
> conducted treadmill tests that revealed that each 1 percent of upgrade
|
39
|
+
> slowed elite runners by about 3.3 percent.
|
40
|
+
|
41
|
+
> That’s uphill. Davies also tested downgrades. Not surprisingly, he
|
42
|
+
> found that descents don’t give back as much as ascents take away. In
|
43
|
+
> fact, they only speed you up by about 55 percent as much as the
|
44
|
+
> corresponding upgrades slow you down.
|
45
|
+
|
46
|
+
## Installation
|
47
|
+
|
48
|
+
```ruby
|
49
|
+
gem 'stressfactor'
|
50
|
+
```
|
51
|
+
|
52
|
+
And then execute:
|
53
|
+
|
54
|
+
$ bundle
|
55
|
+
|
56
|
+
Or install it yourself as:
|
57
|
+
|
58
|
+
$ gem install stressfactor
|
59
|
+
|
60
|
+
## Usage
|
61
|
+
|
62
|
+
$ ./bin/stressfactor analyze PATH_TO_GPX [--units=metric|english]
|
63
|
+
|
64
|
+
## Contributing
|
65
|
+
|
66
|
+
1. Fork it ( https://github.com/[my-github-username]/stressfactor/fork )
|
67
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
68
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
69
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
70
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
data/bin/stressfactor
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "thor"
|
4
|
+
require_relative '../lib/stressfactor'
|
5
|
+
|
6
|
+
class CLI < Thor
|
7
|
+
desc "analyze PATH", "Run analysis on a GPX."
|
8
|
+
options units: :string
|
9
|
+
def analyze(path)
|
10
|
+
units = options[:units] || :metric
|
11
|
+
units = units.to_sym
|
12
|
+
|
13
|
+
units_help = units == :metric ? "min/km" : "min/mi"
|
14
|
+
puts "Units are #{units}, which are in #{units_help}"
|
15
|
+
|
16
|
+
loader = Stressfactor::GpxLoader.new(path)
|
17
|
+
pc = Stressfactor::PaceCalculator.new(loader)
|
18
|
+
puts "Grade Adjusted Pace: #{pc.calculate(strategy: :grade_adjusted, units: units)}"
|
19
|
+
puts "Raw Pace: #{pc.calculate(strategy: :raw, units: units)}"
|
20
|
+
|
21
|
+
pace = 3.8
|
22
|
+
stress = Stressfactor::StressCalculator.new(threshold_pace: pace, loader: loader)
|
23
|
+
puts "Training stress score: #{stress.calculate}"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
CLI.start(ARGV)
|
@@ -0,0 +1,246 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<gpx
|
3
|
+
version="1.1"
|
4
|
+
creator="Runmeter - http://www.runmeter.com"
|
5
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
6
|
+
xmlns:abvio="http://www.abvio.com/xmlschemas/1"
|
7
|
+
xmlns="http://www.topografix.com/GPX/1/1"
|
8
|
+
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/gpx/1/1/gpx.xsd">
|
9
|
+
<metadata>
|
10
|
+
<name>Runmeter-Run-20141018-0847.gpx</name>
|
11
|
+
<desc>Runmeter Run Oct 18, 2014, 8:47:25 AM</desc>
|
12
|
+
<author><name>Abvio Runmeter</name><email id="support" domain="abvio.com"/></author>
|
13
|
+
<copyright author="Abvio Inc."><year>2014</year></copyright>
|
14
|
+
<link href="http://www.runmeter.com">
|
15
|
+
<text>Abvio Runmeter</text>
|
16
|
+
<type>text/html</type>
|
17
|
+
</link>
|
18
|
+
<time>2014-10-18T16:23:52Z</time>
|
19
|
+
<keywords>Abvio, Runmeter, run</keywords>
|
20
|
+
<bounds minlat="37.7982995" minlon="-122.2626771" maxlat="37.8017464" maxlon="-122.2554386"/>
|
21
|
+
</metadata>
|
22
|
+
<trk>
|
23
|
+
<name><![CDATA[School to Sky]]></name>
|
24
|
+
<type><![CDATA[Run]]></type>
|
25
|
+
<trkseg>
|
26
|
+
<trkpt lat="37.7985474" lon="-122.2554386"><ele>7.9</ele><time>2014-10-18T15:47:25Z</time></trkpt>
|
27
|
+
<trkpt lat="37.7985583" lon="-122.2554564"><ele>7.9</ele><time>2014-10-18T15:47:27Z</time></trkpt>
|
28
|
+
<trkpt lat="37.7986548" lon="-122.2555806"><ele>7.7</ele><time>2014-10-18T15:47:32Z</time></trkpt>
|
29
|
+
<trkpt lat="37.7988059" lon="-122.2556700"><ele>7.6</ele><time>2014-10-18T15:47:37Z</time></trkpt>
|
30
|
+
<trkpt lat="37.7989396" lon="-122.2557522"><ele>7.4</ele><time>2014-10-18T15:47:42Z</time></trkpt>
|
31
|
+
<trkpt lat="37.7989117" lon="-122.2559577"><ele>7.3</ele><time>2014-10-18T15:47:47Z</time></trkpt>
|
32
|
+
<trkpt lat="37.7988901" lon="-122.2561352"><ele>7.1</ele><time>2014-10-18T15:47:52Z</time></trkpt>
|
33
|
+
<trkpt lat="37.7988448" lon="-122.2563392"><ele>7.0</ele><time>2014-10-18T15:47:57Z</time></trkpt>
|
34
|
+
<trkpt lat="37.7988119" lon="-122.2565099"><ele>6.9</ele><time>2014-10-18T15:48:00Z</time></trkpt>
|
35
|
+
<trkpt lat="37.7987737" lon="-122.2566810"><ele>6.8</ele><time>2014-10-18T15:48:03Z</time></trkpt>
|
36
|
+
<trkpt lat="37.7987290" lon="-122.2568695"><ele>6.7</ele><time>2014-10-18T15:48:07Z</time></trkpt>
|
37
|
+
<trkpt lat="37.7986297" lon="-122.2570615"><ele>6.5</ele><time>2014-10-18T15:48:13Z</time></trkpt>
|
38
|
+
<trkpt lat="37.7985334" lon="-122.2572004"><ele>6.3</ele><time>2014-10-18T15:48:18Z</time></trkpt>
|
39
|
+
<trkpt lat="37.7985125" lon="-122.2573141"><ele>6.2</ele><time>2014-10-18T15:48:21Z</time></trkpt>
|
40
|
+
<trkpt lat="37.7986091" lon="-122.2574690"><ele>6.1</ele><time>2014-10-18T15:48:26Z</time></trkpt>
|
41
|
+
<trkpt lat="37.7985833" lon="-122.2576368"><ele>6.0</ele><time>2014-10-18T15:48:30Z</time></trkpt>
|
42
|
+
<trkpt lat="37.7984881" lon="-122.2577751"><ele>5.8</ele><time>2014-10-18T15:48:34Z</time></trkpt>
|
43
|
+
<trkpt lat="37.7984214" lon="-122.2579271"><ele>5.7</ele><time>2014-10-18T15:48:38Z</time></trkpt>
|
44
|
+
<trkpt lat="37.7983721" lon="-122.2580909"><ele>5.6</ele><time>2014-10-18T15:48:42Z</time></trkpt>
|
45
|
+
<trkpt lat="37.7983425" lon="-122.2582586"><ele>5.5</ele><time>2014-10-18T15:48:46Z</time></trkpt>
|
46
|
+
<trkpt lat="37.7983173" lon="-122.2584266"><ele>5.3</ele><time>2014-10-18T15:48:50Z</time></trkpt>
|
47
|
+
<trkpt lat="37.7983572" lon="-122.2586205"><ele>5.2</ele><time>2014-10-18T15:48:55Z</time></trkpt>
|
48
|
+
<trkpt lat="37.7983800" lon="-122.2588054"><ele>5.0</ele><time>2014-10-18T15:49:00Z</time></trkpt>
|
49
|
+
<trkpt lat="37.7983874" lon="-122.2590119"><ele>4.9</ele><time>2014-10-18T15:49:05Z</time></trkpt>
|
50
|
+
<trkpt lat="37.7983726" lon="-122.2591700"><ele>4.7</ele><time>2014-10-18T15:49:10Z</time></trkpt>
|
51
|
+
<trkpt lat="37.7983278" lon="-122.2593052"><ele>4.6</ele><time>2014-10-18T15:49:14Z</time></trkpt>
|
52
|
+
<trkpt lat="37.7983504" lon="-122.2594807"><ele>4.5</ele><time>2014-10-18T15:49:18Z</time></trkpt>
|
53
|
+
<trkpt lat="37.7983399" lon="-122.2596825"><ele>4.3</ele><time>2014-10-18T15:49:23Z</time></trkpt>
|
54
|
+
<trkpt lat="37.7982995" lon="-122.2597253"><ele>4.3</ele><time>2014-10-18T15:49:25Z</time></trkpt>
|
55
|
+
<trkpt lat="37.7983299" lon="-122.2599319"><ele>4.6</ele><time>2014-10-18T15:49:30Z</time></trkpt>
|
56
|
+
<trkpt lat="37.7983670" lon="-122.2601058"><ele>5.1</ele><time>2014-10-18T15:49:34Z</time></trkpt>
|
57
|
+
<trkpt lat="37.7983998" lon="-122.2602840"><ele>5.6</ele><time>2014-10-18T15:49:38Z</time></trkpt>
|
58
|
+
<trkpt lat="37.7984335" lon="-122.2604557"><ele>6.2</ele><time>2014-10-18T15:49:42Z</time></trkpt>
|
59
|
+
<trkpt lat="37.7984804" lon="-122.2606221"><ele>6.7</ele><time>2014-10-18T15:49:46Z</time></trkpt>
|
60
|
+
<trkpt lat="37.7985273" lon="-122.2607930"><ele>7.2</ele><time>2014-10-18T15:49:50Z</time></trkpt>
|
61
|
+
<trkpt lat="37.7985917" lon="-122.2609508"><ele>7.7</ele><time>2014-10-18T15:49:54Z</time></trkpt>
|
62
|
+
<trkpt lat="37.7986852" lon="-122.2610896"><ele>8.2</ele><time>2014-10-18T15:49:58Z</time></trkpt>
|
63
|
+
<trkpt lat="37.7987774" lon="-122.2612192"><ele>8.3</ele><time>2014-10-18T15:50:02Z</time></trkpt>
|
64
|
+
<trkpt lat="37.7988794" lon="-122.2613378"><ele>6.9</ele><time>2014-10-18T15:50:06Z</time></trkpt>
|
65
|
+
<trkpt lat="37.7990081" lon="-122.2614525"><ele>5.2</ele><time>2014-10-18T15:50:11Z</time></trkpt>
|
66
|
+
<trkpt lat="37.7991222" lon="-122.2615519"><ele>3.9</ele><time>2014-10-18T15:50:15Z</time></trkpt>
|
67
|
+
<trkpt lat="37.7992586" lon="-122.2616581"><ele>3.1</ele><time>2014-10-18T15:50:20Z</time></trkpt>
|
68
|
+
<trkpt lat="37.7994229" lon="-122.2616489"><ele>3.8</ele><time>2014-10-18T15:50:25Z</time></trkpt>
|
69
|
+
<trkpt lat="37.7995552" lon="-122.2616866"><ele>4.3</ele><time>2014-10-18T15:50:29Z</time></trkpt>
|
70
|
+
<trkpt lat="37.7996923" lon="-122.2617149"><ele>4.8</ele><time>2014-10-18T15:50:33Z</time></trkpt>
|
71
|
+
<trkpt lat="37.7998416" lon="-122.2617365"><ele>5.5</ele><time>2014-10-18T15:50:38Z</time></trkpt>
|
72
|
+
<trkpt lat="37.7999792" lon="-122.2617902"><ele>6.0</ele><time>2014-10-18T15:50:42Z</time></trkpt>
|
73
|
+
<trkpt lat="37.8001161" lon="-122.2618651"><ele>6.8</ele><time>2014-10-18T15:50:46Z</time></trkpt>
|
74
|
+
<trkpt lat="37.8002579" lon="-122.2619026"><ele>8.2</ele><time>2014-10-18T15:50:50Z</time></trkpt>
|
75
|
+
<trkpt lat="37.8004059" lon="-122.2619810"><ele>10.1</ele><time>2014-10-18T15:50:55Z</time></trkpt>
|
76
|
+
<trkpt lat="37.8005384" lon="-122.2620431"><ele>10.4</ele><time>2014-10-18T15:50:59Z</time></trkpt>
|
77
|
+
<trkpt lat="37.8006993" lon="-122.2620845"><ele>9.4</ele><time>2014-10-18T15:51:04Z</time></trkpt>
|
78
|
+
<trkpt lat="37.8008532" lon="-122.2621509"><ele>8.5</ele><time>2014-10-18T15:51:09Z</time></trkpt>
|
79
|
+
<trkpt lat="37.8009551" lon="-122.2622648"><ele>8.0</ele><time>2014-10-18T15:51:12Z</time></trkpt>
|
80
|
+
<trkpt lat="37.8010773" lon="-122.2623890"><ele>9.2</ele><time>2014-10-18T15:51:18Z</time></trkpt>
|
81
|
+
<trkpt lat="37.8011463" lon="-122.2625569"><ele>10.7</ele><time>2014-10-18T15:51:23Z</time></trkpt>
|
82
|
+
<trkpt lat="37.8012191" lon="-122.2626771"><ele>11.9</ele><time>2014-10-18T15:51:27Z</time></trkpt>
|
83
|
+
<trkpt lat="37.8013675" lon="-122.2626508"><ele>12.0</ele><time>2014-10-18T15:51:32Z</time></trkpt>
|
84
|
+
<trkpt lat="37.8015066" lon="-122.2625657"><ele>11.3</ele><time>2014-10-18T15:51:37Z</time></trkpt>
|
85
|
+
<trkpt lat="37.8016413" lon="-122.2624621"><ele>10.6</ele><time>2014-10-18T15:51:42Z</time></trkpt>
|
86
|
+
<trkpt lat="37.8017450" lon="-122.2623375"><ele>10.3</ele><time>2014-10-18T15:51:47Z</time></trkpt>
|
87
|
+
<trkpt lat="37.8017464" lon="-122.2622706"><ele>10.3</ele><time>2014-10-18T15:51:49Z</time></trkpt>
|
88
|
+
</trkseg>
|
89
|
+
</trk>
|
90
|
+
<extensions>
|
91
|
+
<abvio:xmlVersion>1</abvio:xmlVersion>
|
92
|
+
<abvio:appInstanceID>5e3ba2f14c227d4b</abvio:appInstanceID>
|
93
|
+
<abvio:runID>509</abvio:runID>
|
94
|
+
<abvio:routeID>9</abvio:routeID>
|
95
|
+
<abvio:routeName><![CDATA[School to Sky]]></abvio:routeName>
|
96
|
+
<abvio:activityName><![CDATA[Run]]></abvio:activityName>
|
97
|
+
<abvio:activityTypeID>0</abvio:activityTypeID>
|
98
|
+
<abvio:activitySpeedBased>0</abvio:activitySpeedBased>
|
99
|
+
<abvio:startTime>2014-10-18 15:47:25.274</abvio:startTime>
|
100
|
+
<abvio:startTimeZone>America/Los_Angeles</abvio:startTimeZone>
|
101
|
+
<abvio:runTime>264.211</abvio:runTime>
|
102
|
+
<abvio:stoppedTime>0.000</abvio:stoppedTime>
|
103
|
+
<abvio:badGPSTime>0.000</abvio:badGPSTime>
|
104
|
+
<abvio:distance>958.4</abvio:distance>
|
105
|
+
<abvio:ascent>0.0</abvio:ascent>
|
106
|
+
<abvio:descent>0.0</abvio:descent>
|
107
|
+
<abvio:calories>64.694</abvio:calories>
|
108
|
+
<abvio:maxSpeed>3.9</abvio:maxSpeed>
|
109
|
+
<abvio:minPace>0.257</abvio:minPace>
|
110
|
+
<abvio:avgHeartRate>0</abvio:avgHeartRate>
|
111
|
+
<abvio:maxHeartRate>0</abvio:maxHeartRate>
|
112
|
+
<abvio:avgWheelRPM>0</abvio:avgWheelRPM>
|
113
|
+
<abvio:maxWheelRPM>0</abvio:maxWheelRPM>
|
114
|
+
<abvio:avgCrankRPM>-1</abvio:avgCrankRPM>
|
115
|
+
<abvio:maxCrankRPM>-1</abvio:maxCrankRPM>
|
116
|
+
<abvio:avgPower>-1</abvio:avgPower>
|
117
|
+
<abvio:maxPower>-1</abvio:maxPower>
|
118
|
+
<abvio:thresholdPower>0</abvio:thresholdPower>
|
119
|
+
<abvio:adjustedPower>-1</abvio:adjustedPower>
|
120
|
+
<abvio:powerIntensity>-1.000</abvio:powerIntensity>
|
121
|
+
<abvio:powerScore>-1</abvio:powerScore>
|
122
|
+
<abvio:peakPower20Sec>-1</abvio:peakPower20Sec>
|
123
|
+
<abvio:peakPower1Min>-1</abvio:peakPower1Min>
|
124
|
+
<abvio:peakPower5Min>-1</abvio:peakPower5Min>
|
125
|
+
<abvio:peakPower10Min>-1</abvio:peakPower10Min>
|
126
|
+
<abvio:peakPower20Min>-1</abvio:peakPower20Min>
|
127
|
+
<abvio:peakPower1Hr>-1</abvio:peakPower1Hr>
|
128
|
+
<abvio:weight>63.5</abvio:weight>
|
129
|
+
<abvio:age>28</abvio:age>
|
130
|
+
<abvio:genderMale>1</abvio:genderMale>
|
131
|
+
<abvio:vo2Max>0.0</abvio:vo2Max>
|
132
|
+
<abvio:wheelSize>0.00</abvio:wheelSize>
|
133
|
+
<abvio:official>0</abvio:official>
|
134
|
+
<abvio:runEditFlags>0</abvio:runEditFlags>
|
135
|
+
<abvio:dontLoadRunData>0</abvio:dontLoadRunData>
|
136
|
+
<abvio:batteryUsage>0.01</abvio:batteryUsage>
|
137
|
+
<abvio:pathOnly>0</abvio:pathOnly>
|
138
|
+
<abvio:competitorInitials><![CDATA[AH]]></abvio:competitorInitials>
|
139
|
+
<abvio:stopDetection>0</abvio:stopDetection>
|
140
|
+
<abvio:caloriesUseElevation>1</abvio:caloriesUseElevation>
|
141
|
+
<abvio:notes><![CDATA[]]></abvio:notes>
|
142
|
+
<abvio:coordinateHasSpeed>1</abvio:coordinateHasSpeed>
|
143
|
+
<abvio:altitudeHasDistanceDelta>0</abvio:altitudeHasDistanceDelta>
|
144
|
+
<abvio:altitudeHasClimbSpeed>1</abvio:altitudeHasClimbSpeed>
|
145
|
+
<abvio:altitudeHasLongAltitude>1</abvio:altitudeHasLongAltitude>
|
146
|
+
<abvio:useIndoors>0</abvio:useIndoors>
|
147
|
+
<abvio:bikeID>0</abvio:bikeID>
|
148
|
+
<abvio:shoesID>10</abvio:shoesID>
|
149
|
+
<abvio:shoesName><![CDATA[Altra Lone Peak]]></abvio:shoesName>
|
150
|
+
<abvio:useSteps>0</abvio:useSteps>
|
151
|
+
<abvio:useStepDistance>0</abvio:useStepDistance>
|
152
|
+
<abvio:stepLength>-1.000</abvio:stepLength>
|
153
|
+
<abvio:steps>-1</abvio:steps>
|
154
|
+
<abvio:grossSteps>0</abvio:grossSteps>
|
155
|
+
<abvio:maxStepsPM>-1</abvio:maxStepsPM>
|
156
|
+
<abvio:avgStepsPM>-1</abvio:avgStepsPM>
|
157
|
+
<abvio:minTemperature>-200.0</abvio:minTemperature>
|
158
|
+
<abvio:avgTemperature>-200.0</abvio:avgTemperature>
|
159
|
+
<abvio:maxTemperature>-200.0</abvio:maxTemperature>
|
160
|
+
<abvio:runStateTable>
|
161
|
+
0.000,1,0
|
162
|
+
264.211,2,0
|
163
|
+
</abvio:runStateTable>
|
164
|
+
<abvio:stopDetectionTable>
|
165
|
+
0.000,0
|
166
|
+
264.211,1
|
167
|
+
</abvio:stopDetectionTable>
|
168
|
+
<abvio:coordinateTable>
|
169
|
+
0.571,37.7985474,-122.2554386,0.0,3.7,3.7
|
170
|
+
2.511,37.7985583,-122.2554564,2.0,3.7,3.7
|
171
|
+
6.827,37.7986548,-122.2555806,15.3,3.7,3.7
|
172
|
+
11.868,37.7988059,-122.2556700,18.5,3.7,3.7
|
173
|
+
16.866,37.7989396,-122.2557522,16.5,3.7,3.7
|
174
|
+
21.840,37.7989117,-122.2559577,18.4,3.7,3.7
|
175
|
+
26.895,37.7988901,-122.2561352,15.8,3.7,3.7
|
176
|
+
31.970,37.7988448,-122.2563392,18.6,3.7,3.7
|
177
|
+
34.899,37.7988119,-122.2565099,15.5,3.7,3.7
|
178
|
+
37.883,37.7987737,-122.2566810,15.7,3.7,3.7
|
179
|
+
41.840,37.7987290,-122.2568695,17.3,3.7,3.7
|
180
|
+
47.974,37.7986297,-122.2570615,20.2,3.7,3.7
|
181
|
+
52.876,37.7985334,-122.2572004,16.2,3.7,3.7
|
182
|
+
55.859,37.7985125,-122.2573141,10.3,3.7,3.7
|
183
|
+
61.252,37.7986091,-122.2574690,17.3,3.7,3.7
|
184
|
+
64.835,37.7985833,-122.2576368,15.1,3.8,3.7
|
185
|
+
68.929,37.7984881,-122.2577751,16.1,3.8,3.7
|
186
|
+
72.830,37.7984214,-122.2579271,15.3,3.8,3.7
|
187
|
+
76.953,37.7983721,-122.2580909,15.4,3.8,3.7
|
188
|
+
80.831,37.7983425,-122.2582586,15.1,3.8,3.7
|
189
|
+
84.961,37.7983173,-122.2584266,15.1,3.8,3.7
|
190
|
+
89.969,37.7983572,-122.2586205,17.6,3.9,3.7
|
191
|
+
94.822,37.7983800,-122.2588054,16.5,3.8,3.7
|
192
|
+
99.901,37.7983874,-122.2590119,18.2,3.7,3.7
|
193
|
+
104.886,37.7983726,-122.2591700,14.0,3.6,3.7
|
194
|
+
108.824,37.7983278,-122.2593052,12.9,3.6,3.7
|
195
|
+
112.854,37.7983504,-122.2594807,15.7,3.6,3.7
|
196
|
+
117.834,37.7983399,-122.2596825,17.8,3.6,3.7
|
197
|
+
119.852,37.7982995,-122.2597253,5.9,3.6,3.7
|
198
|
+
124.888,37.7983299,-122.2599319,18.5,3.6,3.7
|
199
|
+
128.850,37.7983670,-122.2601058,15.9,3.6,3.7
|
200
|
+
132.842,37.7983998,-122.2602840,16.1,3.6,3.7
|
201
|
+
136.837,37.7984335,-122.2604557,15.6,3.6,3.7
|
202
|
+
140.838,37.7984804,-122.2606221,15.5,3.6,3.7
|
203
|
+
144.926,37.7985273,-122.2607930,15.9,3.6,3.7
|
204
|
+
148.823,37.7985917,-122.2609508,15.6,3.7,3.8
|
205
|
+
152.853,37.7986852,-122.2610896,16.0,3.7,3.8
|
206
|
+
156.838,37.7987774,-122.2612192,15.3,3.7,3.7
|
207
|
+
160.849,37.7988794,-122.2613378,15.4,3.8,3.7
|
208
|
+
165.826,37.7990081,-122.2614525,17.5,3.8,3.7
|
209
|
+
169.876,37.7991222,-122.2615519,15.4,3.8,3.7
|
210
|
+
174.882,37.7992586,-122.2616581,17.8,3.8,3.7
|
211
|
+
179.874,37.7994229,-122.2616489,18.3,3.8,3.7
|
212
|
+
183.837,37.7995552,-122.2616866,15.1,3.9,3.7
|
213
|
+
187.858,37.7996923,-122.2617149,15.4,3.9,3.7
|
214
|
+
192.850,37.7998416,-122.2617365,16.7,3.8,3.7
|
215
|
+
196.877,37.7999792,-122.2617902,16.0,3.8,3.7
|
216
|
+
200.980,37.8001161,-122.2618651,16.6,3.8,3.7
|
217
|
+
204.822,37.8002579,-122.2619026,16.1,3.8,3.7
|
218
|
+
209.842,37.8004059,-122.2619810,17.8,3.8,3.7
|
219
|
+
213.848,37.8005384,-122.2620431,15.7,3.8,3.8
|
220
|
+
219.143,37.8006993,-122.2620845,18.2,3.8,3.8
|
221
|
+
223.890,37.8008532,-122.2621509,18.1,3.8,3.8
|
222
|
+
226.837,37.8009551,-122.2622648,15.1,3.8,3.8
|
223
|
+
232.890,37.8010773,-122.2623890,17.4,3.8,3.8
|
224
|
+
238.101,37.8011463,-122.2625569,16.6,3.7,3.8
|
225
|
+
242.061,37.8012191,-122.2626771,13.3,3.7,3.8
|
226
|
+
247.026,37.8013675,-122.2626508,16.6,3.7,3.8
|
227
|
+
251.846,37.8015066,-122.2625657,17.2,3.7,3.7
|
228
|
+
257.069,37.8016413,-122.2624621,17.5,3.6,3.7
|
229
|
+
261.945,37.8017450,-122.2623375,15.9,3.6,3.7
|
230
|
+
263.843,37.8017464,-122.2622706,5.9,3.5,3.7
|
231
|
+
264.619,37.8017464,-122.2622706,0.0,3.5,3.7
|
232
|
+
</abvio:coordinateTable>
|
233
|
+
<abvio:altitudeTable>
|
234
|
+
0.571,7.9,0.0,0.000,7.9
|
235
|
+
121.841,4.2,0.0,-0.026,7.4
|
236
|
+
155.824,8.6,0.0,-0.002,7.1
|
237
|
+
172.829,2.9,0.0,-0.012,7.0
|
238
|
+
199.893,6.4,0.0,0.009,6.4
|
239
|
+
211.837,10.8,0.0,0.090,6.3
|
240
|
+
227.826,7.8,0.0,0.031,6.3
|
241
|
+
243.895,12.4,0.0,0.159,6.6
|
242
|
+
259.109,10.3,0.0,0.070,7.6
|
243
|
+
259.109,10.3,0.0,0.070,7.6
|
244
|
+
</abvio:altitudeTable>
|
245
|
+
</extensions>
|
246
|
+
</gpx>
|
data/lib/stressfactor.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require "gpx"
|
2
|
+
require "stressfactor/interval"
|
3
|
+
require "stressfactor/gpx_loader"
|
4
|
+
require "stressfactor/stress_calculator"
|
5
|
+
require "stressfactor/average_pace_accumulator"
|
6
|
+
require "stressfactor/pace_calculator"
|
7
|
+
require "stressfactor/pace_strategy"
|
8
|
+
require "stressfactor/grade_adjusted_pace_strategy"
|
9
|
+
require "stressfactor/raw_pace_strategy"
|
10
|
+
require "stressfactor/version"
|
11
|
+
|
12
|
+
module Stressfactor
|
13
|
+
# Your code goes here...
|
14
|
+
end
|