'; $standAlone = false; // Displays outside of Saratoga template $autoRefresh = true; // Use Autorefresh? true or false -- Determines whether AutoRefresh even appears $autoRefreshTime = 8; // Number of minutes between autorefreshes. IMPORTANT: use 2, 3, 4, 5, 6, 8, 10, 15, 20, or 30 ONLY!!! $autoRefreshOff = false; // Begin with Autorefresh Off? true or false -- 'OFF' or 'ON" $imageWidth = ($standAlone?1200:600); // Default image width $satBand = 'Dust'; // Default sector type is set here $sector = 'CONUS'; // IMPORTANT!!! Default sector location is set here $bgndColor = 'silver'; // Set HAniS Background Color Here $btnColor = 'darkslategray'; // Set Button Color here $btnTextColor = 'white'; // Set Button Text Color here $wideScreen = false; // Widescreen default ############################ New in Version 2 ########################## $pauseSeconds = 2; // Pause on last image, in seconds $animRate = 20; // Frame Rate of animation: 5 is glacial, 10 is slow, 15 is leisurely, 20 is good, and 50 is fast - set with integer $numbImages = 20; // Number of Satellite Images to Animate - 3 to around 25 ############################ New in Version 3 ########################## $smoothingOn = true; // Enable image smoothing - new in HAniS 2.5 ######################## New in Version 20180114 ####################### $doDebug = false; // Enable/disable Debug output $debugText = ''; // Initialize $checkFiles = false; // Enable/disable image file existence checking $noBandChange = false; // Enable/disable satellite band switching $addTime = false; // Add Zulu time to images $addTimePixels = 70; // Pixel Height to add for image time display $useUTC = true; // Use UTC time rather than Zulu time (UTC adds seconds counter) $restrictWidth = true; // Width restriction is in effect $maxWidth = 1205; // Maximum width allowed $wideScreen = false; // Test Saratoga wideScreen settings $satBandisNumeric = ($satBand!='FD'&&$satBand!='GEOCOLOR'&&$satBand!='AirMass'&&$satBand!='Sandwich'&&$satBand!='DayCloudPhase'&&$satBand!='NightMicrophysics'&&$satBand!='FireTemperature'&&$satBand!='EXTENT3'&&$satBand!='CONUS'&&$satBand!='Dust')?true:false; $satBand = $satBandisNumeric?($satBand<10?('0'.intval($satBand)):$satBand):$satBand; } /************************ End Test Parameters for Debugging Purposes ********************/ $wideScreen = ((isset($_SESSION['CSSwidescreen'])&&$_SESSION['CSSwidescreen']==true)?true:false); if (isset($_POST['sector'])) { $sector = $_POST['sector']; } if (isset($_POST['satBand'])) { $satBand = $_POST['satBand']; } if (isset($_POST['imageWidth'])) { $imageWidth = $_POST['imageWidth']; } if (isset($_POST['imageHeight'])) { $imageHeight = $_POST['imageHeight']; } if (isset($_POST['iframeWidth'])) { $iframeWidth = $_POST['iframeWidth']; } if (isset($_POST['iframeHeight'])) { $iframeHeight = $_POST['iframeHeight']; } if (isset($_POST['autoRefresh'])) { $autoRefresh = $_POST['autoRefresh']; } if (isset($_POST['autoRefreshTime'])) { $autoRefreshTime = $_POST['autoRefreshTime']; } if (isset($_POST['bgndColor'])) { $bgndColor = $_POST['bgndColor']; } if (isset($_POST['autoRefreshOff'])) { $autoRefreshOff = $_POST['autoRefreshOff']; } if (isset($_POST['btnColor'])) { $btnColor = $_POST['btnColor']; } if (isset($_POST['btnTextColor'])) { $btnTextColor = $_POST['btnTextColor']; } if (isset($_POST['animRate'])) { $animRate = $_POST['animRate']; } if (isset($_POST['pauseSeconds'])) { $pauseSeconds = $_POST['pauseSeconds']; } if (isset($_POST['numbImages'])) { $numbImages = $_POST['numbImages']; } if (isset($_POST['smoothingOn'])) { $smoothingOn = $_POST['smoothingOn']; } if (isset($_POST['doDebug'])) { $doDebug = $_POST['doDebug']; } if (isset($_POST['checkFiles'])) { $checkFiles = $_POST['checkFiles']; } if (isset($_POST['noBandChange'])) { $noBandChange = $_POST['noBandChange']; } if (isset($_POST['noBandChange'])) { $noBandChange = $_POST['noBandChange']; } if (isset($_POST['wideScreen'])) { $wideScreen = $_POST['wideScreen']; } if (isset($_POST['addTime'])) { $addTime = $_POST['addTime']; } if (isset($_POST['addTimePixels'])) { $addTimePixels = $_POST['addTimePixels']; } if (isset($_POST['useUTC'])) { $useUTC = $_POST['useUTC']; } if (isset($_POST['restrictedWidth'])) { $restrictWidth = $_POST['restrictedWidth']; } if (isset($_POST['maxWidth'])) { $maxWidth = $_POST['maxWidth']; } if (isset($_POST['standAlone'])) { $standAlone = $_POST['standAlone']; } /* Debug Text * if ($doDebug) { $debugText = ''; // Initialize if (!isset($_POST['wideScreen'])) { echo '$_POST[\'wideScreen\']) is not set!
'; } if (!isset($_POST['noBandChange'])) { echo '$_POST[\'noBandChange\'] is not set!
'; } else echo '$_POST[\'noBandChange\'] is set!
'; } if (!isset($wideScreen)) { if ($doDebug) $debugText .= '$wideScreen is not set!
'; $wideScreen = false; } if ($doDebug) { $debugText .= 'isset($_SESSION[CSSwidescreen]): '.((isset($_SESSION["CSSwidescreen"]))?'true':'false').'
'; $debugText .= '$wideScreen: '.((isset($_SESSION["CSSwidescreen"])&&$_SESSION["CSSwidescreen"]==true)?'true':'false').'
'; if (isset($wideScreen)) { $debugText .= (', $wideScreen0: '.($wideScreen?'true':'false')).'
'; } } /* End Debug Text */ $sectorTypes = array('standard', 'FD', 'CONUS','gm-eus-cam-mex-car','taw-eep-nsa-ssa','can'); // Pointers to the various possible image dimensions if ($sector=='FD') $ourSectorType = $sectorTypes[1]; // Logic to select our array of dimensions else if ($sector=='CONUS') $ourSectorType = $sectorTypes[2]; else if ($sector=='cam'||$sector=='eus'||$sector=='car'||$sector=='gm'||$sector=='mex') $ourSectorType = $sectorTypes[3]; else if ($sector=='taw'||$sector=='eep'||$sector=='nsa'||$sector=='ssa') $ourSectorType = $sectorTypes[4]; else if ($sector=='can') $ourSectorType = $sectorTypes[5]; else $ourSectorType = $sectorTypes[0]; $satBandSectors = array( // Array of arrays of possible image dimensions 'standard'=>array( // The US Regional Image Dimensions 'widthA'=>1200, 'iframeWidthA'=>1242, 'heightA'=>1200, 'iframeHeightA'=>1200, 'widthB'=>600, 'iframeWidthB'=>600, 'heightB'=>600, 'iframeHeightB'=>600), 'FD'=>array( // The Full Disk Dimensions 'widthA'=>678, 'iframeWidthA'=>678, 'heightA'=>678, 'iframeHeightA'=>678, 'widthB'=>339, 'iframeWidthB'=>339, 'heightB'=>339, 'iframeHeightB'=>339), 'CONUS'=>array( // The Continental US Image Dimensions 'widthA'=>1250, 'iframeWidthA'=>1292, 'heightA'=>750, 'iframeHeightA'=>750, 'widthB'=>625, 'iframeWidthB'=>625, 'heightB'=>375, 'iframeHeightB'=>375), 'gm-eus-cam-mex-car'=>array( // The Gulf of Mexico, Caribbean, Eastern US Image Dimensions 'widthA'=>1000, 'iframeWidthA'=>1042, 'heightA'=>1000, 'iframeHeightA'=>1000, 'widthB'=>500, 'iframeWidthB'=>500, 'heightB'=>500, 'iframeHeightB'=>500), 'taw-eep-nsa-ssa'=>array( // The Tropical Atlantic - Wide Dimensions 'widthA'=>900, 'iframeWidthA'=>942, 'heightA'=>540, 'iframeHeightA'=>540, 'widthB'=>450, 'iframeWidthB'=>450, 'heightB'=>270, 'iframeHeightB'=>270), 'can'=>array( // Canadian Dimensions 'widthA'=>1125, 'iframeWidthA'=>1167, 'heightA'=>560, 'iframeHeightA'=>602, 'widthB'=>560, 'iframeWidthB'=>602, 'heightB'=>280, 'iframeHeightB'=>322) ); if ($sector=='FD') $ourSectorType = $sectorTypes[1]; // Logic to select our array of dimensions else if ($sector=='CONUS') $ourSectorType = $sectorTypes[2]; else if ($sector=='cam'||$sector=='eus'||$sector=='car'||$sector=='gm'||$sector=='mex') $ourSectorType = $sectorTypes[3]; else if ($sector=='taw'||$sector=='eep'||$sector=='nsa'||$sector=='ssa') $ourSectorType = $sectorTypes[4]; else if ($sector=='can') $ourSectorType = $sectorTypes[5]; else $ourSectorType = $sectorTypes[0]; $imageWidth = $satBandSectors[$ourSectorType][($wideScreen||$standAlone)?'widthA':'widthB']; $iframeWidth = $satBandSectors[$ourSectorType][($wideScreen||$standAlone)?'iframeWidthA':'iframeWidthB']; $imageHeight = $satBandSectors[$ourSectorType][($wideScreen||$standAlone)?'heightA':'heightB']; $iframeHeight = $satBandSectors[$ourSectorType][($wideScreen||$standAlone)?'iframeHeightA':'iframeHeightB']; /* Debug Code * if ($doDebug) { var_dump($satBandSectors); var_dump($satBandSectors['standard']['iframeHeightB']); foreach ($satBandSectors as $key1=>$value1) { foreach ($value1 as $key=>$value) $debugText .= '$key1: '.$key1.'=> '.$key.': '.$value.'
'; } $debugText .= '$ourSectorType: '.$ourSectorType.'
'; var_dump($satBandSectors[$ourSectorType]['iframeHeightB']); // exit; } /* End Debug Code */ /* Debug Code * if ($doDebug) { $debugText .= '$satBand: '.$satBand.', $sector: '.$sector.', $ourSectorType: '.$ourSectorType.'
'; $debugText .= '$imageWidth: '.$imageWidth.', $iframeWidth: '.$iframeWidth.', $imageHeight: '.$imageHeight.', $iframeHeight: '.$iframeHeight.'
'; echo $debugText; exit; } /* End Debug Code */ ?>
Satellite Band   Satellite View   Image Number
AutoRefresh   AutoRefresh Interval
 
$maxWidth)&&$restrictWidth&&($standAlone||$wideScreen)) { $ratioAdjust = $maxWidth/$imageWidth; $iframeWidth = ceil($iframeWidth*$ratioAdjust); $iframeHeight = ceil($iframeHeight*$ratioAdjust); } /* Debug Code */ if ($doDebug) { var_dump($satBandSectors); var_dump($satBandSectors['standard']['iframeHeightB']); foreach ($satBandSectors as $key1=>$value1) { foreach ($value1 as $key=>$value) $debugText .= '$key1: '.$key1.'=> '.$key.': '.$value.'
'; } $debugText .= '$ourSectorType: '.$ourSectorType.'
'; var_dump($satBandSectors[$ourSectorType]['iframeHeightB']); // exit; } /* End Debug Code */ /* Debug Code */ if ($doDebug) { $debugText .= '$imageWidth: '.$imageWidth.', $iframeWidth: '.$iframeWidth.', $imageHeight: '.$imageHeight.', $iframeHeight: '.$iframeHeight.'
'; echo $debugText; exit; } /* End Debug Code */ $jsConstants = array( 'var imageWidth = "'.$imageWidth.'";', 'var imageHeight = "'.$imageHeight.'";', 'var iframeWidth = "'.$iframeWidth.'";', 'var iframeHeight = "'.$iframeHeight.'";', 'var autoRefresh = "'.$autoRefresh.'";', 'var bgndColor = "'.$bgndColor.'";', 'var restrictedWidth = "'.$restrictWidth.'";', 'var maxWidth = "'.$maxWidth.'";', 'var btnColor = "'.$btnColor.'";', 'var btnTextColor = "'.$btnTextColor.'";', 'var animRate = "'.$animRate.'";', 'var pauseSeconds = "'.$pauseSeconds.'";', 'var autoRefreshOff = "'.($autoRefreshOff?'1':'0').'";', 'var smoothingOn = "'.($smoothingOn?'1':'0').'";'. 'var doDebug = "'.($doDebug?'1':'0').'";'. 'var standAlone = "'.($standAlone?'1':'0').'";'. 'var checkFiles = "'.($checkFiles?'1':'0').'";', 'var noBandChange = "'.($noBandChange?'1':'0').'";', 'var wideScreen = "'.($wideScreen?'1':'0').'";', 'var addTime = "'.($addTime?'1':'0').'";', 'var addTimePixels = "'.$addTimePixels.'";', 'var useUTC = "'.$useUTC.'";' ); ?> '; // Debug Code if ($numbImages>$imageMax) $numbImages = $imageMax; function do_nothing(){} do_nothing(); ?>
'; if($sector=='CONUS') { echo 'Latest 2500x1500 Pixel Image'; } else if($sector=='AirMass') { echo 'Latest 2500x1500 Pixel Image'; } else if ($sector=='FD') { echo 'Latest 5424x5424 (16+MB) Pixel Image'; } else if ($sector=='taw') { echo 'Latest 3600x2160 or 7200x4340 (26+MB!) Pixel Image'; } else if ($sector=='car') { echo 'Latest 2000x2000 or 4000x4000 Pixel Image'; } else if ($sector=='eus'||$sector=='gm') { echo 'Latest 2000x2000 Pixel Image'; // } } echo '
'; } if ($doDebug) { echo '$imageWidth: '.$imageWidth.', $iframeWidth: '.$iframeWidth.', $imageHeight: '.$imageHeight.', $iframeHeight: '.$iframeHeight.', $wideScreen: '.($wideScreen?'true':'false').'
'; } if (!$standAlone&&!$wideScreen) { echo (file_exists('wxGOES16-HAniSLoops-SA.php'))?'
Larger Image Loop

':''; }?> The date is currently '.gmdate("M j, Y").'. The time is '; echo(''.gmdate("Hi").' Zulu'); if ($useUTC) echo (', '.gmdate("H:i:s").' UTC'); echo '.
'; }?>
The above images are produced by NOAA GOES Satellite Distribution Center -- Animation by HAniS ©2014- by Tom Whittaker
Script by SELincoln Weather and Saratoga-Weather.Org
'; } ?>
'.$debugText.'
';?>