Posts tagged ‘warning’

I recently developed a little tool, which was able to add ascent alerts to your garmin tcx course file. It was ok to use, but had still some issues and I had to choose some settings every time I wanted to patch one of my training files.

So I upgraded my tool by keeping some gauss filtering and mainly adding the Douglas-Peucker algorithm for more reliable results.

I’m now quite happy and it’s even faster and easier to use. You can try the tool with any tcx garmin course file.

Go to the tcx extender

example of elevation map

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!

When cycling with my Garmin Edge 705 I usually plan my trip on gpsies and download a TCX file which I can upload to my device.
I then only have to follow the path on the screen. No more map reading and beeing lost. There is even an elevation map on the device, but you never see exactly how many meters you have to climb and how long it will last.
So I tried to create a tool which extends the TCX file by adding warning points before the hill and on top of the hill. You’ll get warned with a message telling how many meters it will approximately go up and how far it’ll be to reach the top.

I did use some xml parsing and mainly gaussfiltering. I’m not happy overall, as the results do vary depending on the input.
You might us the tool at your own risk.