Running Calculations
A project containing functions to analyse a runners training data (from a specific run).
Getting Started
These instructions will get you a copy of the project up and running in your projects.
Prerequisites
There are no prerequisites required for this project,
Installing
running-calculations can be used in both node.js and in the browser.
Install running-calculations using npm:
npm install running-calculations
Usage
Using Running Calculations is incredibly simple. Examples of every function in use can be seen below:
Types
Measurements
Enumeration of supported measurement types in this system
Possibilities
measurements.miles measurments.kilometres
Coordinates
Typically used for an array of coordinates. Each object will have a longitude (lng) and latitude (lat) point.
Example
;
Calculate Elevation
Converts elevation in metres to feet.
Example
; ; // Answer will be 3.2808
Calculate running speed from 2 coordinates
Returns speed (in metres per second) from 2 coordinate types
; ; ; ;
Calculate running efficiency factor
Returns an efficiency factor from a running pace (ideally a graded pace) and a heart rate value. For comparison reasons, this would ideally be used for runs on the same course and conditions (time, weather, etc).
NOTE: Speed value is in metres per second.
; ; ; ;
Convert distance from metres
Convert a distance in metres to either miles or kilometres
; ; ;
Calculate a running pace
Converts running pace from metres per second to minute/miles or minute/kilometres
; ; ;
Calculate a running pace to m/s
Converts running pace from minute/miles or minute/kilometres to metres per second
; ; ;
Using FTP calculate training zones.
Uses functional threshold pace to calculate training zones for a runner to train in.
; ; ;
Calculating percentage of VO2 MAX
Using the finish time for a race, calculate the % of VO2 Max. Calculation from the Jack Daniels Tables
; ; // 1:24:35 in seconds ; // 86.4 %
Calculating VDot score from a race performance
Using the finish time for a race, calculate the VDot score of the race. Calculation from the Jack Daniels Tables
; ; // 1:24:35 in seconds ; // 54.76 VDot Score
Calculating the training stress score of a run
Using funtional threshold pace, average pace (ideally a graded pace), and time (in seconds), calculate the training stress score of a run
; ; ; ; calculateTrainingStressScoreftp, ngp, time) // 133.8
Calculating the chronic training load of a runner
Calculate the chronic training load of a runner using their their previous runs TSS over a 42 day period.
; ; calculateChronicTrainingLoadtssData // 49.35
Calculating the acute training load of a runner
Calculate the acute training load of a runner using their their previous runs TSS over a 7 day period.
; ; calculateAcuteTrainingLoadtssData // 43.62
Calculating the training stress balance
Calculate the acute training load of a runner using their their previous runs TSS over a 7 day period.
; ; ; calculateTrainingStressBalancectl, atl) // 5.73
Calculating the chronic training load of a runner
Calculate the acute training load of a runner using their their previous runs TSS over a 7 day period.
; ; ; calculateIntensityFactorftp, ngp // 0.97
Running the tests
npm run test
Honourable mentions
The below greatly assisted in the research and authoring of the calculations provided in this package.
Contributing
To contribute on this project, please contact mattncott.
Authors
- Matthew Nethercott - Initial work - mattncott
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the LICENSE.md file for details