5mph) $WX['press'] = '1008.33'; // Sea Level pressure $WX['presstrend'] = 'Rising'; // Defined in strings.ini $WX['presstrendenglish'] = 'Rising'; // Rising/Falling/Steady $WX['presstrendval'] = '0.41'; // Value value ie +0.01 $WX['altimeterpressure'] = '1010.61'; // Altimeter Setting $WX['dew'] = '35.1'; // Dew Point // Various Wind related Values $WX['wspeed'] = '0.0'; // Current windspeed $WX['wlatest'] = '0.0'; // Latest wind speend from console $WX['wgust'] = '0.0'; // Current wind gust $WX['bearing'] = '273'; // Wind Bearing decimal $WX['bearingTM'] = '192'; // Time current wind bearing occurred $WX['avgbearing'] = '0'; // Avg Bearing last 10 mins decimal $WX['wdir'] = '---'; // Wind direction compass word ie ESE $WX['beaufort'] = 'F0'; // Beaufort wind value ie F8 $WX['beaudesc'] = 'Calm'; // Beaufort Word Value ie Gale $WX['windrun'] = '33.2'; // Wind Run so far today $WX['windrunY'] = '52.8'; // Wind Run YESTERDAY // Percipitation Info $WX['rrate'] = '0.00'; // Current Rain fall rate $WX['rfall'] = '0.00'; // Rainfall today $WX['rfallY'] = '0.00'; // Rainfall YESTERDAY $WX['rmidnight'] = '0.00'; // Rainfall since Midnight $WX['rhour'] = '0.00'; // Rainfall In last hour $WX['rmonth'] = '0.00'; // Rainfall so far this Month $WX['ryear'] = '4.06'; // Rainfall so far this Year $WX['lastraintip'] = '2013-03-09 01:58'; // Last Tip // Solar Information $WX['ET'] = '0.275'; // Todays Evapotranspiration $WX['UV'] = '0.0'; // Current UV Index $WX['SolarRad'] = '0'; // Current Solar Radiation M/w2 // High/Low Values $WX['tempTH'] = '100.0'; // Today High $WX['TtempTH'] = '16:06'; // time of that event $WX['tempTL'] = '61.2'; // Today Low temp $WX['TtempTL'] = '05:43'; // time of that event $WX['tempYH'] = '100.4'; // Yesterdays High $WX['TtempYH'] = '15:15'; // time of that event $WX['tempYL'] = '64.4'; // Yesterdays Low $WX['TtempYL'] = '05:56'; // time of that event $WX['pressTH'] = '1010.98'; // Todays High Pressure $WX['TpressTH'] = '09:17'; // time of that event $WX['pressTL'] = '1005.83'; // Todays Low Pressure $WX['TpressTL'] = '17:59'; // time of that event $WX['pressYH'] = '1007.18'; // Yeserdays High Pressure $WX['TpressYH'] = '09:04'; // time of that event $WX['pressYL'] = '1002.98'; // Yeserdays Low Pressure $WX['TpressYL'] = '16:59'; // time of that event $WX['windTM'] = '9.6'; // Todays High Wind $WX['TwindTM'] = '14:18'; // time of that event $WX['windYM'] = '12.0'; // Yesterdays High Wind $WX['TwindYM'] = '10:52'; // time of that event $WX['wgustTM'] = '23.9'; // Todays high wind gust $WX['TwgustTM'] = '16:19'; // time of that event $WX['wgustYM'] = '25.2'; // Yesterdays high wind gust $WX['TwgustYM'] = '10:50'; // time of that wind gust $WX['rrateTM'] = '0.00'; // Todays high rainfall rate $WX['TrrateTM'] = '00:00'; // Time of that event $WX['rrateYM'] = '0.00'; // Yesterdays high rainfall rate $WX['TrrateYM'] = '00:00'; // time of that event $WX['bearingTM'] = '192'; // Time current wind bearing occurred $WX['bearingYM'] = '157'; // Yesterdays Avg wind bearing $WX['Tbeaufort'] = 'F3'; // Todays High Beafort value $WX['Ybeaufort'] = 'F3'; // Yesterdays High Beaufort value // All Time Values and related values $WX['tempH'] = '119.1'; // All time high temp $WX['TtempH'] = 'at 2:49 PM on 02 July 2011'; // Date of that event 3:05 PM on 28 July 2009 $WX['mintempH'] = '93.0'; // All time Minimum High Temp $WX['TmintempH'] = 'at 11:00 PM on 16 July 2010'; // Date of that event $WX['tempL'] = '21.3'; // All time low temp $WX['TtempL'] = 'at 7:14 AM on 15 January 2013'; // Date of that event $WX['maxtempL'] = '43.9'; // All time Low Max Temp $WX['TmaxtempL'] = 'at 11:00 PM on 02 February 2011'; // Date of that event $WX['pressH'] = '1035.26'; // All time high Pressure $WX['TpressH'] = 'at 9:15 AM on 03 February 2011'; // Date of that event $WX['pressL'] = '990.76'; // All time Low Pressure $WX['TpressL'] = 'at 7:05 PM on 21 January 2010'; // Date of that event $WX['gustM'] = '54.2'; // All time High Wind Gust $WX['TgustM'] = 'at 7:31 PM on 21 January 2010'; // Date of that event $WX['wspeedH'] = '26.4'; // All time high avg windwind speed $WX['TwspeedH'] = 'at 5:25 PM on 21 January 2010'; // Date of that event $WX['wchillH'] = '0.0'; // All time Wind Chill lowtemperature) $WX['TwchillH'] = 'at 7:08 AM on 25 September 2008'; // Date of that event $WX['rrateM'] = '8.00'; // All time Rain Rate $WX['TrrateH'] = 'at 1:28 PM on 05 October 2010'; // Date of that event $WX['rfallH'] = '8.91'; // All time high daily rain $WX['TrfallH'] = 'on 16 October 2008'; // Date of that event $WX['rfallhH'] = '0.95'; // All time High hourly rain $WX['TrfallhH'] = 'at 10:01 AM on 19 February 2013'; // Date of that event $WX['rfallmH'] = '8.92'; // All time Monthly Rain $WX['TrfallmH'] = 'October 2008'; // Date of that event // Value Unit used in data $WX['tempunit'] = '°F'; // Temp Units ie F or C $WX['pressunit'] = 'hPa'; // Pressure Units $WX['windunit'] = 'mph'; // Wind Speed Units $WX['windrununit'] = 'miles'; // Wind Run Units $WX['rainunit'] = 'in'; // Rain Units // Special WMR928 sensor values $WX['ExtraTemp1'] = '0.0'; // Extra Temp 1 $WX['ExtraTemp2'] = '0.0'; // Extra Temp 2 $WX['ExtraTemp3'] = '0.0'; // Extra Temp 3 $WX['ExtraDP1'] = '0.0'; // Extra Dewpt 1 $WX['ExtraDP2'] = '0.0'; // Extra Dewpt 2 $WX['ExtraDP3'] = '0.0'; // Extra Dewpt 3 $WX['ExtraHum1'] = '0'; // Extra Hum 1 $WX['ExtraHum2'] = '0'; // Extra Hum 2 $WX['ExtraHum3'] = '0'; // Extra Hum 3 // Cumulus Alarm State Flags $WX['HighTempAlarm'] = '0'; // High Temp Alarm $WX['LowTempAlarm'] = '0'; // Low Temp Alarm $WX['HighPressAlarm'] = '0'; // High Temp Alarm $WX['LowPressAlarm'] = '0'; // Low Temp Alarm $WX['HighRainTodayAlarm'] = '0'; // High Rain Rate Alarm $WX['HighRainRateAlarm'] = '0'; // High Rain Fall Alarm $WX['HighWindGustAlarm'] = '0'; // High Wind Gust Alarm $WX['HighWindSpeedAlarm'] = '0'; // High Wind Speed Alarm // Full stop decimal replacement values. Correspond to same values with RC Removed $WX['RCtemp'] = '81.3'; // Outside temp $WX['RCintemp'] = '81.0'; // Inside temp $WX['RCtempTH'] = '100.0'; // Todays Outside High Temp $WX['RCtempTL'] = '61.2'; // Todays Outside Low Temp $WX['RCheatindex'] = '79.4'; // Heat Index $WX['RCdew'] = '35.1'; // DewPt $WX['RCwchill'] = '81.3'; // Windchill $WX['RChum'] = '19'; // Outside Humidity $WX['RCinhum'] = '26'; // Inside Humidity $WX['RCpress'] = '1008.33'; // Pressure $WX['RCpressTH'] = '1010.98'; // Time High Pressure $WX['RCpressTL'] = '1005.83'; // Time Low Pressure $WX['RCrfall'] = '0.00'; // Rainfall $WX['RCrrate'] = '0.00'; // Rainfall Rate $WX['RCrrateTM'] = '0.00'; // Time of todays High Rainfall $WX['RCwspeed'] = '0.0'; // Windspeed $WX['RCwgust'] = '0.0'; // Wind Gust $WX['RCwgustTM'] = '23.9'; // Todays High Gust // Miscellaneous Values $WX['version'] = '1.9.3'; // Cumulus Version $WX['build'] = '1059'; // Cumulus Version Build $WX['interval'] = '5'; // Update Interval $WX['update'] = '5/24/2013 11:17:57 PM'; // Date and time of last update $WX['stationtype'] = 'Davis Vantage Pro2 Plus'; // Type of Station $WX['latitude'] = "N 33° 24' 09""; // Station Lattitude ie N 33° 24' 09" $WX['longitude'] = "W 111° 52' 59""; // Station Longitude ie W 111° 52' 59" $WX['latitude'] = "N 33° 24' 09""; // Station Lattitude ie N 33° 24' 09" $WX['longitude'] = "W 111° 52' 59""; // Station Longitude ie W 111° 52' 59" // Obtain Usable Data from Latitude and Longitude //preg_match ( '/^(.) (.*)° (.*)\' (.*)"/', // preg_replace('/ /', ' ', $WX['latitude']), $latinfo); //preg_match ( '/^(.) (.*)° (.*)\' (.*)"/', // preg_replace('/ /', ' ', $WX['longitude']), $longinfo); $clean_latitude = "N 33 24 09"; // Station Lattitude ie N 33° 24' 09" $clean_longitude = "W 111 52 59"; // Station Longitude ie W 111° 52' 59" preg_match ( '/^(.) (\d{1,}) (\d{1,}) (\d{1,})/', $clean_latitude, $latinfo); preg_match ( '/^(.) (\d{1,}) (\d{1,}) (\d{1,})/', $clean_longitude, $longinfo); $asign = $osign = ""; if($latinfo[1]=="S") { $ssign = "-"; } if($longinfo[1]=="W") { $osign = "-"; } $WX['latdec'] = $asign . DMStoDEC($latinfo[2],$latinfo[3],$latinfo[4]); $WX['longdec'] = $osign . DMStoDEC($longinfo[2],$longinfo[3],$longinfo[4]); /* // Obtain Usable Data from Latitude and Longitude preg_match ( '/^(.) (.*)° (.*)\' (.*)"/', preg_replace('/ /', ' ', $WX['latitude']), $latinfo); preg_match ( '/^(.) (.*)° (.*)\' (.*)"/', preg_replace('/ /', ' ', $WX['longitude']), $longinfo); $asign = $osign = ""; if($latinfo[1]=="S") { $ssign = "-"; } if($longinfo[1]=="W") { $osign = "-"; } $WX['latdec'] = $asign . DMStoDEC($latinfo[2],$latinfo[3],$latinfo[4]); $WX['longdec'] = $osign . DMStoDEC($longinfo[2],$longinfo[3],$longinfo[4]); */ $WX['latdeg'] = $latinfo[1] . ' ' . $latinfo[2] . 'deg ' . $latinfo[3] . 'min ' . $latinfo[4] . 'sec'; $WX['longdeg'] = $longinfo[1] . ' ' . $longinfo[2] . 'deg ' . $longinfo[3] . 'min ' . $longinfo[4] . 'sec'; // End of Calculations $WX['altitude'] = '1250 ft'; // Station Altitude $WX['location'] = 'TNET Weather'; // Station Name/Location $WX['longlocation'] = 'Mesa Arizona Weather';// Station Locations $WX['forum'] = ''; // URL for Forum Page $WX['webcam'] = ''; // URL to Webcam page $WX['battery'] = '3.86v'; // Console Battry level (Davis Only) $WX['txbattery'] = 'TX Battery Status: 1-ok 2-ok 3-ok 4-ok 5-ok 6-ok 7-ok 8-ok '; // TX Battery Status (Davis Only) $WX['recordsbegandate'] = '24 September 2008'; // Date that records began on station $WX['graphperiod'] = '24'; // Time covered by Generated Graphs $WX['realtimeinterval'] = '60'; // Realtime Update Interval $WX['rollovertime'] = 'midnight'; // Rollover time: Midnight, 9am, 10am $WX['snowdepth'] = '0'; // Manual entered Snow for today // Astrological Information $WX['sunrise'] = '05:22'; // Sunrise time at station $WX['sunset'] = '19:27'; // Sunset time at Station $WX['moonphase'] = 'Full moon'; // Current phase of Moon $WX['moonrise'] = '19:19'; // Moonrise time (may be ---) $WX['moonset'] = '04:56'; // Moonset time (may be ---) $WX['daylength'] = '14:05'; // Length of Day $WX['tomorrowdaylength'] = 'There will be 1min 9s more daylight tomorrow'; // Tomorrows Length of Day $WX['dawn'] = '04:54'; // Start of Civil Dawn $WX['dusk'] = '19:55'; // Start of Civil Dusk $WX['daylightlength'] = '15:01'; // Length of day Dawn to Dusk // Flag Values $WX['isdaylight'] = '0'; // 1 if currently daylight $WX['sensorcontactlost'] = ''; // Lost sensor Contact (Fine Offset only) // Next 3 values are CSV comma delimited array containing up to 3600 entries each // DISABLED IN THIS VERSION $WX['wdirdata'] = 'DISABLED'; // Wind direction $WX['wspddata'] = 'DISABLED'; // Wind speed $WX['nextwindindex'] = 'DISABLED'; // Index of values used above check_parseview() ; # check for parse view switch /* FUNCTIONS */ function check_sourceview () { global $SITE; if ( isset($_GET['view']) && $_GET['view'] == 'sce' ) { $filenameReal = __FILE__; $download_size = filesize($filenameReal); header('Pragma: public'); header('Cache-Control: private'); header('Cache-Control: no-cache, must-revalidate'); header("Content-type: text/plain"); header("Accept-Ranges: bytes"); header("Content-Length: $download_size"); header('Connection: close'); readfile($filenameReal); exit; } } function check_parseview () { global $SITE, $WX; if ( isset($_GET['parse']) && $_GET['parse'] == 'sce' ) { echo '
| Field | Value |
|---|---|
| $WX[\'' . $key . '\'] | ' . $value . " |
tnetwebtags V ' . $WX['webtagversion'] . ' - Scripts by TNET Services, Inc.
'; exit; } } // Convert Degrees Minutes Seconds to // Decimal format function DMStoDEC($deg,$min,$sec) { return $deg+((($min*60)+($sec))/3600); } // Convert Decimal Format to Degrees // Minutes Seconds... function DECtoDMS($dec) { $vars = explode(".",$dec); $deg = $vars[0]; $tempma = "0.".$vars[1]; $tempma = $tempma * 3600; $min = floor($tempma / 60); $sec = $tempma - ($min*60); return array("deg"=>$deg,"min"=>$min,"sec"=>$sec); } /* END OF MODULE */