Fără Descriere

Florian a84e8722bb Initial commit 1 an în urmă
.gitignore a84e8722bb Initial commit 1 an în urmă
README.md a84e8722bb Initial commit 1 an în urmă
main.js a84e8722bb Initial commit 1 an în urmă
package-lock.json a84e8722bb Initial commit 1 an în urmă
package.json a84e8722bb Initial commit 1 an în urmă

README.md

PhoneTrackGPXFix

A nodejs app that puts in time order gps points exported from PhoneTrack in NextCloud so that they can be correctly imported in JOSM.

Disclaimer: This project has been done in an hour or so. So please expect bugs, dirty code and odd behaviour that look more like a one-hour side-project. Also this has only been tested on Windows.

How to install

Download nodejs and git.

Open your favorite shell and execute (windows or linux):

git clone https://floriananaya.pro/git/florian/PhoneTrackGPXFix
cd PhoneTrackGPXFix
npm install

How to use

The only command is

node main.js <FilePath>

Example

node main.js C:\Users\Florian\Downloads\florian1.gpx

Expected output:

C:\Users\Florian\Downloads\PhoneTrackGPXFix>node main.js C:\Users\Florian\Downloads\florian1.gpx
Started PhoneTrack GPX file fixer
Reading file located at "C:\Users\Florian\Downloads\florian1.gpx"...
File has been read, loading XML...
XML has been loaded, reading PhoneTrack data...
Loading track "ONEPLUSA5000" with 157457 points
Done loading track "ONEPLUSA5000"
Loading track "OPPO" with 27814 points
Done loading track "OPPO"
Sorting all points...
Sorting points...
Done reading and sorting track "ONEPLUSA5000"
Sorting points...
Done reading and sorting track "OPPO"
Done sorting all points
Updating XML...
Done updating XML
Writing to new file "C:\Users\Florian\Downloads\florian1.gpx2"
Data written to file
Done in 6.121 sec

The given file stays untouched, a new file will be created that has the same name as the given file with a "2" added at the end of the file (example: "export.gpx" will be renamed to "export.gpx2")