Exemplo n.º 1
0
if (isset($_GET['map'])) {
    $map = explode(',', $_GET['map']);
} else {
    $map = array();
}
$timestmp = strtotime($date);
$date_array = getdate($timestmp);
$start_day = $date_array['mday'];
$start_month = $date_array['mon'];
$start_year = $date_array['year'];
// determination du numero de rotation correspondant a la date
// et des parametres du soleil
if (checkdate($start_month, $start_day, $start_year)) {
    $dj = new Datej();
    $dj->initFromCal($start_year, $start_month, $start_day, $date_array['hours'], $date_array['minutes']);
    solphy($dj->dj, $lo, $bo, $po);
    $bid = debutrot($dj->dj, $datedeb, $numrot);
} else {
    exit(0);
}
?>
<!--<script type="text/javascript" charset="utf-8" src="js/DataTables-1.9.0/media/js/jquery.dataTables.min.js"></script>-->
<script type="text/javascript">
$(function(){
	$( ".portlet_<?php 
echo $feature_type;
?>
" ).addClass( "ui-widget ui-widget-content ui-helper-clearfix ui-corner-all" )
	//$( ".portlet" ).addClass( "ui-widget ui-widget-content ui-helper-clearfix ui-corner-all" )
		.find( ".portlet-header" )
			.addClass( "ui-widget ui-corner-all" )
Exemplo n.º 2
0
function pix2car($pixel, $naxis1, $naxis2, $cdelt1, $cdelt2, $center_x, $center_y, $rsun, $date_obs)
{
    //Calculate R0 value from Sun radius for arcmin2hel()
    $Robs = 1.0 / tan(deg2rad($cdelt1 * $rsun / 3600));
    // calcul de B0
    $timestmp = strtotime($date_obs);
    $date_array = getdate($timestmp);
    //	print_r($date_array);
    //	print "<BR>";
    $dj = new Datej();
    $dj->initFromCal($date_array['year'], $date_array['mon'], $date_array['mday'], $date_array['hours'], $date_array['minutes']);
    solphy($dj->dj, $lo, $b0, $po);
    //print "lo = ".rad2deg($lo).", b0 = ".rad2deg($b0).", po = ".rad2deg($po)."<BR>";
    $arrx = $pixel[0];
    $arry = $pixel[1];
    //  Convert pixel to arcseconds
    $ix = $cdelt1 * ($arrx - $center_x);
    $iy = $cdelt2 * ($arry - $center_y);
    //print "in arcsec ix = ".$ix.", iy = ".$iy.", Robs = ".$Robs."<BR>";
    $hel_coord = ARCMIN2HEL($ix / 60.0, $iy / 60.0, $Robs, rad2deg($b0));
    // problem for structure on 2 rotations
    $lon = fmod(fmod($hel_coord[1] + 360.0, 360.0) + rad2deg($lo), 360.0);
    /*	if (rad2deg($lo) < 90) {
    		// rotation R-1
    		if ($lon < 90 && $lon_c > 270) $lon = $lon + 360;
    		// rotation R
    		if ($lon > 270 && $lon_c < 90) $lon = $lon - 360;
    	}
    	if (rad2deg($lo) > 270) {
    		// rotation R
    		if ($lon > 270 && $lon_c < 90) $lon = $lon - 360;
    		// rotation R+1
    		if ($lon < 90 && $lon_c > 270) $lon = $lon + 360;
    	}*/
    $tab_out = array($lon, $hel_coord[0]);
    //print "pix2carr result:<BR>";
    //print_r($tab_out);
    //print "<BR>";
    //	$tab_out  = array(fmod(fmod($hel_coord[1] + 360., 360.) + rad2deg($lo), 360.), $hel_coord[0]);
    //	$tab_out  = array(fmod($hel_coord[1] + rad2deg($lo), 360.), $hel_coord[0]);
    //$tab_out  = array(fmod($hel_coord[1] + 360., 360.) + rad2deg($lo), $hel_coord[0]);
    //$tab_out = array($hel_coord[1], $hel_coord[0]);
    return $tab_out;
}