By the end of this section, you will be able to:
It is often necessary to convert from one unit to another. For example, if you are reading a European cookbook, some quantities may be expressed in units of liters and you need to convert them to cups. Or perhaps you are reading walking directions from one location to another and you are interested in how many miles you will be walking. In this case, you may need to convert units of feet or meters to miles.
Let’s consider a simple example of how to convert units. Suppose we want to convert 80 m to kilometers. The first thing to do is to list the units you have and the units to which you want to convert. In this case, we have units in meters and we want to convert to kilometers. Next, we need to determine a conversion factor relating meters to kilometers. A conversion factor is a ratio that expresses how many of one unit are equal to another unit. For example, there are 12 in. in 1 ft, 1609 m in 1 mi, 100 cm in 1 m, 60 s in 1 min, and so on. Refer to Appendix B for a more complete list of conversion factors. In this case, we know that there are 1000 m in 1 km. Now we can set up our unit conversion. We write the units we have and then multiply them by the conversion factor so the units cancel out, as shown:
Note that the unwanted meter unit cancels, leaving only the desired kilometer unit. You can use this method to convert between any type of unit. Now, the conversion of 80 m to kilometers is simply the use of a metric prefix, as we saw in the preceding section, so we can get the same answer just as easily by noting that
since “kilo-” means 103 (see Table 1.2) and However, using conversion factors is handy when converting between units that are not metric or when converting between derived units, as the following examples illustrate.
Light travels about 9 Pm in a year. Given that a year is about what is the speed of light in meters per second?
Suppose you have 3 gallons of olive oil. You are tasked to determine how much it weighs, but you don't have a scale. What you do know is that the density of olive oil is about 0.92 g/ml. Find the weight of the olive oil in pounds.
The equation that relates mass to volume and density is , where is the density. We can calculate the mass of the oil since we know the density and the volume. Since the formula requires that each variable have compatible units, we will first convert all of our values to SI units. Once we have SI units, we can find the mass, and convert that back to pound-mass.
We know there are 3.79 liters in a gallon, and 1000 liters in a cubic meter. We will use python to calculate what the volume is in cubic meters.
The same can be done for the density. We need to convert grams per milliliter to kiligrams per cubic meter. We can replace grams with kiligrams by adding a factor of . Similarly, we can replace milliliters with liters by adding a factor of . But, since milliliters is on the bottom, and grams is on the top, these two added factors will cancel. We find that 1 kg/l = 1 g/ml. Now we just need to convert liters to cubic meters. We know that there are 1000 liters in a cubic meter. This means we can replace liters with cubic meters by adding a factor of , but since liters is on the bottom we need to divide by , making it . Remember that this can easily be done with scientific notation.
Now that we have volume and density in SI units, we can calculate the mass.
A good practice is to put everything in SI units (or a consistent unit system) before plugging them into the equations. In python we can easily do this by converting our values from the start; multiplying variables by the appropriate values before using the variables to make calculations.
We know from Figure 1.4 that the diameter of Earth is on the order of 107 m, so the order of magnitude of its surface area is 1014 m2. What is that in square kilometers (that is, km2)? (Try doing this both by converting 107 m to km and then squaring it and then by converting 1014 m2 directly to square kilometers. You should get the same answer both ways.)
Unit conversions may not seem very interesting, but not doing them can be costly. One famous example of this situation was seen with the Mars Climate Orbiter. This probe was launched by NASA on December 11, 1998. On September 23, 1999, while attempting to guide the probe into its planned orbit around Mars, NASA lost contact with it. Subsequent investigations showed a piece of software called SM_FORCES (or “small forces”) was recording thruster performance data in the English units of pound-force-seconds (lbf-s). However, other pieces of software that used these values for course corrections expected them to be recorded in the SI units of newton-seconds (N-s), as dictated in the software interface protocols. This error caused the probe to follow a very different trajectory from what NASA thought it was following, which most likely caused the probe either to burn up in the Martian atmosphere or to shoot out into space. This failure to pay attention to unit conversions cost hundreds of millions of dollars, not to mention all the time invested by the scientists and engineers who worked on the project.
Given that 1 lbf (pound-force) is 4.45 N, were the numbers being output by SM_FORCES too big or too small?