TrailBuffer help and about
1. What it is
TrailBuffer is an information tool for timed hikes and long-distance walking events with cutoffs. During the hike it shows two things: the time buffer (how far ahead of or behind the cutoff you are) and a km/h pace target (the pace at which you still reach the next checkpoint in time). The calculations run on your phone, also without an internet connection, and the map regions you downloaded also show offline.
The tool calculates from the progress it observes and from the terrain profile of the route. It does not replace your own judgment, the organiser's rules or knowing the route: always check the cutoffs and the conditions of the event against the organiser's instructions.
2. How to use it, in short
- Route: load the GPX file of the hike, or pick the built-in example route to try the app. If the file contains cutoffs, they count as "unverified" until you confirm them against the organiser's instructions.
- Time limit: enter the total time limit as hours:minutes. Without a limit there is no buffer number: only the expected arrival and the time left are shown.
- Start time: enter when the hike starts. The daylight and night parts of the route are worked out from it.
- Start and the pre-start check: tracking only works with the screen on. The check tries keeping the screen awake and plays a voice test. A failed item does not block the start, but while it stands, do not rely on the display.
- Screen off or locked: the web app gets no position then, so the number does not update and there is no voice (pace, missed cutoff, off-track, reached point), and the track has a gap. The clock of the time limit keeps running meanwhile. When you come back after a gap longer than 1 minute, the app says: "The tracking stopped for X minutes". Until a new GPS fix arrives, the number is grey and shows the age of the data next to it. A checkpoint you passed meanwhile counts as reached, without a sound.
- Advice for the pocket: keep the screen on, also when the phone is in your pocket. If the number is grey after you open the app, do not decide on it: wait for a fresh, not grey buffer. If keeping the screen awake fails, an error bar appears and a sound plays; if the screen then switches off, tracking and voice stop.
- Battery saver: it switches to the dark theme and computes less often, but the screen stays awake and the tracking continues. It is not the same as switching the screen off.
- Reading the buffer: a positive value is how far ahead of the cutoff you reach the finish, a negative one is how late you are. Always compare the number with your own judgment and the organiser's instructions.
- Reading the km/h target: it is the pace at which the rest of the route (slopes included) still fits into the time left. If the required pace is more than 1.15 times the observed one, the display says the target cannot be held at that pace.
- What
--and a grey number mean:--means there is no number to show: no time limit or checkpoint the buffer could belong to, or the location permission is missing or not yet answered. When there has been no new GPS fix for a minute (stale data), or no fix has arrived yet, or you are off the route, the number is grey and its age shows next to it (for example "No GPS for 3 min"). A grey number is not a fresh value. Neither--nor a grey number is good news or zero: do not rely on the displayed value then. - Offline region: in the Offline Regions window you can download a region of the map so it shows without a signal. Downloading needs an internet connection. When a newer map release exists, the region shows an "Update available" note; the downloaded package stays usable until the new one has finished downloading.
- Installing: from the browser menu or the Install button of the app you can add it as an app that starts from the home screen; it then opens without the browser bar. The same steps apply after installing.
3. The models
The models below calculate the buffer and the pace target. The numbers are the ones the app uses. They are models: they describe the progress of an average walker, not yours, so the displayed value is an estimate.
1. Tobler's hiking function
Here is the slope (rise divided by the horizontal distance), which the app limits to , and is the pace on level ground in km/h. The function is fastest on a gentle downhill and gets slower in both directions as the terrain gets steeper.
2. Slowdown along the route
The app scales the time of a segment by the factor , where is the share of the route at the middle of the segment (0 is the start, 1 the finish) and defaults to 0.08. is a model parameter for the slowdown along the route, not a measure of the walker's condition. The result does not depend on how densely the GPX is sampled.
3. Time buffer
Here is the time limit, the time gone, and the modelled time of the rest of the route including the planned rests. With no time limit the buffer is unknown: the display shows --, not a number and not a green colour. The app finds the pace target so that the time left is just enough for the rest of the route, terrain included.
4. Adaptive Kalman filter
The state is , bounded to:
The filter learns from windows of about 250 m with noise scaled by the window length, rejects input that is not finite, and shows when a bound is reached. The observation is the window time predicted by the Tobler model with the night and terrain multipliers of the window's own segments. From the measured progress the Kalman filter gradually adjusts and .
5. Solar and night pace
The app computes the sun's elevation offline (Meeus, NOAA): , where is the sun's elevation above the horizon, the latitude, the declination of the sun and the hour angle. The night multiplier is below, and it always applies:
| Phase | Multiplier |
|---|---|
| Day (sun above the horizon) | 1.00 |
| Twilight (sun between 0° and −6°) | 0.90 |
| Night | 0.82 |
| Night, downhill on a slope steeper than 10 % | 0.75 |
6. Manual terrain condition
You state the terrain condition at the start line; the app calls no weather service. Unset means "no mud".
| Terrain condition | Multiplier |
|---|---|
| No mud, dry | 1.00 |
| Wet | 0.95 |
| Muddy | 0.89 |
| Boggy | 0.84 |
The effects together give the effective speed:
7. Route matching
The app projects a GPS position onto the route with the Haversine formula and cross-track distance: , where is the radius of the Earth. The match may move only inside the window in which the walker can actually have progressed, and a jump is accepted only after confirmation, so a loop route or a parallel path cannot teleport the position.