Posts

Showing posts from 2010

NJ - SFO travel epic

After a heavy but hardly extraordinary snowstorm the day after a Christmas spent in northern New Jersey with family, it was time to return home to San Francisco. It had been over a day since the snow had subsided, plenty of time for things to get back up to speed, and although with air travel on the rise this year passengers whose flights had been canceled were desperate to find a way back home, since I had a reserved spot I wasn't too worried. Nevertheless, I left my parents' house with substantial margin to get to the airport in plenty of time. My plan was to leave the station in suburban New Jersey on the 11:06 southbound to Secaucus, connect on one of a series of LIRR trains to Jamaica, then get to the airport 2 hours ahead of my departure. No problem. But things didn't quite go according to plan. First, my sister and I were waiting at the platform, at which we'd arrived with 5 minutes to spare, first 5 minutes, then 10, then 15 minutes after the 11:06 sch

Garmin FIT decoder

I hope anyone reading this is having a fruitful Christmas. I'm personally in New Jersey, where it's cold by San Francisco standards, but excellent weather for running, which I'm finding I can still do despite months of neglect. I know: patience! It's hard, but last year I learned the hard way that going too hard too quickly is a loan which needs to be paid back at a very high rate of interest... It is a good day for me -- what a great Christmas present this find was, from Japan: a GARMIN FIT decoder library for Perl . In addition to the library, some sample applications are provided: fitdump and fitsed . So why am I so pleased with these? Well, many reasons, but one is that when uploading files to Strava , I tend to have two problems: either I forget to reset the unit from one day to the next and I end up with "rides" (or "runs") which span multiple days, or I neglect to shut it off when I get on the train or in a car, and end up with motor

4-dimensional mazes

As I noted last time, the maze algorithm doesn't know are care about topography or dimensionality. All it cares about is a list of nodes with each node's initially unconnected neighbors. How the nodes are laid out is post-processing. One-dimensional mazes aren't so challenging: each node has 2 neighbors. Two directions, for example east and west. With a 2-dimensional maze with square nodes, each node has 4 neighbors (no cutting corners). Obviously 2-dimensional is more challenging than one-dimensional: there's no the opportunity for dead-ends and multiple path options. Sample directions are north, east, south, and west: two more than the 1-dimensional case. To three dimensions, each node (assuming cubic nodes) has 6 neighbors. In addition to north, east, south, and west, you can add up and down to the list of directions. So there's a pattern here. Each time you add a dimension you add two more neighbors and two more directions, the two directions bei

semiconducting mazes

Image
Okay, so this is mostly a bike blog, but since I got a new job in October, my time for riding has dropped off substantially. I'm trying to ride into work more often: once to twice per week would be good. But it's 42 miles one-way, so I've got to "make time" for that to happen. Anyway, in my job, one of the products I use is a structure generator for semiconductor device modeling. So, for example, I can build models for field-effect transistors, bipolar junction transistors, p-i-n diodes, photo-detectors, light-emitting diodes, even static random access memory cells and other small circuits. Fun stuff, really. The models do a remarkably good job of matching reality, even though the reality of semiconductors can be fairly complex. Knights of the Lambda Calculus But when I found myself home sick with a bad cold, between naps I needed an activity to keep myself occupied. It was a good exercise to reacquaint myself with Scheme, the scripting language used b

Low-Key party

Image
Thanks to all for the great time at the Low-Key Hillclimbs party last night! And thanks to Sports Basement for giving us space to hold it. It's a lot of work doing the slides for the awards, but I think it's really important to try and recognize all of the great contributions that both riders and volunteers make to the success of the series. Once again, despite not really trying, we raised money for the Lance Armstrong Foundation and the Open Space Trust . Each of these charities does great work, similar really. I view the Open Space Trust as fighting cancer of the land, while LAF fights cancer of the body. The two are really intertwined. And a huge thanks to Strava for providing some wonderful prizes. We awarded this with a card game. I was a bit inspired by Charles Ardai's excellent book " Fifty-to-One ", in which a very simple card game was played with very high stakes. We played a series of games which were closer to "one-to-one", unt

re-cycling the Marin Headlands

Image
Back in April I lamented the closing of the Marin Headlands for construction. Well, the construction was finally completed last month, and Sunday for the first time since then I rode the loop . I've been sick for two weeks now: sniffling, hacking, and coughing has been epidemic at work, and after Thanksgiving it was my turn in line. So I've been feeling sort of crappy, riding as I'm able. Yet yesterday I motivated myself to try a loop of the challenging and beautiful Headlands. The last time I'd ridden to the Hawk Hill summit was September, when it had been unpaved, serene, and illegal. The chance to have ridden it without car traffic had been too much to resist. Now the pavement is done and yesterday, fearful of what I would observe, I set off. Hawk Hill in September, during repaving. The result: the pavement is pristine, as expected, which is nice, of course. And my fears of "improvement" were unfounded: there's been little "improvemen

Caltrain weekend baby bullet schedule

Image
Another day on the Caltrain bike car ( StreetsBlog ) Back in February I proposed a weekend train schedule for Caltrain, one which would make the train an attractive option for those traveling along the Peninsula on weekends. That schedule wasn't based on any estimation of actual resource constraints. Rather it was what I expected it would take to start to make a dent in the car traffic on 101 every Saturday and Sunday. That proposal was for express trains traveling north and south each hour, with two limited trains taking care of the secondary stations, also each hour north and south. Without service at least comparable to this, service which is typical of rail systems around the world excluding ours where we've sold our souls to the auto industry, those willing and able to drive will find themselves hard pressed to claim the train is the preferred alternative for travel subject to external time constraints. I'm sitting next to Ammon Skidmore at a JPB meeting in

cat feeder FAIL

Image
I live with three cats. Of the three, the older of the two males has food issues. He was found, nearly starved, as a kitten, and apparently learned from that harsh lesson to never take the future availability of food for granted. He has a special weakness for crunchies, which he loves. These have the further disadvantage of being calorie dense: he can consume a lot more of them before reaching stomach capacity. So to keep him at a healthy weight it's important to control how much he gets. With this in mind, before leaving for a three-day mini-vacation back in October (which included some fantastic riding; okay, mandatory cycling content), it was time to break out the automated feeder. The feeder has a reservoir of food connected to the outside world with a tube containing a rotating screw. The screw turns on when programmed to do so, channeling food down the tube, where it pushes open a one-way door and then falls into a feeding tray, where it is quickly consumed by enth

Low-Key Hillclimbs step response and CTL time constant

Image
This year I was able to ride weeks 3,5,6,7,8, and 9 of the Low-Key Hillclimbs (I coordinated weeks 1-2 and week 4 was canceled due to concerns over rain). I also started a new job the Monday following the week 3 climb, which reduced my training to essentially the Low-Key Hillclimbs only (I also got in 2 long Sunday rides and one 45-mile commute to work during this period). Previous to this, I'd had a week's vacation in Italy with lots of riding embedded within a longer period where I had weekend rides and weekday training sessions. My scores clearly suffered from the neglect as the series progressed. I did a regression of the scores, which are normalized to the median rider (sex-adjusted) time which scores 100. Here's the result: Curiously the time constant came out within 1% of the 42-day CTL time constant. Anyway, not much significance here, and more sources of variability than I can count, but I thought it was amusing. It appears the 42 day time constant

Comparing the Terrible Two, Climb to Kaiser, and Death Ride: Peak Climbing Segments

Image
Today I'll take another look at the route data from the Death Ride , Climb to Kaiser , and the Terrible Two . Here for each climb I first map the data onto a 50 meter grid, then slightly smooth it using an estimated 15 second time constant (the same as when I calculate a climb rating), then I map it back to a 50 meter point separation (since smoothing disturbs this at the beginning and end of the ride) then I calculate the total climbing (with zero threshold) between each pair of points on the route. For each segment length (which is the number of contiguous points minus one multiplied by 50 meters) I find the segment which maximizes this total climbing. The only efficiency trick is if I have a given segment length, I don't need to calculate it fresh each time: if I start with the segment from points 1000 to 2000 (length 50 km), and I want to calculate the climbing from points 1001 to 2001, I take the previous sum, subtract the climbing from 1000 to 1001, and then add the

Comparing the Terrible Two, Climb to Kaiser, and Death Ride: Profiles

Image
Last time I used grade histograms and total climbing versus climbing threshold to compare three really solid one-day riding challenges: the Death Ride , Climb to Kaiser , and the Terrible Two . What I left out is sort of the obvious: the route profiles. Every big ride shows its route profile, and they all tend to sort of look the same: up and down. So to compare the three, I plotted them on the same axes. I use km for distance and meters for altitude: That one's worth more than the measly 100 kpixels shown here, so if you click on the plot you should see a higher resolution version. Anyway, the Death Ride and Climb to Kaiser look sort of imposing here. The Terrible Two is almost lost under the giant altitudes of those other two rides. Climb to Kaiser is perhaps most striking of the three, starting down in the lowlands before rising to and beyond the lofty altitudes of the Death Ride. Indeed, Climb to Kaiser is a very special ride, one I often recommend to those who th

Comparing the Terrible Two, Climb to Kaiser, and Death Ride

Image
First, a bit about the climbing algorithm. Just two paragraphs, I promise. Then on to good stuff. I just described an algorithm by which you can calculate total climbing from a route profile with a given "climbing threshold" designed to both eliminate small bumps which can be coasted over, but more importantly to get rid of the small altitude fluctuations which occur with "noise" in both barometric and GPS-based altimeters. I proposed that a 5 meter threshold worked well, but that there was no unique answer for what is the "true" climbing of a route. Well, that algorithm does work well for a relatively small climbing threshold, but when you crank the threshold up to the size of the largest hills on a ride, it can be fooled. For this post, I thus added an extra step to the process, in which peaks closer than the climbing threshold from the minimum altitude on the ride, and valleys closer than the threshold from the maximum altitude on the ride are b

testing the corrected total climbing algorithm

Image
Okay, so déja-vu time. Once again I exercise my total climbing algorithm, except this time doing it right. Here's the ride from last Sunday again, where I plot total climbing versus the climbing threshold. I've "greyed out" the result from the flawed version of the flawed algorithm. The difference is most evident for the larger values of the climbing threshold, where there's more pruning to be done. As long as pruning was on isolated segments, the old algorithm did okay. It's when multiple sequential climbs and descents were clipped that things went sour. Now I look once again at the data from my ride. I plot here only the data from after I first crossed the west peak of Mt Tam. Here's the result using a 5 meter threshold, compared to the full measured profile: Next, the 15 meter threshold. This did okay last time, and with the improved clipping, it does even better. 15 meters is close to the 50 foot threshold I believe was used with the

total climbing and descending algorithm: correct version

Last time I demonstrated how important it is to take some care in pruning points to simplify the profile while conserving climbs which are in excess of the minimum threshold. Before that, I'd proposed an algorithm to calculate total climbing and descending, but I was sloppy. Nevertheless even my flawed algorithm demonstrated that a climbing threshold of 5 meters was desirable. There's one key thing I was missing in my previous algorithm, and that's to make sure pruned segments are bounded on both the high and low side by adjacent points. So here's my revised approach. First, merge monotonic segments, as follows: Start with the first point. Until the following two segments are either climb-descend or descend climb, or until the following point is the final point in the ride, delete the following point. Move on to the next point and repeat the previous step if there's at least three points past the current point. So now the profile consists of uphill segm

total climbing and descending algorithm: FAIL

Image
In my last few blog posts, I proposed a total climbing algorithm. Now to tell the truth, I didn't just invent this for the first time now -- years ago I wrote a program to decode files from the Specialized pBrain, a rather well-designed altitude-recoring cycling computer which actually cost more over 10 years ago than an Edge 500 does today, but having downloadable altitude profiles was so novel, I considered it worth every penny, at least until the bike I had it mounted to was stolen. I lost track of that old source code so I basically started from scratch to facilitate generating climbing statistics for the Low-Key Hillclimbs . Anyway, I was reviewing the plots I posted last time and I realized the algorithm I just described was flawed. You can see it most clearly in the 50 meter threshold plot: Ouch -- there's a bunch of low-lying fruit which remains unpicked in the 90-95 km range, all passed up for a higher point at km 103. This clearly isn't calculating total

testing the total climbing algorithm

Image
On Sunday I did the following ride. I'd like to say this sort of thing is typical but sadly it was the longest ride I'd done in at least 5 weeks. New job and a tendency toward Sunday rain around here has kept me from getting in any long ones lately: I imported my Edge 500 data into GoldenCheetah , exported CSV, and ran it through my algorithm. As a test, I varied the climbing threshold from 1 meter to 100 meters. Here's the the result: Clearly, there's no "correct" answer, no unique value of total climbing. We generally agree if I make 100 different cycling computers and each measure distance, they should agree within, for example, 0.1% if perfectly calibrated. Sure, there's issues of whether they measure the distance traversed by the handlebars or by the tire-road contact patch if the bike banks into corners. But these are minor differences. However, with "total climbing", assuming you don't want to measure every vibration

total climbing and descending algorithm

Image
Last time I described how the goal was to eliminate climbs less than some threshold (which I'll call h min ) while preserving the starting and ending altitude for a route. Here's the algorithm I implemented. A climb is represented as a series of points, each with a distance and altitude. I'll ignore distance. Distance might be used to apply some numerical smoothing to the data before implementing this algorithm, but that's optional. Here I care only about altitude. One approach might be to consider consecutive points and count only climbing or descending which exceeds h min . This obviously fails because a climb might consist of 1000 consecutive one-meter altitude gains. So then I might combine all adjacent non-descending segments together, then all adjacent non-climbing segments, etc, to yield alternating climb-descend-climb-descend. I could then eliminate the segments which gain or lose less than h min But this isn't so easy either. Consider a clim

Calculating Net Climbing and Descending

Image
The Alta Alpine 8-pass challenge is listed with 20300 feet of climbing in 198 miles Whenever a route is described, for example a climb or a "century"-type ride, people want to know two pieces of information: distance and total climbing. There's not much to be said about total distance, although different methods (GPS versus counting wheel rotations versus using digital map data) may yield slightly different results. Climbing, on the other hand, is more challenging. You'd think it would be simple: for each adjacent pair of points a and b , if the route travels from a to b and b is higher, the difference in altitude is added to total climbing. If a is higher, the difference is added to total descending. Now b becomes the new a , the next point after the old b becomes the new b , and repeat. Except this doesn't work. The reason is measuring altitude typically involves errors which are different from one point to the next. Suppose I have points ev

Mix Canyon Road

Image
Approaching Mt Vaca We're getting close to the end game in the 2010 Low-Key Hillclimbs and the mind naturally turns to the 2011 schedule. And there's one climb which I've wanted to visit ever since it was first suggested to me three years ago. That's Mix Canyon Road out of Vacaville. From Vacaville, you follow Pleasants Valley Road to the north until Mix goes off to the left. View Larger Map The usual response is it's sort of far afield. Sure, from San Jose it's 91 miles and it's 86 from Palo Alto but from San Francisco, where I live, it's closer than three of the climbs on the 2010 schedule. I'm not too worried about the distance. It's worth a bit of travel for a very special climb. After the turn the road climbs gradually but it gets steeper the further you go. Approaching the summit is a will-cracking 15% sustained, which means sections at 20% with "recovery" at around 10%. The combination of altitude gained, the

2011 Cervelo geometry

Image
The 2011 Cervelo bike pages are finally up. I find Cervelo particularly interesting because they are deliberate in their geometry decisions, designing their bikes with a coherent philosophy across the entire size range rather than the more ad hoc approach which generally preceded them. Initially Cervelo came out with the R and S series which were designed to be aggressive. The idea was if you needed the handlebars higher, you could always simply add spacers. But riders don't like spacers: they don't "look pro". Of course if the rider in question isn't pro, "looking pro" shouldn't be a concern. But for some reason people want to "look pro" for their club rides. And indeed there's a limit to how many spacers you probably want. Better to have the frame design utilize available space a bit better. So they came out with the RS, a more relaxed geometry. No problem: now they spanned the geometry range. Now if you wanted the bar

San Francisco D10 Board of Supervisor candidates

Image
I agreed with Kristine Enea on every proposition on the poll. There's a remarkable number of candidates for the District 10 Board of Supervisors race in San Francisco. Of the 21 on the ballot, 12 responded to the San Francisco Chronicle's questionnaire on positions on some of the key city propositions on Tuesday's election. Thankfully, each voter gets to rank their top three choices in the election, and with so many candidates splitting votes, second and third choices will prove very important to the result. Here's how the D10 candidates responded. The first column shows the candidate name. The next five show whether the candidate supports each of the listed propositions, all considered key propositions in the election. Then I show the number of positions which match those I listed in this blog . Finally, I show the percent in agreement. Candidate B D G J L score pct James Calloway no yes no yes no 1 20 Malia Cohen no

Caltrain Eight-ride Addiction

I started a new job and any semblance of "training" has gone by the wayside, as I was first focused on learning my way around, and now on solving some of the problems I'm hired to deal with. I'll need to find more balance in coming weeks. But I digress. A consequence of the new job is I can finally get Commuter Checks, which allow me to buy transit tickets with "pre-tax" income. Considering as well I'll be working from home a lot less (I was around 1-2 times per week) and at least initially riding SF2G in less, surely it's time for a Caltrain monthly pass rather than my usual practice of getting 8-ride tickets. It's time to become one of the big-boy train commuters, right? The fare chart shows that a monthly pass for 3-zones is $159, while an 8-ride is $40.75. So the monthly costs as much as 31.25 rides. in other words, if you ride 16 round trips or more, the monthly is the deal. Sure, there's other factors. For example the m

November election: San Francisco ballot propositions

Image
Okay, last time I dispatched the state propositions. San Francisco loves propositions, as the voters have an alarming habit of passing things they don't understand, typically saddling the city with yet more debt. Here's my take on the latest bundle, on which I'll vote when I ride my bike to my local polling station (note how cleverly I slipped in the mandatory cycling content): Proposition AA (vehicle registration fee increase) : The money could be for the Floyd Fairness Fund, for all I care. I support all vehicle registration fees. Yes on AA. Proposition A (Earthquake safety retrofit loan bond) : Every single election there's another bond with either "schools", "water quality", "fire department", or "earthquake" in the title. These almost always pass. Who can be against Earthquake safety, after all? But we are sufficating under our debt, and bonds are no small part of that. I absolutely refuse to rubber-stamp arbitrar