INQUA Sub-Commission on Data-Handling Methods

Newsletter 14: July 1996

CONVERT YOUR DATA

Louis Maher

Data-handling often involves converting data from one unit of measurement to another. Some electronic calculators can convert units with the press of a key. Many unix systems have a conversion program built in. When you type units you will be asked in sequence what unit of measure you have and what measurement unit you wish to convert it to? A conversion multiplier (and its reciprocal) will then be displayed. If you use unix, type man units to read its manual.

When I was in college, the local engineering society printed a four-page table of conversion factors as a center-fold to its journal. I have kept the sheets in file drawers for 40 years, mislaying them many times. Finally I decided to put them in a computer program that would be harder to lose. So with the original list and additions from other sources, I soon had over 900 factors to include. How much does a 20-stone man weigh in pounds? If a plane climbs at 1500 feet per minute, what is this in km per hour? (See *, below, for answers.)

I call this DOS program CONVERT.EXE. To illustrate how it works, let us assume we measured a small rectangular pond on a U.S. map and found its surface area to be about 75,000 sq. ft. We wish to convert the area to sq. meters. When we start CONVERT from DOS (or a DOS window), it loads its data into memory and fills its screen with conversion factors starting with the first item, "abamperes," high-lighted. We need to find the line converting square feet to sq. meters (Fig. 1). The instructions are always at the bottom of the screen. We can move using the Up/Down arrow keys, the Page Up and Page Down keys, and the Enter key. We can get to the end of the list with the End key and back to the start with the Home key. But with hundreds of factors, it is easiest to type the first letter or letters we want to see. Typing square f will get us to the square feet category and the arrow keys can do the rest.


Figure 1
Figure 1. Selected conversion factor high-lighted.
When the desired high-lighted pair is reached, touching the F5 key brings up the screen to convert square feet to sq. meters (Fig. 2). Typing in 75000 yields the answer 6970 sq. meters. We are warned that the significant digits of the conversion factor should be used in interpreting the precision of the answer. We can convert other values if we wish. Touching the Enter key without any data returns us to the menu of factors.
Figure 2
Figure 2. Solution for one or more variables..
Most of the conversions are based on a single multiplier, but searching for temp allows you to convert C° to F° or F° to C°. You can pick up a copy from the File Boutique. It is an executable file so you will want an exact binary copy. If you use anonymous ftp, remember to type the word bin first.

(*Answers: 20 stones = 280 pounds. 1500 feet per minute = 27.44 kph.)


Copyright © 1996 Louis Maher
Home page
Newsletter 14 index
Author index
Subject index
WWW pages by K.D. Bennett