File indexing completed on 2024-12-22 05:36:52
0001 <?php 0002 /** 0003 * Zend Framework 0004 * 0005 * LICENSE 0006 * 0007 * This source file is subject to the new BSD license that is bundled 0008 * with this package in the file LICENSE.txt. 0009 * It is also available through the world-wide-web at this URL: 0010 * http://framework.zend.com/license/new-bsd 0011 * If you did not receive a copy of the license and are unable to 0012 * obtain it through the world-wide-web, please send an email 0013 * to license@zend.com so we can send you a copy immediately. 0014 * 0015 * @category Zend 0016 * @package Zend_Measure 0017 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0018 * @license http://framework.zend.com/license/new-bsd New BSD License 0019 * @version $Id$ 0020 */ 0021 0022 /** 0023 * Implement needed classes 0024 */ 0025 // require_once 'Zend/Measure/Abstract.php'; 0026 // require_once 'Zend/Locale.php'; 0027 0028 /** 0029 * Class for handling power conversions 0030 * 0031 * @category Zend 0032 * @package Zend_Measure 0033 * @subpackage Zend_Measure_Power 0034 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0035 * @license http://framework.zend.com/license/new-bsd New BSD License 0036 */ 0037 class Zend_Measure_Power extends Zend_Measure_Abstract 0038 { 0039 const STANDARD = 'WATT'; 0040 0041 const ATTOWATT = 'ATTOWATT'; 0042 const BTU_PER_HOUR = 'BTU_PER_HOUR'; 0043 const BTU_PER_MINUTE = 'BTU_PER_MINUTE'; 0044 const BTU_PER_SECOND = 'BTU_PER_SECOND'; 0045 const CALORIE_PER_HOUR = 'CALORIE_PER_HOUR'; 0046 const CALORIE_PER_MINUTE = 'CALORIE_PER_MINUTE'; 0047 const CALORIE_PER_SECOND = 'CALORIE_PER_SECOND'; 0048 const CENTIWATT = 'CENTIWATT'; 0049 const CHEVAL_VAPEUR = 'CHEVAL_VAPEUR'; 0050 const CLUSEC = 'CLUSEC'; 0051 const DECIWATT = 'DECIWATT'; 0052 const DEKAWATT = 'DEKAWATT'; 0053 const DYNE_CENTIMETER_PER_HOUR = 'DYNE_CENTIMETER_PER_HOUR'; 0054 const DYNE_CENTIMETER_PER_MINUTE = 'DYNE_CENTIMETER_PER_MINUTE'; 0055 const DYNE_CENTIMETER_PER_SECOND = 'DYNE_CENTIMETER_PER_SECOND'; 0056 const ERG_PER_HOUR = 'ERG_PER_HOUR'; 0057 const ERG_PER_MINUTE = 'ERG_PER_MINUTE'; 0058 const ERG_PER_SECOND = 'ERG_PER_SECOND'; 0059 const EXAWATT = 'EXAWATT'; 0060 const FEMTOWATT = 'FEMTOWATT'; 0061 const FOOT_POUND_FORCE_PER_HOUR = 'FOOT_POUND_FORCE_PER_HOUR'; 0062 const FOOT_POUND_FORCE_PER_MINUTE = 'FOOT_POUND_FORCE_PER_MINUTE'; 0063 const FOOT_POUND_FORCE_PER_SECOND = 'FOOT_POUND_FORCE_PER_SECOND'; 0064 const FOOT_POUNDAL_PER_HOUR = 'FOOT_POUNDAL_PER_HOUR'; 0065 const FOOT_POUNDAL_PER_MINUTE = 'FOOT_POUNDAL_PER_MINUTE'; 0066 const FOOT_POUNDAL_PER_SECOND = 'FOOT_POUNDAL_PER_SECOND'; 0067 const GIGAWATT = 'GIGAWATT'; 0068 const GRAM_FORCE_CENTIMETER_PER_HOUR = 'GRAM_FORCE_CENTIMETER_PER_HOUR'; 0069 const GRAM_FORCE_CENTIMETER_PER_MINUTE = 'GRAM_FORCE_CENTIMETER_PER_MINUTE'; 0070 const GRAM_FORCE_CENTIMETER_PER_SECOND = 'GRAM_FORCE_CENTIMETER_PER_SECOND'; 0071 const HECTOWATT = 'HECTOWATT'; 0072 const HORSEPOWER_INTERNATIONAL = 'HORSEPOWER_INTERNATIONAL'; 0073 const HORSEPOWER_ELECTRIC = 'HORSEPOWER_ELECTRIC'; 0074 const HORSEPOWER = 'HORSEPOWER'; 0075 const HORSEPOWER_WATER = 'HORSEPOWER_WATER'; 0076 const INCH_OUNCE_FORCE_REVOLUTION_PER_MINUTE = 'INCH_OUNCH_FORCE_REVOLUTION_PER_MINUTE'; 0077 const JOULE_PER_HOUR = 'JOULE_PER_HOUR'; 0078 const JOULE_PER_MINUTE = 'JOULE_PER_MINUTE'; 0079 const JOULE_PER_SECOND = 'JOULE_PER_SECOND'; 0080 const KILOCALORIE_PER_HOUR = 'KILOCALORIE_PER_HOUR'; 0081 const KILOCALORIE_PER_MINUTE = 'KILOCALORIE_PER_MINUTE'; 0082 const KILOCALORIE_PER_SECOND = 'KILOCALORIE_PER_SECOND'; 0083 const KILOGRAM_FORCE_METER_PER_HOUR = 'KILOGRAM_FORCE_METER_PER_HOUR'; 0084 const KILOGRAM_FORCE_METER_PER_MINUTE = 'KILOGRAM_FORCE_METER_PER_MINUTE'; 0085 const KILOGRAM_FORCE_METER_PER_SECOND = 'KILOGRAM_FORCE_METER_PER_SECOND'; 0086 const KILOPOND_METER_PER_HOUR = 'KILOPOND_METER_PER_HOUR'; 0087 const KILOPOND_METER_PER_MINUTE = 'KILOPOND_METER_PER_MINUTE'; 0088 const KILOPOND_METER_PER_SECOND = 'KILOPOND_METER_PER_SECOND'; 0089 const KILOWATT = 'KILOWATT'; 0090 const MEGAWATT = 'MEGAWATT'; 0091 const MICROWATT = 'MICROWATT'; 0092 const MILLION_BTU_PER_HOUR = 'MILLION_BTU_PER_HOUR'; 0093 const MILLIWATT = 'MILLIWATT'; 0094 const NANOWATT = 'NANOWATT'; 0095 const NEWTON_METER_PER_HOUR = 'NEWTON_METER_PER_HOUR'; 0096 const NEWTON_METER_PER_MINUTE = 'NEWTON_METER_PER_MINUTE'; 0097 const NEWTON_METER_PER_SECOND = 'NEWTON_METER_PER_SECOND'; 0098 const PETAWATT = 'PETAWATT'; 0099 const PFERDESTAERKE = 'PFERDESTAERKE'; 0100 const PICOWATT = 'PICOWATT'; 0101 const PONCELET = 'PONCELET'; 0102 const POUND_SQUARE_FOOR_PER_CUBIC_SECOND = 'POUND_SQUARE_FOOT_PER_CUBIC_SECOND'; 0103 const TERAWATT = 'TERAWATT'; 0104 const TON_OF_REFRIGERATION = 'TON_OF_REFRIGERATION'; 0105 const WATT = 'WATT'; 0106 const YOCTOWATT = 'YOCTOWATT'; 0107 const YOTTAWATT = 'YOTTAWATT'; 0108 const ZEPTOWATT = 'ZEPTOWATT'; 0109 const ZETTAWATT = 'ZETTAWATT'; 0110 0111 /** 0112 * Calculations for all power units 0113 * 0114 * @var array 0115 */ 0116 protected $_units = array( 0117 'ATTOWATT' => array('1.0e-18', 'aW'), 0118 'BTU_PER_HOUR' => array('0.29307197', 'BTU/h'), 0119 'BTU_PER_MINUTE' => array('17.5843182', 'BTU/m'), 0120 'BTU_PER_SECOND' => array('1055.059092', 'BTU/s'), 0121 'CALORIE_PER_HOUR' => array(array('' => '11630', '*' => '1.0e-7'), 'cal/h'), 0122 'CALORIE_PER_MINUTE' => array(array('' => '697800', '*' => '1.0e-7'), 'cal/m'), 0123 'CALORIE_PER_SECOND' => array(array('' => '41868000', '*' => '1.0e-7'), 'cal/s'), 0124 'CENTIWATT' => array('0.01', 'cW'), 0125 'CHEVAL_VAPEUR' => array('735.49875', 'cv'), 0126 'CLUSEC' => array('0.0000013332237', 'clusec'), 0127 'DECIWATT' => array('0.1', 'dW'), 0128 'DEKAWATT' => array('10', 'daW'), 0129 'DYNE_CENTIMETER_PER_HOUR' => array(array('' => '1.0e-7','/' => '3600'), 'dyn cm/h'), 0130 'DYNE_CENTIMETER_PER_MINUTE' => array(array('' => '1.0e-7','/' => '60'), 'dyn cm/m'), 0131 'DYNE_CENTIMETER_PER_SECOND' => array('1.0e-7', 'dyn cm/s'), 0132 'ERG_PER_HOUR' => array(array('' => '1.0e-7','/' => '3600'), 'erg/h'), 0133 'ERG_PER_MINUTE' => array(array('' => '1.0e-7','/' => '60'), 'erg/m'), 0134 'ERG_PER_SECOND' => array('1.0e-7', 'erg/s'), 0135 'EXAWATT' => array('1.0e+18', 'EW'), 0136 'FEMTOWATT' => array('1.0e-15', 'fW'), 0137 'FOOT_POUND_FORCE_PER_HOUR' => array(array('' => '1.3558179', '/' => '3600'), 'ft lb/h'), 0138 'FOOT_POUND_FORCE_PER_MINUTE' => array(array('' => '1.3558179', '/' => '60'), 'ft lb/m'), 0139 'FOOT_POUND_FORCE_PER_SECOND' => array('1.3558179', 'ft lb/s'), 0140 'FOOT_POUNDAL_PER_HOUR' => array(array('' => '0.04214011','/' => '3600'), 'ft pdl/h'), 0141 'FOOT_POUNDAL_PER_MINUTE' => array(array('' => '0.04214011', '/' => '60'), 'ft pdl/m'), 0142 'FOOT_POUNDAL_PER_SECOND' => array('0.04214011', 'ft pdl/s'), 0143 'GIGAWATT' => array('1.0e+9', 'GW'), 0144 'GRAM_FORCE_CENTIMETER_PER_HOUR' => array(array('' => '0.0000980665','/' => '3600'), 'gf cm/h'), 0145 'GRAM_FORCE_CENTIMETER_PER_MINUTE' => array(array('' => '0.0000980665','/' => '60'), 'gf cm/m'), 0146 'GRAM_FORCE_CENTIMETER_PER_SECOND' => array('0.0000980665', 'gf cm/s'), 0147 'HECTOWATT' => array('100', 'hW'), 0148 'HORSEPOWER_INTERNATIONAL' => array('745.69987', 'hp'), 0149 'HORSEPOWER_ELECTRIC' => array('746', 'hp'), 0150 'HORSEPOWER' => array('735.49875', 'hp'), 0151 'HORSEPOWER_WATER' => array('746.043', 'hp'), 0152 'INCH_OUNCH_FORCE_REVOLUTION_PER_MINUTE' => array('0.00073948398', 'in ocf/m'), 0153 'JOULE_PER_HOUR' => array(array('' => '1', '/' => '3600'), 'J/h'), 0154 'JOULE_PER_MINUTE' => array(array('' => '1', '/' => '60'), 'J/m'), 0155 'JOULE_PER_SECOND' => array('1', 'J/s'), 0156 'KILOCALORIE_PER_HOUR' => array('1.163', 'kcal/h'), 0157 'KILOCALORIE_PER_MINUTE' => array('69.78', 'kcal/m'), 0158 'KILOCALORIE_PER_SECOND' => array('4186.8', 'kcal/s'), 0159 'KILOGRAM_FORCE_METER_PER_HOUR' => array(array('' => '9.80665', '/' => '3600'), 'kgf m/h'), 0160 'KILOGRAM_FORCE_METER_PER_MINUTE' => array(array('' => '9.80665', '/' => '60'), 'kfg m/m'), 0161 'KILOGRAM_FORCE_METER_PER_SECOND' => array('9.80665', 'kfg m/s'), 0162 'KILOPOND_METER_PER_HOUR' => array(array('' => '9.80665', '/' => '3600'), 'kp/h'), 0163 'KILOPOND_METER_PER_MINUTE' => array(array('' => '9.80665', '/' => '60'), 'kp/m'), 0164 'KILOPOND_METER_PER_SECOND' => array('9.80665', 'kp/s'), 0165 'KILOWATT' => array('1000', 'kW'), 0166 'MEGAWATT' => array('1000000', 'MW'), 0167 'MICROWATT' => array('0.000001', 'µW'), 0168 'MILLION_BTU_PER_HOUR' => array('293071.07', 'mio BTU/h'), 0169 'MILLIWATT' => array('0.001', 'mM'), 0170 'NANOWATT' => array('1.0e-9', 'nN'), 0171 'NEWTON_METER_PER_HOUR' => array(array('' => '1', '/' => '3600'), 'Nm/h'), 0172 'NEWTON_METER_PER_MINUTE' => array(array('' => '1', '/' => '60'), 'Nm/m'), 0173 'NEWTON_METER_PER_SECOND' => array('1', 'Nm/s'), 0174 'PETAWATT' => array('1.0e+15', 'PW'), 0175 'PFERDESTAERKE' => array('735.49875', 'PS'), 0176 'PICOWATT' => array('1.0e-12', 'pW'), 0177 'PONCELET' => array('980.665', 'p'), 0178 'POUND_SQUARE_FOOT_PER_CUBIC_SECOND' => array('0.04214011', 'lb ft²/s³'), 0179 'TERAWATT' => array('1.0e+12', 'TW'), 0180 'TON_OF_REFRIGERATION' => array('3516.85284', 'RT'), 0181 'WATT' => array('1', 'W'), 0182 'YOCTOWATT' => array('1.0e-24', 'yW'), 0183 'YOTTAWATT' => array('1.0e+24', 'YW'), 0184 'ZEPTOWATT' => array('1.0e-21', 'zW'), 0185 'ZETTAWATT' => array('1.0e+21', 'ZW'), 0186 'STANDARD' => 'WATT' 0187 ); 0188 }