Citrus
Citrus is a suite of applications, plugins, and a library for performing unit conversion so that you can compare apples and oranges, but only if you have a conversion factor. It will convert numbers with units into numbers with other units. To accomplish this, it performs unit math, just like you learned in high school chemistry or physics. Thus, it can figure out (for instance) that 9.8 kg m/s^2 is equivalent to 2.20313 lbf. It will eventually know of every unit devised by mankind by parsing an XML configuration file at startup that defines all of the base dimensions and units. Citrus includes a parser for reading user input and determining the units of a number using standard abbreviations (km for kilometers, N for Newtons, MPa for megaPascals, ...).
Although the software is mainly intended for engineering applications, it would be nice to eventually include features like monetary conversions (looking up current exchange rates on the net). It will hopefully be fast enough for general purpose use as well.
Finally, the library will (but does not yet) contain information about the history and standardization of the units. This is really helpful for forgetful engineers (such as myself) that never remember the difference between dynamic and absolute viscosity.
The doc directory contains both a User's Guide and developer documentation. Also, the TODO file contains a list of the current work and some cloud-nine wishes for future versions.
QUICKSTART
If you are the flighty type, try:
./configure
make
cd citrus
setenv CITRUS_CONFIG ../data/C/units.xml
./citrus 150 "kg m / s^2" "lbf"
If everything worked, the last command should result in this being printed out:
Ans=33.7213 lbf
Running gcitrus (in the gcitrus directory) requires you to
make install
first so that the dynamic library and configuration file are
installed correctly.
