Force.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Measure
  17. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  18. * @license http://framework.zend.com/license/new-bsd New BSD License
  19. * @version $Id$
  20. */
  21. /**
  22. * Implement needed classes
  23. */
  24. #require_once 'Zend/Measure/Abstract.php';
  25. #require_once 'Zend/Locale.php';
  26. /**
  27. * Class for handling force conversions
  28. *
  29. * @category Zend
  30. * @package Zend_Measure
  31. * @subpackage Zend_Measure_Force
  32. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  33. * @license http://framework.zend.com/license/new-bsd New BSD License
  34. */
  35. class Zend_Measure_Force extends Zend_Measure_Abstract
  36. {
  37. const STANDARD = 'NEWTON';
  38. const ATTONEWTON = 'ATTONEWTON';
  39. const CENTINEWTON = 'CENTINEWTON';
  40. const DECIGRAM_FORCE = 'DECIGRAM_FORCE';
  41. const DECINEWTON = 'DECINEWTON';
  42. const DEKAGRAM_FORCE = 'DEKAGRAM_FORCE';
  43. const DEKANEWTON = 'DEKANEWTON';
  44. const DYNE = 'DYNE';
  45. const EXANEWTON = 'EXANEWTON';
  46. const FEMTONEWTON = 'FEMTONEWTON';
  47. const GIGANEWTON = 'GIGANEWTON';
  48. const GRAM_FORCE = 'GRAM_FORCE';
  49. const HECTONEWTON = 'HECTONEWTON';
  50. const JOULE_PER_METER = 'JOULE_PER_METER';
  51. const KILOGRAM_FORCE = 'KILOGRAM_FORCE';
  52. const KILONEWTON = 'KILONEWTON';
  53. const KILOPOND = 'KILOPOND';
  54. const KIP = 'KIP';
  55. const MEGANEWTON = 'MEGANEWTON';
  56. const MEGAPOND = 'MEGAPOND';
  57. const MICRONEWTON = 'MICRONEWTON';
  58. const MILLINEWTON = 'MILLINEWTON';
  59. const NANONEWTON = 'NANONEWTON';
  60. const NEWTON = 'NEWTON';
  61. const OUNCE_FORCE = 'OUNCE_FORCE';
  62. const PETANEWTON = 'PETANEWTON';
  63. const PICONEWTON = 'PICONEWTON';
  64. const POND = 'POND';
  65. const POUND_FORCE = 'POUND_FORCE';
  66. const POUNDAL = 'POUNDAL';
  67. const STHENE = 'STHENE';
  68. const TERANEWTON = 'TERANEWTON';
  69. const TON_FORCE_LONG = 'TON_FORCE_LONG';
  70. const TON_FORCE = 'TON_FORCE';
  71. const TON_FORCE_SHORT = 'TON_FORCE_SHORT';
  72. const YOCTONEWTON = 'YOCTONEWTON';
  73. const YOTTANEWTON = 'YOTTANEWTON';
  74. const ZEPTONEWTON = 'ZEPTONEWTON';
  75. const ZETTANEWTON = 'ZETTANEWTON';
  76. /**
  77. * Calculations for all force units
  78. *
  79. * @var array
  80. */
  81. protected $_units = array(
  82. 'ATTONEWTON' => array('1.0e-18', 'aN'),
  83. 'CENTINEWTON' => array('0.01', 'cN'),
  84. 'DECIGRAM_FORCE' => array('0.000980665', 'dgf'),
  85. 'DECINEWTON' => array('0.1', 'dN'),
  86. 'DEKAGRAM_FORCE' => array('0.0980665', 'dagf'),
  87. 'DEKANEWTON' => array('10', 'daN'),
  88. 'DYNE' => array('0.00001', 'dyn'),
  89. 'EXANEWTON' => array('1.0e+18', 'EN'),
  90. 'FEMTONEWTON' => array('1.0e-15', 'fN'),
  91. 'GIGANEWTON' => array('1.0e+9', 'GN'),
  92. 'GRAM_FORCE' => array('0.00980665', 'gf'),
  93. 'HECTONEWTON' => array('100', 'hN'),
  94. 'JOULE_PER_METER' => array('1', 'J/m'),
  95. 'KILOGRAM_FORCE' => array('9.80665', 'kgf'),
  96. 'KILONEWTON' => array('1000', 'kN'),
  97. 'KILOPOND' => array('9.80665', 'kp'),
  98. 'KIP' => array('4448.2216', 'kip'),
  99. 'MEGANEWTON' => array('1000000', 'Mp'),
  100. 'MEGAPOND' => array('9806.65', 'MN'),
  101. 'MICRONEWTON' => array('0.000001', 'µN'),
  102. 'MILLINEWTON' => array('0.001', 'mN'),
  103. 'NANONEWTON' => array('0.000000001', 'nN'),
  104. 'NEWTON' => array('1', 'N'),
  105. 'OUNCE_FORCE' => array('0.27801385', 'ozf'),
  106. 'PETANEWTON' => array('1.0e+15', 'PN'),
  107. 'PICONEWTON' => array('1.0e-12', 'pN'),
  108. 'POND' => array('0.00980665', 'pond'),
  109. 'POUND_FORCE' => array('4.4482216', 'lbf'),
  110. 'POUNDAL' => array('0.13825495', 'pdl'),
  111. 'STHENE' => array('1000', 'sn'),
  112. 'TERANEWTON' => array('1.0e+12', 'TN'),
  113. 'TON_FORCE_LONG' => array('9964.016384', 'tnf'),
  114. 'TON_FORCE' => array('9806.65', 'tnf'),
  115. 'TON_FORCE_SHORT' => array('8896.4432', 'tnf'),
  116. 'YOCTONEWTON' => array('1.0e-24', 'yN'),
  117. 'YOTTANEWTON' => array('1.0e+24', 'YN'),
  118. 'ZEPTONEWTON' => array('1.0e-21', 'zN'),
  119. 'ZETTANEWTON' => array('1.0e+21', 'ZN'),
  120. 'STANDARD' => 'NEWTON'
  121. );
  122. }