Peak Horizon is a Garmin watch app. You hold the watch up like a camera and it draws the ridges in front of you from real terrain, layered by distance, with the skyline in bold. The summit under the crosshair gets its name, height, distance and bearing: Matterhorn, 4478 m, 9.8 km, 243° WSW. It also draws water, glaciers and the sun and moon paths.
It went on the Connect IQ Store on 3 November 2026. It runs on 102 wrist models, plus Edge bike computers and Garmin handhelds.
The whole planet, in tiles
The terrain is Copernicus DEM GLO-90, an elevation model of the whole planet. A build streams about 130 GB of it into tiles at two levels of detail: a finer one for nearby terrain and a coarser one out to 50 km.
When cells are merged, each keeps the maximum height of what it covers, not the average. An averaged mountain range is lower than the real one, and the skyline is made of exactly the highest points. The whole world fits within R2’s free tier, and the Worker reads only the small piece it needs.
Peaks come from OpenStreetMap, and deciding which to keep was harder than it sounds. OSM rarely records a peak’s prominence, so the build computes isolation instead: the distance to the nearest higher peak. Cutting by height first dropped low but isolated summits in dense ranges, the ones people actually name from a valley.
The geometry
For each direction, the Worker walks outward from you and keeps the points that rise above everything nearer, corrected for the Earth’s curve and for your eye height. It stops early once nothing further out could show, so a panorama takes a few milliseconds on a warm Worker.
The data does shave off sharp summits. A pointed summit comes out as a rounded top 50 to 150 m below its real height, even with the maximum kept. The watch app draws labels at OSM’s true height, so a name sits where the summit really is even when the drawn terrain falls short.
Cloudflare, briefly
One Worker serves the API and the website. It uses R2 for all the map data and D1 for the short-lived codes that let you pick an offline area on your phone. There’s nothing per-user to keep: the watch sends its position, gets a panorama back, and the position never goes into a database.
CPU time is the number I watch. A cold request goes over the free plan’s limit, so cold requests may need the paid plan under load.
The compass turned the wrong way
On a Garmin, I fuse the raw magnetometer and accelerometer by hand. Garmin’s own heading is the reference: while you hold the watch near level, the app learns the offset between the two. That one offset also absorbs local declination and any constant sensor bias, so the app needs no declination table.
Then, on a real Forerunner 170, turning right moved the view left. Its magnetometer is mirrored against its accelerometer. I added an automatic mirror check, and it flipped the FR170 back the wrong way and remembered that. I removed it. There’s now a Flip left / right setting and a small trim, which is less clever and can’t get it wrong on its own.
Offline areas make the watch do the terrain work itself, from downloaded tiles. Why it downloads terrain rather than precomputed panoramas is in the 16 KB note.
In numbers
| Terrain streamed in by the build | ≈ 130 GB |
| Panorama size | 10.8 KB |
| Ray march on the Worker, cold / warm | ≈ 16 ms / 3–4 ms |
| Watch models | 102 wrist, plus Edge and handhelds |