In the US, 40+ people die every year skiing, many getting lost or being caught in avalanches.
What it does
skii.tech is an augmented reality heads-up display system for improving the alpine skiing experience. Its main feature is Google Maps-style navigation but tailored to skiing.
How we built it
All our logic is based on open data from (www.opensnowmap.org) which has trail data for the entire world.
The client is an iOS app built with ARKit.
The pathfinding algorithm is written in C++.
It is supported by Node.js Google Cloud Functions which track a user's position and provide up-to-date avalanche warnings. A Pub/Sub Cloud Scheduler runs daily to scrape (avalanche.ca) for danger forecasts. The Avalanche Canada API is not made for public consumption, so we had to deal with some strange datatypes (like "Likely-Possible", "Possible - Likely", and "Possible-Likely" appearing as functionally identical values for one field).
Challenges we ran into
Unfortunately, Earth isn't flat. The fact that coordinates describe a point on an oblate spheroid complicates the math required to do even the simplest tasks by a lot. In fact, datasets can't even agree on how oblate the spheroid is. Some data (like the Whistler contour map) provided coordinates as northing/easting against an arbitrary datum while others used decimal degree coordinates.
We also encountered problems with finding altitude data to match with the trail data. First, we tried using contour data from Whistler's open data project, however the 37 million points that draw 1m contours around Whistler-Blackcomb proved to be too hard to manipulate. Simple operations, like flattening a nested list, took minutes. Although it is theoretically trivial to assign a contour to each point on a trail, the time it would have taken makes it very inefficient. We opted to instead use Google Maps' Altitude API to get data, which could return thousands of points in less time it took to load the contours into memory.
Finally, we had trouble creating the algorithm that would generate all possible paths from A to B on the trails (as a directed graph). It's an unusual graph theory problem that required thinking outside the classical pathfinding box to solve.
Oh, and Domain.com wouldn't let us use the domain after registering because they wanted photo ID.
Accomplishments that we're proud of
What we learned
We learned a lot about the importance of data representation standards and consistent datatypes in open data. Open data is rather useless without connectivity between datasets, and the differing standards for geolocations provided a unique opportunity for us to learn about how cartographers describe the world.
What's next for skii.tech
Bucket list items:
- expand avalanche data beyond Western Canada by finding more scrapeable data
- implement trail data beyond Whistler-Blackcomb (we have it, just didn't implement)