Home | Trees | Indices | Help |
|
---|
|
Convert between various units.
Functions | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Function Details |
Convert area values between ft**2, in**2, m**2, km**2, sm**2 and nm**2. The incoming value is first converted to ft**2, then it is converted to desired return value. The units default to those specified in default_units.py Examples: Convert 1 ft**2 to inches**2, with ft**2 already defined as the default units: >>> area_conv(1, to_units = 'in**2') 144.0 Convert 288 square inches to square feet, with ft**2 already defined as the default units: >>> area_conv(288, from_units = 'in**2') 2.0 Convert 10 square metres to square inches: >>> area_conv(1000, from_units = 'm**2', to_units = 'in**2') 1550003.1000061999 |
Convert density values between kg/m**3, slug/ft**3 and lb/ft**3. The incoming value is first converted to kg/m**3, then it is converted to desired return value. There are no default units. Both the from_units and the to_units must be specified. Example: Convert 1.225 kg per metre cubed to lb per foot cubed: >>> density_conv(1.225, from_units = 'kg/m**3', to_units = 'lb/ft**3') 0.076474253491112101 |
Convert force values between lb and N. The incoming value is first converted to N, then it is converted to the desired return value. |
Convert length values between ft, in, m, km, sm and nm. The incoming value is first converted to ft, then it is converted to desired return value. The units default to those specified in default_units.py Examples: Convert 5280 ft to statute miles, with feet already defined as the default units: >>> len_conv(5280, to_units = 'sm') 1.0 Convert 1 nautical mile to feet, with feet already defined as the default units: >>> len_conv(1, from_units = 'nm') 6076.1154855643044 Convert 1000 metres to kilometres: >>> len_conv(1000, from_units = 'm', to_units = 'km') 0.99999999999999989 |
Convert power values between horsepower, ft-lb/mn, ft-lb/s, watts, kilowatts, BTU/hr and BTU/mn. The incoming value is first converted to hp, then it is converted to the desired return value. The units default to those specified in default_units.py |
Convert pressure values between inches of HG, mm of HG, psi, lb/ft^2, hpa and mb. The incoming value is first converted to Pa, then it is converted to desired return value. The units default to those specified in default_units.py Examples: Convert 1013.25 hpa to default pressure units: >>> press_conv(1013.25, from_units = 'hpa') 29.921331923765198 Convert 29.9213 default pressure units to mm of HG: >>> press_conv(29.9213, to_units = 'mm HG') 760.00128931459176 Convert 2116.22 lb per sq. ft to lb per sq. inch: >>> press_conv(2116.22, from_units = 'psf', to_units = 'psi') 14.695973160069311 |
Convert speed values between kt, mph, km/h, m/s and ft/s. The incoming value is first converted to kt, then it is converted to desired return value. The units default to those specified in default_units.py Example: Convert 230 mph to kt: >>> speed_conv(230, from_units = 'mph', to_units = 'kt') 199.86453563714903 |
Convert absolute temperature values between deg C, F, K and R. This function should not be used for relative temperature conversions, i.e. temperature differences. The incoming value is first converted to deg K, then it is converted to desired return value. The units default to those specified in default_units.py Examples: Convert 32 deg F to deg C, with deg C as the default units: >>> temp_conv(32, from_units = 'F') 0.0 Convert 100 deg C to deg F, with deg C as the default units: >>> temp_conv(100, to_units = 'F') 212.0 Convert 59 deg F to deg K >>> temp_conv(59, from_units = 'F', to_units = 'K') 288.14999999999998 |
Convert volume values between USG, ImpGal (Imperial gallons), l (litres), ft**3, in**3, m**3, km**3, sm**3 and nm**3. The incoming value is first converted to ft**3, then it is converted to desired return value. The units default to those specified in default_units.py Examples: Convert 1 cubic foot to US gallons, with cubic feet already defined as the default units: >>> vol_conv(1, to_units = 'USG') 7.4805194804946105 Convert 1 Imperial gallon to cubic feet, with cubic feet already defined as the default units: >>> vol_conv(1, from_units = 'ImpGal') 0.16054365323600001 Convert 10 US gallon to litres: >>> vol_conv(10, from_units = 'USG', to_units = 'l') 37.854117840125852 |
Convert weight values between lb and kg. Purists will yell that lb is a unit of weight, and kg is a unit of mass. Get over it. The incoming value is first converted to kg, then it is converted to the desired return value. The units default to those specified in default_units.py |
Convert aviation gasoline between units of lb, US Gallon (USG), Imperial Gallon (Imp Gal), litres (l) and kg, assuming nominal density for aviation gasoline of 6.01 lb per USG. The units default to those specified in default_units.py Note: it was difficult to find authoritative values for aviation gasoline density. Conventional wisdom is that aviation gasoline has a density of 6 lb/USG. The Canada Flight Supplement provides densities of: temp density density density (deg C) (lb/USG) (lb/ImpGal) (lb/l) -40 6.41 7.68 1.69 -20 6.26 7.50 1.65 0 6.12 7.33 1.62 15 6.01 7.20 1.59 30 5.90 7.07 1.56 However, the Canada Flight Supplement does not provide a source for its density data. And, the values for the different volume units are not completly consistent, as they don't vary by exactly the correct factor. For example, if the density at 15 deg C is 6.01 lb/USG, we would expect the density in lb/ImpGal to be 7.22, (given that 1 ImpGal = 1.201 USG) yet the Canada Flight Supplement has 7.20. The only authoritative source for aviation gasoline density that was found on the web was the "Air BP Handbook of Products" on the British Petroleum (BP) web site: <http://www.bp.com/liveassets/bp_internet/aviation/air_bp/STAGING/local_assets/downloads_pdfs/a/air_bp_products_handbook_04004_1.pdf> It provides the following density data valid at 15 deg C (the BP document only provides density in kg/m**3 - the density in lb/USG were calculated by Kevin Horton): Avgas density density Type (kg/m**3) (lb/USG) 80 690 5.76 100 695 5.80 100LL 715 5.97 The available aviation gasoline specifications do not appear to define an allowable density range. They do define allowable ranges for various parametres of the distillation process - the density of the final product will vary depending on where in the allowable range the refinery is run. Thus there will be some variation in density from refinery to refinery. This function uses the 15 deg C density values provided by BP, with the variation with temperature provided in the Canada Flight Supplement. The grade may be specified as "80", "100" or "100LL". It defaults to "100LL" if it is not specified. The temperature defaults to 15 deg C if it is not specified. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat Apr 26 08:11:19 2008 | http://epydoc.sourceforge.net |