Course point warnings on your tcx file

As I mentioned earlier, I implemented a tool which extends your TCX course file for your garmin device (e.g. EDGE 705) by adding warning points when a hill is about to come on your trail. It’ll tell you how long and how heigh the coming ascent will be.

I started with a (preliminary) first version and then tried to do a better job afterwards by integrating the lessons learned earlier. Release often and early :-) .

I did use less gauss filtering on the elevation curve. Just enough to filter away the noise but keep as much information of the original curve as possible. The strength of the filter is now dynamically changed depending on the amount of points given.

I do check the inclination to find out where the hill begins. If the curve goes up for more than 3% the start point will be set. 3% usually means you’ll start to think “oh it’s going up, isn’t it?” while you’re on the bicycle.

As soon as a part of the curve shows a negative grade I assume we reached the top of the hill.

I now have a list of possible hills (candidates). I group several hills following closely to each other, to one big hill. This threshold can be defined in the form. I made good experiences with values between 1000-2000m (which means that if a hill starts before 1000m after the top of the last one, it is added to the previous hill).
If left empty, the code will try to find out the optimum between 1000-2000m depending on the total distance.

In addition I remove the remaining low hills. The threshold can also be set, default value is 30m. So there won’t be an alert on hills going up less than 30m in altitude.

At the end I produce an image or a xml file. The xml file represents the TCX course file extended with the warning points.

That’s about it. I’m much more happy with the results now and think I’ll be able to use the tool in the near coming cycling trips!