analyze speed performance, extracts doppler speed information out of .gpx session files.
Features:
Install dependencies
pip3 install -r requirements.txt
Analyse a local gpx file
python3 src/core/gps_analysis.py -f author_filename.gpx
author_filename.gpx
is the gps session file that you want to analyse.
-f loop over several gpx files:
python3 src/core/gps_analysis.py -f file_1.gpx file_i.gpx ...
make sure that the different files have different author_... prefix
-rd loop recursively over all gpx files of a given directory and subdir:
python3 src/core/gps_analysis.py -rd directory_name
-p plot speed, distance and course (orientation) results
-c crunch data with matplotlib graphs. Use history results from csv_results/all_results.csv
and can be run without a gpx file
The results of all the gpx files are ranked and aggregated in the same ranking_results.csv
file (see output)
Install dependencies and run the server (Flask based):
pip3 install -r requirements.txt
pip3 install -r requirements_flask.txt
python3 src/core/flask_restplus_server.py
Go to http://127.0.0.1:9999/ to get the REST API documentation from Swagger:
2 endpoints are currently available:
/fetch_gpx_file/<path:file_url>
curl -X POST http://127.0.0.1:9999/gpsana/fetch_gpx_file/<file_url>?support=windsurf -H 'accept: application/json'
in the url text, use '%3A'
for ':'
and '%2F'
for '/'
/upload_gpx_file
curl -X POST http://localhost:9999/gpsana/upload_gpx_file?support=windsurf -H "accept: application/json" -F "file=@<file_path>"
Build image:
docker build -t gpsana_web .
run the image:
docker run -it --rm -p 8080:8080 gpsana_web
Access the server:
http://localhost:8080/
Analysis parameters can be modified in /config/config.yaml
file
The results to report are defined in the config.yaml
file and are fully parametrizable:
Leveraging pandas DataFrame:
plot and save results to csv files in csv_results/ directory:
debug.csv
: full DataFrame of the gpx file
=> deep debug only
=> erased after each gpx file processing (not for use with a list of gpx file to process)
filename_result_debug.csv
: DataFrame zoom on the high scores of the session
=> debug only (not for presentation)
filename_result.csv
: individual result summary for the submitted gpx file
=> sessions summary
all_time_results.csv
: swapping history file to record all time sessions history
=> program internal use (not for presentation)
=> updated at each run
ranking_results.csv
: all time sessions or users history with ranking
=> overall results presentation
=> erased at each run
execution.log
: full logging of the run with setlevel=INFO