runnr-workout
v0.0.3
Published
Javascript models for running workouts (Route, Efforts and Races)
Downloads
5
Readme
Javascript models for running workouts (Route, Efforts and Races). It can be used on browser via browserify.
Routes
Built from list of latitude and longitude points
var src = geojson.features[0].geometry.coordinates;
var route = Route.fromGeoJSON(geojson);
Effort
Built from a list of timestamp latitude and longitude points or by pace and distance
var pacemakerEffort = Effort.fromPace(5, 'minkm', route.distance(), 1);
var gpsEffort = Effort.fromGPS(gpsData, "dummy");
Race
Aggregate a route with efforts
var race = new Race(route);
race.addEffort(pacemakerEffort);
race.addEffort(gpsEffort);
For more examples on the available API, see the test specs.