- Reads the
GPX fileof stored waypoints data, processes it and ingests the data to theElasticsearchindex. - If there are gaps in the waypoints sequence, the sequence can be corrected
with using a reference
GPX filethat would fill the gaps. - Also
untrackedtrips can be ingested if thestartdatetime andenddatetime are known. - The script can be run without ingesting the data to the
Elasticsearchindex, which would then only provide aggregated information of the trip. - If the data are ingested to the
Elasticsearchindex then the trip trajectory can be visualized in theKibanamaps visualization. - Automatic detection of inactivity, i.e. no movement
driven- trip type of a trip that was tracked by an application that provides theGPX filewith these data:latitude,longitude,elevationandtimestampuntracked- trip type of a trip that was not tracked by the application but was executed by the user and the user providedstartof the trip andendof the trip datetime timestamps. The user created theGPX fileafter the trip. TheGPX filecontains these data:latitude,longitude,elevationplanned- trip type of a trip that has not been yet executed, the user only has planned the trip. TheGPX filecontains these data:latitude,longitude,elevation
- The
virtualenvis installed - Supported for Python 3, developed and tested with Python 3.7.4
1.Create virtual environment
python -m venv .venv
.venv/Scripts/activate
pip install -r reqs.txt
2.Setup Elasticsearch
Please refer to the official sites of Elasticsearch and Kibana for installation
and index creation guides.
usage: trip_tracker.py [-h] --mode MODE --gpx-file GPX_FILE
[--ref-file REF_FILE] [--index INDEX] [--start START]
[--end END]
optional arguments:
-h, --help show this help message and exit
--mode MODE Mean of transport, bike, run or walk
--gpx-file GPX_FILE path to the file to be processed
--ref-file REF_FILE path to the reference file to be used for correction
--index INDEX elasticsearch index to be used for data storage, if None, no indexing will happen
--start START Isoformat time of a trip start, set it for untracked trips, None for tracked or planned trips
--end END Isoformat time of a trip end, set it for untracked trips, None for tracked or planned trips