Tag Archives: software

Ski-Erg and rollerski geekery

16 May

It poured rain all day yesterday. Can’t complain, though, we’ve been having a drought. Still, that meant no fun for rollerskiing. So I went to the gym instead and worked out on the Ski-Erg. That machine simulates double-poling, which is one of the most used techniques in classic style cross-country. Skip to the end of the above video if you want to see it done right.

Working out medium hard, I maintained a 2:12 per 500km pace. That was slightly faster than the first guy in the video, the downhill skier with the crappy technique. That was over a 5km and 2km set. The second set was alternating slow-fast every minute. I could feel my abs burning at the end.

The other thing I did was re-analyze my last climbs up Grefsenkollen. This graph compares my pace between my May 12th and 13th workouts:

The most interesting thing to see is that my 13-5 Time (per kilometer) always stays even with or lower than my 12-5 Time. Particularly towards the end. That’s mainly because my speed got very erratic there on 12-5. That day, from km 6 onward, I dipped under 10km/h five times. At the same time I also had bigger upward spikes toward the end of that training. That’s what getting tired looks like: lots of slowing down followed by desperate, but not sustained, speeding up.

Time to the top (369 m) on 12-5 was 33:15 and 32:53 on 13-5.


Test-driven rollerskiing

20 Sep

Gave a programming course at NTNU last Thursday. The theme was test-driven software development, but the example I used was rollerski related. The example code takes as input the raw GPS data (latitude, longitude, elevation) collected by the RunKeeper iPhone application. From that data it calculates speed and spits it out in a form I can plot with MatLab’s free clone FreeMat:

The tricky part of the software is coming up with a filter to eliminate GPS bad reading “noise” and also smoothing out the speed plot out using the Ramer-Douglas-Peucker algorithm. The start of this was my desire to use more sophisticated tools to analyze my progress climbing Grefsenkollen.

I turned out to be a good example for the subject. Here’s my ppt slide deck, which should be cryptic since I try to limit my presentations to 50 printed words or less to avoid reading to my audience.

How I spent my day the wrong way

13 Sep

It was beautiful this afternoon. Should have rollerskied. Played around with FreeMat instead:

% speed.txt is data parsed from the .gpx xml
data = dlmread(‘speed.txt’); % open tab delimited file
elevation = data(:,3);
for i=1:length(elevation);
if elevation(i) > 255
speed = data(i:length(data),2);
speed = speed(speed ~=0); % dump any zeros
sigma = std(speed); % get standard deviation
speed(speed > sigma*4)=[]; % dump all too fast
speed(speed < sigma/4)=[]; % dump all too slow

Do you really want to know what this is? Speed data from the last time I climbed my big hill (Grefsenkollen).

I always start skiing hard once I get past a fork in the road at 255 meters elevation. So I pull the data from beyond that point into my sample. GPS units (perhaps particularly the iPhone) will collect bad data, so I then weed out the obviously wrong readings before drawing any conclusions. In the above code I use a crude statistical method for cleanup.

Here’s what the slope looks like (y-axis is elevation in meters, x is distance in kilometers) :

What says the oracle about the last time I was up this:

–> mean(speed)
ans =
–> max(speed)
ans =

These are my best numbers yet. But if I keep the nerdy stuff up, they won’t stay there.

Postscript: It doesn’t look good to publicly forget elementary school math. There’s obviously an easier, more reliable way of calculating average speed, wholly unaffected by junk GPS position data:

–> totalTime = 33.600- 24.833; %Time after the 255m mark in minutes
–> totalDistance = 6.73 – 5.046; %Distance after the 255m mark in km
–> timeCoeff = totalTime / 60;
–> kmph = totalDistance / timeCoeff
kmph =

Got lucky, though, the first estimate wasn’t too far off the real average.

Virtual rollerskiing

29 May

The Internet provides rich opportunities for Rollerski information gathering. If the rain stops today as yr.no predicts, then I’ll check a new route up to Linderudkollen. I was out running in the forest yesterday and again saw the ski jump towers high on the other side of the valley.

I thought to myself that it would be nice to rollerski up there, but had doubts about the road quality. Happily I was able to check it out using Google’s street view. I’d earlier seen in person that the road was really bad heading out that way. But with my virtual tour yesterday I determined that that it gets considerably better after the first intersection going toward Solemskogen.

So this will be a change from my regular route up Grefsenkollen. Since I usually go up there “on the clock” with the GPS app running on my phone, I can’t stop and take a picture. But there’s a solution for that. The Internet virtual tour even gives you a glimpse of the views down on the city:

The Street view capture car went before the latest asphalt upgrade and on a cloudy day. But other than that, doing the virtual trip lets you see more or less what I do.

Skiløyper – løypepreparering status monitor update

24 Mar

Have updated the config file for my Skiløyper – løypepreparering status monitor. These are all the trails I watch with that little Windows tray application I wrote. You can download the complete application with the updated config here or just update the SkiStatus.exe.config config file with the following:

<?xml version=1.0 encoding=utf-8 ?>



<!– Grinda – Låkeberget(230) –>

<add key=loypecoord_1 value=263340,6656076/>

<!– Låkeberget – Hammeren(234) –>

<add key=loypecoord_2 value=262976,6657160/>

<!– Hammeren – Ullevålseter(235) –>

<add key=loypecoord_3 value=262152,6660008/>

<!– Hammeren – Skar(236) –>

<add key=loypecoord_4 value=263696,6658808/>

<!– Langmyr – Nedre Blanksjø(233) –>

<add key=loypecoord_5 value=262600,6656120/>

<!– Sognsvann – Hammeren (Ankerveien)(224)–>

<add key=loypecoord_6 value=262576,6657440/>

<!– Sognsvann – Ullevålseter (Østsiden)(223) –>

<add key=loypecoord_7 value=261872,6656816/>

<!– Løkka – Sognsvann (Vestside) – Lorttjern(226) –>

<add key=loypecoord_8 value=261208,6656824/>

<!– Frønsvolltråkka – Ullevålseter (Hk 16,7)(248) –>

<add key=loypecoord_9 value=260856,6659200/>

<!– Frognerseteren – Lorttjern (Ullevålseter)(206) –>

<add key=loypecoord_91 value=260600,6658248/>

<!– Movann – Tømte(126) –>

<add key=loypecoord_92 value=266640,6664320/>

<!– Sandermosveien (Fugleleiken) – Sandermosen(154)–>

<add key=loypecoord_93 value=266296,6658568/>

<!– Lysløype, Grinda(231)–>

<add key=loypecoord_94 value=262904,6655904/>

<!–Oset – Småvannsdalen(109)–>

<add key=loypecoord_95 value=265072,6655752 />

<!– Proxy server address (if required) –>

<!–<add key=”ProxyAddress” value=”http://isa47oslo:8080″/&gt;–>

<!– Updated loype status poll interval –>

<add key=PollSeconds value=120/>

<add key=ServiceUrl value=http://webhotel2.gisline.no/turkart_loeypekart/AjaxServices/LoypeInfoProxy.asmx/>



Temperature calculations for Korsvoll

27 Feb

It’s important to know the temperature to choose the right ski wax. My neighbor has a digital thermometer on his wall, but when the sun hits it its readings go haywire.

The weather website Yr.no is a good candidate. They provide temperature estimates for many places, including my neighborhood, based on their sophisticated weather model. The problem is that they update the predictions only twice daily. And predictions are often wrong.

Yr.no does offer hourly observations from a few local weather stations. The big problem is that the two closest stations are at lower and higher altitudes and closer and further from the fjord compared to where I live.

My solution has been to put together an Excel based weather model that takes the temperatures from the two closest stations as inputs:

My model predicts temperature in Korsvoll using both the standard altitude-based correction (-0,65C per 100 meters) as well as a corrected calculation based on real data. The latter takes into account the difference between the observed temperature at Tryvasshøgda and the predicted temperature for Tryvasshøgda using the standard altitude based correction applied to the temperature lower down at Blindern.

Today was cloudy and the prediction jives perfectly with the neighbor’s thermometer.

Access the spreadsheet online via GoogleDocs here. You can also download it from that address and run it locally. The current saved values correspond to the above readings. You can adapt this to where you live provided you have two weather stations and the necessary altitude data.

Ski Status monitor

8 Apr


I just made a “Ski status monitor” that tracks information from Friluftsetaten about the trails you want to use. When you minimize the application it puts an icon in the windows Taskbar. Clicking on the icon maximizes the main window.

Bubble Alerts

The Ski status monitor will tell you when a trail you are tracking has been prepped. It will show a bubble alert like the following:


Highlighted Trail Updates

The main window trail listing gets highlighted when the prep status changes:



The SkiStatus.exe.config configuration file lets you set the application configuration parameters. Trails to watch are set as coordinate points that you can find by inspecting the AJAX web service calls toward the interactive map application at http://webhotel2.gisline.no/turkart_loeypekart/. You can also set your proxy server address as well as the delay in seconds before the application polls for updated information.

Get it here