Computational Geometry of Ski Run Turns, Part 1

The Ski+ app features a unique ability to count the number of turns you take on a ski run, as well as calculate keys statistics of the turns including average turn radius, and average turn G-Force. This is accomplished through the astute application of computational geometry.

Carving first tracks in the champagne pow

Consider the geometry of a skiers’ path down a slope: the path consists of a series of straight lines, connected by curves, or turns. While the skier is skiing straight, there will be no change in their direction, or course, over consecutive GPS points. When the skier begins to turn their direction, or course, will change between consecutive GPS points. In the language of calculus, the first derivative of the skiers’ path will be non-zero when they are turning.

Ski run path geometry

When a skier turns to the right, their course change will have a positive value greater than zero. So, if a skier was skiing due north with a course of 0°, and began turning right, the course would change to a larger value, for example 45°. Left hand turns will have a course change with a negative value less than zero. Starting out with a heading of 45°, the course for a skier turning left would decrease to a smaller value, for example 0°. Algorithmically detecting turns becomes straightforward: you simply find each point where the skier’s course changes from a positive to a negative value. Computationally this process is one of finding the zero crossings in the course change data.

Ski run path course change

Each turn has two zero crossings in the course change data - a zero crossing as the skier begins to turn, and a zero crossing as the skier ends the turn and continues straight forward in the new direction. If a skier is making perfect S-turns down a mountain with no straight sections between turns, two zero crossing still define each turn. As a practical matter, you might want to filter out very small changes in direction so that you count only turns, and don’t count small wobbles, or even errors in the GPS data.

Ski run path course change zero crossings

Now, one might think it would be possible to use a magnetometer or compass to determine a skiers heading or course. The problem is with a compass attached to a skier - for example a smart watch worn on the skiers wrist with an internal magnetometer - each time the skier moved their arm, the reading from the compass would change, even if their direction of travel has not changed. This could happen each time the skier changes the position of their ski poles to initiate a turn. By using GPS data, Ski+ avoids this problem and provides an extremely accurate count of your turns for each ski run.

Previous
Previous

Computational Geometry of Ski Run Turns, Part 2

Next
Next

Sweet little lies my GPS told me