Unit Conversion: Features

Unit Conversion includes the following features; some of these are unique to this product and others are implemented differently than in competing products (a comparison between Unit Conversion and other software can be found by clicking on the "Compare" link to the left).

Assembly of complex dimensions from basic units

There are two approaches used to implement unit conversion. Our Unit Conversion tool and several other offerings (notably the Google calculator and the Apricot Software products) use a flexible "parser" to break combinations of units entered by the user into their constituent units. Most available programs, on the other hand, include a predefined list of units (to see a table comparing our Unit Conversion tool with other offerings, click on the "Compare" list at the left).

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

Parsing of complex combinations of units

As discussed in the previous section, Unit Conversion contains a parser that is capable of breaking down complex combinations of units into their constituent fundamental dimensions. In our opinion, the Parser in Unit Conversion is more flexible than that implemented in some competing products. Consider the example given immediately above, in which the power from a hydroelectric dam (in megawatt hours) for a given flowrate (in acre-feet per year) is converted to horsepower-hour per gallon per minute.

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;

MW*hr/(acre*ft/year) .... hp*hr/(gallon/minute)

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;

MW.hr.year/acre.ft .... hp.hr.minute/gallon

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

Ability to handle units with exponents that are not integers

To our knowledge, our product is unique in that it can process non-integer exponents. There are a number of practical cases in which units or groups of units are raised to fractional units. Consider the specific speed of a turbomachine, which is defined as;

Specific Speed Equation is a complex combination of units including values raised to non integer exponents
Note that both the numerator and denominator contain sets of units raised to a non-integer (½ and ¾ respectively) powers. Click here to show a screen shot that demonstrates how Unit Conversion can be used to convert a specific speed expression from one set of units to another. Click on the "Examples" link at the left to see additional examples.


Return to Top of Page

Molecular Weight

The Unit Conversion tool integrates a full-featured molecular weight calculator. To the best of our knowledge, this makes our product unique. The molecular weight parser can convert between moles of a substance and mass. Click here to see an example in which a heat of reaction, expressed on a molar basis, is is converted to a mass units. The molecular weight function is robust and comprehensive allowing for functional groups in parenthesis, hydrated species, etc. The following table shows examples;

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

Return to Top of Page

Ability to add new units and to redefine conversion factors.

Surprisingly, this key functionality is missing or else poorly implemented in existing products. In the Unit Conversion tool, the ability to define new units is tightly integrated with the rest of the code. New units or updated data can be entered by;
  • Entering a new unit and following prompts to define it on the basis of existing units
  • Reading updated data from a comma-delimited ASCII file
  • Editing the file containing the unit definitions with any ASCII editor
Any given unit can have a number of aliases, so that for example “in” and “inch” refer to the same unit.

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

Integration with Excel ©

Although several competing products are packaged as Excel add-ins, the current tool includes both Excel and stanalone versions. The Excel implementation includes features that make it operate more effectively within the Excel environment than other products. Excel functionality can be implemented by "live" function calls or by a menu driven interface identical to that of the standalone program. Excel and standalone iterfaces draw from the same database, including user defined units. Examples showing operation in the Excel environment can be found by clicking here or on the "Examples" link at the left.

Unit Data File

Unit Conversion reads definitions from a file named unit_data.udt. Each individual user has his or her own unit_data file, which includes unit definitions suppplied with the program as well as those defined by that user. The file is in comma delimited ASCII format, which can be opened in any text editor (i.e. notepad). Click here to open a copy of the standard data file that ships with the current version of Unit Conversion. For clarity, a limited subset of unit definitions was extracted and placed in tabular format, below.

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..

  • Edit their copy of the unit_data.udt file directly, using Notepad or another ASCII editor
  • Use Unit Conversion's built-in features to define new units. Click here to see how this works
  • Import data from an external file (in .udt format as defined above). A sample file with surveying units can be viewed here or downloaded as a self-extracting archive here. Click here to see a movie illustrating the import feature works.
Return to Top of Page