'; // 0 date (always dd/mm/yy) $RT_timehhmmss = '<#timehhmmss>'; // 1 time (always hh:mm:ss) $RT_timehhmm = $RT_time = substr($RT_timehhmmss,0,5); // 1 (hh:mm) $RT_temp = $RT_temperature = '<#temp>'; // 2 outside temperature $RT_hum = $RT_humidity = '<#hum>'; // 3 relative humidity $RT_dew = $RT_dewpt = '<#dew>'; // 4 dewpoint $RT_wspeed = $RT_avgspd = '<#wspeed>'; // 5 wind speed (average) $RT_wlatest = '<#wlatest>'; // 6 latest wind speed reading $RT_bearing = '<#bearing>'; // 7 wind bearing (degrees) $RT_rrate = $RT_currentrainratehr = '<#rrate>'; // 8 current rain rate (mm / in per hour) $RT_rfall = $RT_dayrn = '<#rfall>'; // 9 rain today (0.0 mm / in) $RT_press = $RT_baro = '<#press>'; // 10 barometer $RT_baro1 = round($RT_press,1); // 10 rounded to 1 dec place $RT_currentwdir = $RT_dirlabel = '<#currentwdir>'; // 11 current wind direction (compass [cardinal] point) $RT_beaufortnumber = '<#beaufortnumber>'; // 12 wind speed (beaufort) $RT_windunit = $RT_uomwind = '<#windunit>'; // 13 wind units - m/s, mph, km/h, kts $RT_tempunitnodeg = $RT_uomtemp = '<#tempunitnodeg>'; // 14 temperature units - degree C, degree F $RT_pressunit = $RT_uombaro = '<#pressunit>'; // 15 pressure units -mb, hPa, in $RT_rainunit = $RT_uomrain = '<#rainunit>'; // 16 rain units - mm, in $RT_windrun = $RT_windruntoday = '<#windrun>'; // 17 wind run (today) $RT_presstrendval = $RT_trend = '<#presstrendval>'; // 18 pressure trend value $RT_rmonth = $RT_monthrn = '<#rmonth>'; // 19 monthly rainfall $RT_ryear = $RT_yearrn = '<#ryear>'; // 20 yearly rainfall $RT_rfallY = $RT_yesterdayrain = '<#rfallY>'; // 21 yesterday's rainfall $RT_intemp = '<#intemp>'; // 22 inside temperature $RT_inhum = '<#inhum>'; // 23 inside humidity $RT_wchill = $RT_windch = '<#wchill>'; // 24 wind chill $RT_windchnodp = round(preg_replace('|,|','.',$RT_wchill),0); // 24 rounded to 0 dec places and converted to decimal point $RT_temptrend = $RT_tempchangehour = '<#temptrend>'; // 25 temperature trend value $RT_tempTH = $RT_maxtemp = '<#tempTH>'; // 26 today's high temp $RT_TtempTH = $RT_maxtempt = '<#TtempTH>'; // 27 time of today's high temp (hh:mm) $RT_tempTL = $RT_mintemp = '<#tempTL>'; // 28 today's low temp $RT_TtempTL = $RT_mintempt = '<#TtempTL>'; // 29 time of today's low temp (hh:mm) $RT_windTM = '<#windTM>'; // 30 today's high wind speed (average) $RT_TwindTM = '<#TwindTM>'; // 31 time today's highwindspeed(ave) (hh:mm) $RT_wgustTM = $RT_maxgst = '<#wgustTM>'; // 32 today's high wind gust $RT_TwgustTM = $RT_maxgstt = '<#TwgustTM>'; // 33 time of today's high wind gust (hh:mm) $RT_pressTH = $RT_highbaro = '<#pressTH>'; // 34 today's high pressure $RT_TpressTH = $RT_highbarot = '<#TpressTH>'; // 35 time of today's high pressure (hh:mm) $RT_pressTL = $RT_lowbaro = '<#pressTL>'; // 36 today's low pressure $RT_TpressTL = $RT_lowbarot = '<#TpressTL>'; // 37 time of today's low pressure (hh:mm) $RT_version = '<#version>'; // 38 Cumulus version $RT_build = $RT_wdbuild = '<#build>'; // 39 Cumulus build number $RT_wdversion = $RT_version.'-b'.$RT_build; // 30 - 38 WD version - version and build combined $RT_wgust = $RT_gstspd = '<#wgust>'; // 40 10-minute high gust $RT_heatindex = $RT_heati = '<#heatindex>'; // 41 heat index $RT_heatinodp = round(preg_replace('|,|','.',$RT_heatindex),0); // 41 rounded to 0 dec places and converted to decimal point $RT_humidex = '<#humidex>'; // 42 humidex $RT_UV = $RT_VPuv = '<#UV>'; // 43 UV Index $RT_ET = $RT_VPet = '<#ET>'; // 44 evapotranspiration today $RT_SolarRad = $RT_VPsolar = '<#SolarRad>'; // 45 solar radiation W/m2 $RT_avgbearing = '<#avgbearing>'; // 46 10-minute average wind bearing (degrees) $RT_rhour = $RT_hourrn = '<#rhour>'; // 47 rainfall last hour $RT_forecastnumber = '<#forecastnumber>'; // 48 The number (Zambretti) of the current forecast as per Strings.ini. If no forecast 0 (zero) is returned $RT_isdaylight = '<#isdaylight>'; // 49 Flag to indicate that the location of the station is currently in daylight (1 = yes, 0 = No) $RT_SensorContactLost = '<#SensorContactLost>'; // 50 "Fine Offset only", (1 = Yes, 0 = No) $RT_wdir = $RT_dir0minuteago = '<#wdir>'; // 51 wdir - Average wind direction $RT_cloudbasevalue = '<#cloudbasevalue>'; // 52 Cloud base $RT_cloudbaseunit = '<#cloudbaseunit>'; // 53 Cloud base units $RT_apptemp = $RT_apparenttemp = '<#apptemp>'; // 54 Apparent Temperature $RT_SunshineHours = $RT_VPSunHrs0minuteago = '<#SunshineHours>'; // 55 Sunshine hours so far today $RT_CurrentSolarMax = '<#CurrentSolarMax>'; // 56 Current theoretical max solar rad $RT_currentsolarpercent = ($RT_CurrentSolarMax > 0)? round($RT_SolarRad/$RT_CurrentSolarMax*100,0) : 0; // current solar rad as % of solar max $RT_IsSunny = '<#IsSunny>'; // 57 Flag to indicate that the sun is shining (1 = yes, 0 = No) // extended data points - Highs, lows and times not included in standard realtime $RT_humTH = '<#humTH>'; // today's high humidity $RT_humTL = '<#humTL>'; // today's low humidity $RT_ThumTH = '<#ThumTH>'; // time of today's high humidity $RT_ThumTL = '<#ThumTL>'; // time of today's low humidity $RT_dewpointTH = '<#dewpointTH>'; // today's high dewpoint $RT_dewpointTL = '<#dewpointTL>'; // today's low dewpoint $RT_TdewpointTH = '<#TdewpointTH>'; // time of today's high dewpoint $RT_TdewpointTL = '<#TdewpointTL>'; // time of today's low dewpoint $RT_apptempTH = '<#apptempTH>'; // today's high apptemp $RT_apptempTL = '<#apptempTL>'; // today's low apptemp $RT_TapptempTH = '<#TapptempTH>'; // time of today's high apptemp $RT_TapptempTL = '<#TapptempTL>'; // time of today's low apptemp $RT_wchillTL = '<#wchillTL>'; // today's low wchill $RT_TwchillTL = '<#TwchillTL>'; // time of today's low wchill $RT_solarTH = '<#solarTH>'; // today's high solar $RT_TsolarTH = '<#TsolarTH>'; // time of today's high solar $RT_UVTH = '<#UVTH>'; // today's high UV $RT_TUVTH = '<#TUVTH>'; // time of today's high UV $RT_rrateTM = '<#rrateTM>'; // today's maximum rain rate $RT_r24hour = '<#r24hour>'; // r24hour $RT_StormRain = '<#StormRain>'; // StormRain $RT_MinutesSinceLastRainTip = '<#MinutesSinceLastRainTip>'; // MinutesSinceLastRainTip $RT_forecast = '<#forecast>'; // station forecast // extended data points - sun, moon, forecast, for header section of MX "UI" style website $RT_sunrise = '<#sunrise>'; // time of today's sunrise $RT_sunset = '<#sunset>'; // time of today's sunset $RT_moonrise = '<#moonrise>'; // time of today's monnrise $RT_moonset = '<#moonset>'; // time of today's moonset $RT_moonAge = '<#MoonAge>'; // moon age (days) $RT_moonPercent = '<#MoonPercent>'; // moon percent visible $RT_moonPercentAbs = '<#MoonPercentAbs>'; // moon percent visible $RT_moonphase = '<#moonphase>'; // moon phase END_OF_RAW_DATA_LINES; // end of generation script // put data in array // $WX = array(); global $WX; $WXComment = array(); $data = explode(":|:",$rawdatalines); $nscanned = 0; foreach ($data as $v => $line) { list($vname,$vval,$vcomment) = explode("|",trim($line).'|||'); if(substr($vname,0,1) == "#") { // continue; // ignore comment records } if(substr($vname,0,1) == "!") { // handle beta tags conditionally if($vval == "") { continue; // skip this one } else { $vname = substr($vname,1); if($vcomment <> "") {$vcomment .= " (Beta)"; } } } if ($vname <> "") { $WX[$vname] = trim($vval); if($vcomment <> "") { $WXComment[$vname] = trim($vcomment); } } $nscanned++; } if(isset($_REQUEST['debug'])) { print "\n"; } if (isset($_REQUEST["sce"]) and strtolower($_REQUEST["sce"]) == "dump" ) { print "
\n";
  print "// \$WX[] array size = $nscanned entries.\n";
  foreach ($WX as $key => $val) {
	  $t =  "\$WX['$key'] = '$val';";
	  if(isset($WXComment[$key])) {$t .=  " $WXComment[$key]"; }
	  print "$t\n";
  }
  print "
\n"; exit; } if(file_exists("CU-defs.php")) { include_once("CU-defs.php"); } ?>