Parses gpx into json for data processing, for..................reasons.
Note: Version 2.0
no longer takes a file as an input. It takes an XML string instead
const fs = require('fs');
const parseGpx = require('parse-gpx');
let gpxContent = fs.readFileSync('./path/to/some.gpx');
parseGpx(file).then(track => {
console.log(track.totalDistance()); //8824.24 (metres)
/*
{
latitude: string
longitude: string
timestamp: string
elevation: number
cadence: number
heartrate: number
distanceFromPoint: (trackPoint) => number (distance in metres)
}
*/
console.log(track.trackPoints[0]);
});
npm test
npm run coverage
do wutever u want whenever u want