InfoProvider.php 1 KB
<?php
/**
 * @class InfoProvider 
 * @version  $Id: InfoProvider.php 2662 2014-11-26 09:45:33Z natacha $
 * 
 */
class InfoProvider {
// units conversion: 
// km2Re = 1./6371.0; km2au = 1./1.5 *10^9; km2rma (mars) 1./3396.0;  km2rv  1.0/6052.0;   km2rmе 1.0/2439.7 
      public $realConversion = array( 'km2re' =>  '1.5696e-4', 'K2eV' => '8.622e-5', 'MK2eV' => '86.2069',
				      'km2au' =>  '6.68e-9', 'km2rma' => '2.945e-4', 'km2rv' => '1.652e-4',
                                      'rma2km' => '3396.0', 'rv2km' => '6052.0', 'rga2km' => '2631.0', 
                                      're2km' => '6371.0', 'km2rmе' => '4.099e-4','rme2km' => '2440.0',
                                      'mbar2npa' => '1.0e11', 'a2na' => '1.0e9');

      public $Constants;


      function __construct() {
	  $this->Constants = array();
	}

//TODO constants => from constants.xml

     public function getConversion($key) {
        if ($this->realConversion[$key]) return $this->realConversion[$key];
        return -1;
    }
 }
?>