The advantage of the "Parser" approach is that an infinite number of unit combinations can be evaluated and reformulated in other systems of units, whereas the "Predefined list" approach is, by definition, limited to those units which are present in the database. Worse, most of the "Predefined list" algorithms group their database of acceptable unit configurations into sets that fall into particular categories like "energy" or "distance," so even the relatively few progams that make it easy for the user to add new unit definitions to their database cannot handle combinations that fall outside of these categories.
As an example that illustrates this point, consider the analysis of a hydroelectric powerplant. An engineer might very well need to convert from, say megawatt-hours per acre-feet per year to horsepower-hour per gallon per minute. To our knowledge, no existing program based on the "Predefined list" approach can make this conversion, because they not only do not come configured with the "megawatt*hr/(acre*ft/year)" unit, but do not incorporate the appropriate "energy per flowrate" unit combination. Click here to see here to see how Unit Conversion can be used to solve this problem, or click on the "Examples" link at the let to see more sample calcuations.
This illustrates the dilemma associated with the “Predefined list” approach. Despite the best effort of developers to make
their products as comprehensive as possible (to the extent that some tools include thousands of units, including
arcane Biblical ones such as cubit and ephah), eventually a user will need to perform a conversion
that includes one of the infinite number of unit groupings that are not included in the predefined database.
Return to Top of Page
As shown here, in our Unit Conversion tool, the user can enter the units in an intuitive format in which the constituent units are grouped logically;
Note that the denominator contains an expression for energy and the denominator contains one for flowrate. While the parser in the Google Calculator is capable of handling these expressions, other competing products cannot handle the multiple levels of division and/or parenthetical groupings and therefore require the user to regroup the units as follows;
which is not intuitive (as always, statements about the capabilities of competing tools are based on a
good faith effort to evaluate these products. We welcome comments or corrections).
Return to Top of Page
| Species | Formula | Input to Unit Conversion | Result (in gm) |
| Methane | CH4 | mol(CH4) | 16.04 |
| Aluminum oxide | Al2O3 | mol(Al2O3) | 101.96 |
| Aluminum oxide trihydrate | Al2O3.3H2O | mol(Al2O3.3H2O) | 156.01 |
| Aluminum hydroxide | Al(OH)3 | mol(Al(OH)3) | 78.00 |
| Magnesium carbonate, basic | 3MgCO3.Mg(OH)2.3H2O | mol(3MgCO3.Mg(OH)2.3H2O) | 365.31 |
Examples of the first approach, which takes full advantage of the advanced parsing functions of the Unit Conversion tool,
can be found by clicking here or on the "Examples" link at the left. The structure of the
data file used by Unit Conversion is discussed here
Return to Top of Page
The first line of the file must remain unchanged and simply indicates the contents of each column. In each subsequent line, the first entry is the name of the unit, the second is a brief description. Columns 3 through 11 indicate the exponent associated with each dimension. For example, a BTU (British Thermal Unit) has dimensions of mass times length squared divided by time squared or, expressed in standard base units kilograms times meters squared per second squared. An hour has dimensions of time (units of seconds), a knot has dimensions of length divided by time (m/sec) etc.
The fourteenth column contains the actual definition of the unit expressed in standard units. For example, an hour is 3600 seconds. A kt is a little over half a meter per second, etc. The final column(s) in the data file contain (optional) synonyms for the unit. For example, "HOUR" and "HR" are equivalent, and either "POLE" or "PERCH" is equivalent to a "ROD."
Note that the program automatically converts all unit definitions and user entries to uppercase. For this reason, "HR" and "Hr" are not distinct units.
| Unit Name | Length (M) | Mass (kg) | Time (sec) | Temp (K) | Angle (Radian) | Elect. Current (Ampere) | Luminous Intensity (candela) | Solid Angle (Steradian) | Currency (Dollar) | Value | ||
| BTU | British Thermal Unit | 2 | 1 | -2 | 0 | 0 | 0 | 0 | 0 | 0 | 1055.056 | |
| HR | Hour | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3600 | HOUR |
| MINUTE | Minute | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | MIN |
| KT | Knot = Nautical Mile / Hour | 1 | 0 | -1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.514444 | |
| ROD | Rod also pole or perch | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5.02921 | pole, perch |
Users who wish to add their own units can do so in three ways..
This page copyright 2010 J. A. Peters and Associates. Click here for credits and acknowledgments. Hosted by FatCow.com