Unit Calculator Source.
In addition to the source you need the ASCII version of the unit database. The source is provided on an as-is basis. While I'm sure it's lacking in comments, the code should be pretty well structured.
UnitCalc 1.1 Source
Page hits: 5,892