The units.txt file[0] for Frink is also a really good read. It has lots of useful editorializing about how different units were defined, and how some units were poorly or ambiguously defined.
I've had to implement unit math recently for CalcuLaTeX [0] and it's given me a lot of appreciation for how difficult it actually is. I've got it almost completely working with SI units but I haven't thought through fractional unit powers yet.
I really should've based it on something like GNU units.