';
} ?>
';
$doDebug = false; // Enable Debugging
$standAlone = false; // Displays outside Saratoga template
$sector = 'car'; // Default sector type is set here
$sector = 'umv'; // Default sector type is set here
/* USE ONE of THESE for $sector!
"pnw" is Pacific Northwest
"nr" is Northern Rockies
"umv" is Upper Mississippi Valley
"cgl" is Great Lakes
"ne" is Northeast
"psw" is Pacific Southwest
"sr" is Southern Rockies
"sp" is Southern Plains
"smv" is Southern Mississippi Valley
"se" is Southeast
"pr" is Puerto Rico
The below $sectors WILL NOT WORK in the 'index.php' display:
"CONUS" is Continental US
"FD" is Full Disk
"taw" is Tropical Atlantic-Wide
"gm" is Gulf of Mexico
"car" is Caribbean
"eus" is U.S. Atlantic Coast
"cam" is Central America
"eep" is Equatorial Eastern Pacific
"eus" is Eastern US
"mex" is Mexico
"nsa" is Northern South America
"ssa" is Southern South America
*/
$satBand = 'GEOCOLOR'; // IMPORTAMT!!! Default image type is set here
$satBandisNumeric = ($satBand!='GEOCOLOR'&&$satBand!='AirMass'&&$satBand!='Sandwich'&&$satBand!='DayCloudPhase'&&$satBand!='NightMicrophysics')?true:false;
$satBand = $satBandisNumeric?($satBand<10?('0'.intval($satBand)):$satBand):$satBand;
// $autoRefresh = true; // Use Autorefresh? true or false -- Determines whether AutoRefresh even appears
// $autoRefreshTime = 10; // 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"
$bgndColor = 'silver'; // Set HAniS Background Color Here
$btnColor = 'darkslategray'; // Set Button Color here
$btnTextColor = 'white'; // Set Button Text Color here
$pauseSeconds = 2; // Pause on last image, in seconds
$animRate = 25; // 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 Radar Images to Animate - 3 to around 25
$smoothingOn = true; // Enable image smoothing - new in HAniS 2.5
$checkFiles = false; // Check images before adding them to the filename list?
$addTime = false; // Add date & time to images
$addTimePixels = 70; // Add height for image date/times
$wideScreen = false;
$restrictWidth = true; // Width restriction is in effect
$maxWidth = 1205; // Maximum width allowed
/************************ End Parameters for 'Index.php' Embedding ********************/
$sectorTypes = array('standard', 'FD', 'CONUS','gm-eus-eep-cam-mex-car','taw-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=='eep'||$sector=='gm'||$sector=='mex') $ourSectorType = $sectorTypes[3];
else if ($sector=='taw'||$sector=='nsa'||$sector=='ssa') $ourSectorType = $sectorTypes[4];
else if ($sector=='can') $ourSectorType = $sectorTypes[5];
else $ourSectorType = $sectorTypes[0];
$sectorDimensions = array('width','height');
$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'=>300,
'iframeWidthB'=>320,
'heightB'=>300,
'iframeHeightB'=>240),
'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-eep-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-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)
);
/* Debug Code */
if ($doDebug) {
var_dump($satBandSectors);
var_dump($satBandSectors['standard']['iframeHeightB']);
foreach ($satBandSectors as $key1=>$value1) {
foreach ($value1 as $key=>$value)
echo '$key1: '.$key1.'=> '.$key.': '.$value.'
';
}
echo '$ourSectorType: '.$ourSectorType.'
';
var_dump($satBandSectors[$ourSectorType]['iframeHeightB']);
// exit;
}
/* End Debug Code */
$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'];
$ratioAdjust = 1;
$ratioAdjust2 = 1;
$maxHeight = $imageHeight;
if (240<$imageHeight) {
$ratioAdjust = $iframeHeight/$imageHeight;
$iframeHeight = ceil($iframeHeight*$ratioAdjust);
}
if (320<$imageWidth) {
$ratioAdjust2 = $iframeWidth/$imageWidth;
$iframeWidth = ceil($iframeWidth*$ratioAdjust2);
}
/* Debug Code */
if ($doDebug) {
$debugText .= '$satBand: '.$satBand.', $sector: '.$sector.', $ourSectorType: '.$ourSectorType.'
';
$debugText .= '$imageWidth: '.$imageWidth.', $iframeWidth: '.$iframeWidth.', $imageHeight: '.$imageHeight.', $iframeHeight: '.$iframeHeight.', $ratioAdjust: '.$ratioAdjust.', $ratioAdjust2: '.$ratioAdjust2.'
';
// exit;
}
/* End Debug Code */
?>
Starting \'handiv\' declaration
';
}
$fileNameList = '';
$fileTimes = '';
get_file_names($sector,', ',$imageWidth,$imageHeight);
if ($doDebug) $debugText .= '
Raw FilenameList:
'.$fileNameList.'
';
$fileNames = $fileNameList.' ';
if ($doDebug) {
$debugText .= '
Filenames:
'.$fileNames.'
';
$debugText .= 'Filetimes: '.$fileTimes.'
';
}
if ($fileNames=='Satellite Images Currently Unavailable!'||$fileNames=='Too Many Images Requested') {
print ('
'.$fileNames.'
');
exit;
}
$iframeHeight += $addTime?$addTimePixels:45;
?>