view web/comparison.php @ 7:9a14029b3782

- Wait longer (100msec) for a read, and reduce the number of retries to match. - Print out if we read OK after more than 1 attempt for diagnostic purposes.
author Daniel O'Connor <darius@dons.net.au>
date Thu, 11 Feb 2010 12:47:59 +1030
parents 9dab44dcb331
children
line wrap: on
line source

<!-- for Emacs, this is a -*- mode: html-fill; coding: utf-8 -*- document -->
<!-- $Id: comparison.php,v 1.8 2010/02/08 01:46:47 grog Exp $ -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<?php
   /* title should start with a lower case character */
   $title = "Comparative weather observations";
   $subtitle = "Ballarat area";
   include "header.php";
   include "weathergraph.php";
   include "current.php";
   $id = '$Id: comparison.php,v 1.8 2010/02/08 01:46:47 grog Exp $';
   if (array_key_exists ("date", $_GET))
    $date = $_GET ["date"];
   else
    $date = date ("Y-m-d");

?>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <?php pagetitle0 ($title); ?>
    <meta http-equiv="refresh" content="900" ;="">
  </head>

  <body>
    <?php pageheader0 ($title); ?>

    <div align="justify">
      <p>
	This page shows comparative readings from a number of weather stations.  It's still
	experimental.  This compares data from the following weather stations in <?php href
	("http://www.wunderground.com/wundermap/?lat=-37.76312&lon=144.01566&zoom=10&type=map&units=metric&rad=1&rad.num=1&rad.spd=25&rad.opa=70&rad.stm=0&rad.type=N0R&rad.smo=1&rad.mrg=0&wxsn=1&wxsn.mode=tw&svr=0&cams=0&sat=0&riv=0&mm=0&hur=0&fire=0&tor=0&ndfd=0&pix=0",
	"the area"); ?>, and also Melbourne airport, a little further away (<?php href
	("http://www.wunderground.com/history/station/94868/2009/12/22/DailyHistory.html",
	"Melbourne city"); ?> doesn't report wind).
      </p>

      <ul>
	<li>
	  <?php href
          ("http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IVICTORI102", "Bacchus
          Marsh airport"); ?> (currently offline).
	</li>
	<li>
	  <?php href ("http://www.bom.gov.au/products/IDV60801/IDV60801.94852.shtml", "Ballarat");
	  ?> airport (<?php href ("http://www.bom.gov.au/", "Bureau of Meteorology"); ?>)
	</li>
	<li>
	  <?php href
	  ("http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IVICTORI115",
	  "Buninyong"); ?>
	</li>
	<li>
	  <?php href ("http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IVICTORI94",
	  "Delacombe"); ?>
	</li>
	<li>
	  <?php href
	  ("http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IVICTORI124",
	  "Dereel"); ?> (this station)
	</li>

	<li>
	  <?php href ("http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IVICREDA2",
	  "Redan"); ?>
	</li>

	<li>
	  <?php href ("http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IVICTORI86",
	  "Teesdale"); ?>
	</li>

	<li>
	  <?php href ("http://www.bom.gov.au/products/IDV60901/IDV60901.94866.shtml", "Melbourne
	  Airport"); ?> (<?php href ("http://www.bom.gov.au/", "Bureau of Meteorology"); ?>)
	</li>

	<li>
	  <?php href ("http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IVICMTHE3",
	  "Mount Helen"); ?>
	</li>
	<li>
	  <?php href ("http://www.bom.gov.au/products/IDV60901/IDV60901.94863.shtml", "Sheaoaks");
	  ?> (<?php href ("http://www.bom.gov.au/", "Bureau of Meteorology"); ?>)
	</li>
      </ul>

      <?php
  if (array_key_exists ("raw", $_GET))
    {
      $raw = "-raw";
	 /* offer to smooth */
      print <<< EOS
    <form action="comparison.php" method="get">
      <input type="submit" name="smoothed" value="Smooth" />
    </form>

EOS;
    }
    else                                        /* set edit */
    {
      $raw = "";
      print <<< EOS
    <form action="comparison.php" method="get">
      <input type="submit" name="raw" value="Raw" />
    </form>

EOS;
    }
?>
    <br />

      <div align="left">

	<?php showgraphs (<<< EOS
comparative-temperature-$date     Comparative temperature
comparative-dewpoint-$date        Comparative dewpoint
comparative-humidity-$date        Comparative humidity
comparative-pressure-$date        Comparative pressure
comparative-wind-$date        Comparative wind speed
comparative-gust-$date        Comparative wind gust speed
comparative-rain-$date        Comparative rainfall
EOS
);
?>
      </div>
    </div>

<?php pagefooter ($id); ?>