Ultra Tracker is a specialized tool designed for tracking a runner's progress through an ultramarathon. It is deployed in a containerized environment and powered by Flask and uWSGI. Additionally, it seamlessly integrates with CalTopo, providing comprehensive mapping capabilities to enhance the tracking experience.
docker
docker-compose
git
To get started with Ultra Tracker, follow these steps:
git clone https://github.com/aaron-iles/ultra_tracker.git
Place your cloned repo in /proj/ultra_tracker
on your hosting server.
Public
or URL
(recommened). Add the course route as a line and give it whatever name you wish. Add the aid stations as markers and name them how you would like. Lastly, add a marker for yourself that will act as the "tracker" and name it as you wish. (This will be changing in the future)./proj/ultra_tracker/application/race_config.yml
and populate it with the following:
race_name: My Race
start_time: '2024-04-06T07:00:00'
garmin_api_token: XXXXXXXX
caltopo_map_id: XXXXX
caltopo_credential_id: XXXXXXXXXXXX
caltopo_key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
tracker_marker_name: MyName
route_name: Route
aid_stations:
- name: 01 Aid Station
mile_mark: 7.6
- name: 02 Aid Station
mile_mark: 14.2
race_name
: This is the human-friendly name of the race/event. start_time
: This is the start time of the race. The format must be YYYY-mm-ddTHH:MM:SS
.garmin_api_token
: This is the token you created in step 3 above.caltopo_map_id
: The is the map ID of the map you created in step 2 above (see the URL of the map in your browser).caltopo_credential_id
: This is the tricky one to obtain. See the instructions down below on managing Caltopo credentials.caltopo_key
: This is the tricky one to obtain. See the instructions down below on managing Caltopo credentials.tracker_marker_name
: This is the literal name of the marker that represents the runner on the map. This was created in step 2 above.route_name
: The literal name of the line in Caltopo that represents the route.aid_stations
: This is a list of dictionaries representing the aid stations on the map. For each aid station you must have the name
and mile_mark
./proj/ultra_tracker
directory, start the application!
docker compose up
To use this application youst must be able to authenticate with Caltopo. All credit for this authentication method goes to https://sartopo-python.readthedocs.io/en/latest/credentials.html. To do this you need to determine these values:
This section only refers to your CalTopo account credentials which are not the same as your external account provider credentials (Google, Yahoo, MSN, Apple, etc.). This module does not need credentials for your external account provider.
Your CalTopo account may have multiple sets of credentials. These show up in the "Credentials" section at the bottom of the "Your Account" dialog.
To open the "Your Account" dialog, sign in to caltopo.com then click your login ID name, to the right of "Your Data" near the top right of the web interface. Don’t worry if no credentials are listed yet.
Each credential has a "credential ID" (the 12-character code shown in the Credentials table), and a "public key", which takes a bit more work to find.
Currently, the public key is most easily determined during the process of creating a new credential.
To create a new credential and to determine its credential ID and public key, follow these steps (based on the README at https://github.com/elliottshane/sme-sartopo-mapsrv):
finish-activate?code=........&name=......
code=
from that request. This is not the value to put in the configuration file; you will use it in the next step.caltopo.com/api/v1/activate?code=<code>
replacing <code>
with the 8-character code from the previous step.{
"code": "XXXXXXXXXXX",
"account": {
"id": "ABC123",
"type": "Feature",
"properties": {
"subscriptionExpires": 1554760038,
"subscriptionType": "pro-1",
"subscriptionRenew": true,
"subscriptionStatus": "active",
"title": "......@example",
"class": "UserAccount",
"updated": 1554760038,
"email": "......@example.com"
}
},
"key": "xXXXXxXXXXXXXXXxxxXXXXxXxXXXXXXXXXXXX="
}
caltopo_credential_id
in the race_config.yml
file. Enter the 44-character value of "key" as caltopo_key
in the configuration file.