mirror of
https://github.com/dedicatedcode/reitti.git
synced 2026-01-09 17:37:57 -05:00
GPX Sender Tool
A CLI utility to send GPX track data to a Reitti instance via the Owntracks ingest API.
Building
cd docs/tools/gpx-sender
mvn clean package
Usage
java -jar target/gpx-sender-1.0.0.jar <gpx-file> --url <reitti-url> --token <api-token> [--interval <seconds>]
Parameters
gpx-file: Path to the GPX file containing track points (positional parameter)--url: Base URL of the Reitti instance (e.g.,http://localhost:8080)--token: API token for authentication--interval: Optional interval between sending points (default: 15 seconds)
Example
java -jar target/gpx-sender-1.0.0.jar my-track.gpx --url http://localhost:8080 --token your-api-token --interval 10
How it works
- Parses the GPX file to extract track points with coordinates and timestamps
- Starts sending from the current time, with each subsequent point sent at the specified interval
- Converts each point to Owntracks format and sends via HTTP POST to
/api/v1/ingest/owntracks - Waits the specified interval between each point transmission
Requirements
- Java 17 or higher
- Valid API token for the Reitti instance
- GPX file with track points