WxDisplay
(Weather Data Display)

Weather Logo

See the download page to obtain this program

Description

This program is intended for displaying the data collected and vetted from an Oregon Scientific Professional Weather Station (e.g. the WMR180 and WMR928N) using the WxLog, WxLogger and WxVet programs. The name WxDisplay derives from the common abbreviation WX for "weather conditions". The program was developed by Anthony S. Wilson under the supervision of Ken Turner. You can see what the program does by visiting the Stirling Weather History web page.

WxDisplay uses the Java 2D Graph package, which is included with WxDisplay for convenience.

Customisation

The WxDisplay program is provided in source form. Store it where you wish, though it might be best to place it underneath your home web directory. Compile everything with javac *.java, and optionally create a jar file from the classes. (This is what the included Unix shell script build does.) The code must be edited to adapt it to your local environment. Specifically, the following constants must be altered at the start of the main class (WeatherGraph):

directory
where the weather data files are stored (no '/' or '\' at end of name)
url
where the weather data files are stored as URLs (no '/' or '\' at end of name).

In addition, you may wish to alter the following constants:

borderBottom
bottom border for graph (pixels)
borderLeft
left border for graph (pixels)
borderRight
right border for graph (pixels)
borderTop
top border for graph (pixels)
labelColour
graph label font colour
labelFont
graph label font name
labelSize
graph label font size
labelStyle
graph label font style
legendX
x coordinate for top legend (pixels)
legendY
y coordinate for top legend (pixels)
lineMarker1
line marker style 1 (first measurement)
lineMarker2
line marker style 2 (second measurement)
lineMarkerScale
line marker scale
lineStyle
line style (1/0 = line/no line)
lineWidth
graph line width (pixels)
markerFile
filename for graph marker symbol definitions
maxGraphs
maximum number of graphs to display
prefix
condensed data file prefix
suffix
data file suffix
titleColour
graph title font colour
titleFont
graph title font name
titleSize
graph title font size
titleStyle
graph title style
windowSize
window size (pixels)

If you use the separate WxVet program, the directory setting must match that for the displayer.

Usage

The data format used by WxDisplay is that of the WxLog and WxLogger programs, with minor variations according to the file. WxDisplay also uses the condensed day/week/month/year files created by WxVet.

WxDisplay can be run from the command-line using the following parameters:

  java WeatherGraph DD MM YYYY MMMM ...
  

The day, month and year are given. Each can be given as a pair of values separated by a dash. Thus '01-05 02 2005' means 1st to 5th February 2005, while '01 02-04 2005' means 1st February to 1st April 2005. All measurements in a date range must exist. The date specification is followed by a list of measurements to be graphed:

ID, IH, IP, IT
indoor dewpoint, indoor humidity, (indoor) pressure, indoor temperature
OD, OH, OR, OT
outdoor dewpoint, outdoor humidity, (outdoor) rainfall, outdoor temperature
WC, WD, WS
wind chill, wind direction, wind speed

With one exception, these must be followed by AVE (average), MIN (minimum) or MAX (maximum). Rainfall (OR) is always a cumulative total - the average/minimum/maximum values are the same. Thus, 'IDMIN OHMAX WCAVE OR' will graph the indoor dewpoint minimum, outdoor humidity maximum, wind chill average, and rainfall total. A maximum of four graphs will be displayed (determined by the maxGraphs constant mentioned below). However, several graphs of the same kind (e.g. minimum and maximum humidity) are amalgamated and count as one graph.

WxDisplay can also be run as an applet. The parameters are similar to those used from the command line. See displayer.html for insight into its usage as an applet. This file would need customisation for the local environment (e.g. the location of files, the use of Apache '#exec').

The Unix shell script wxshow is provided as a convenience for displaying the contents of data files on the console. The Unix shell script wxview is provided as a convenience for displaying weather graphs.

Control Files

The displayer uses a slightly modified form of the Graph2D package. The Graph2D file marker.txt defines marker symbols for graphs. The format of this is defined by Graph2D and is not given here.

Licence

This program is free software. You can redistribute it and/or under the terms of the GNU General Public License as published by the Free Software Foundation - either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful but without any warranty, without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.

You may re-distribute this software provided you preserve this README file. Bug reports should be sent to the maintainer , who would also appreciate suggestions for improvements.

The separate Graph2D package is included for convenience in the graph directory. This is also released under the GNU General Public License.

History

Version 1.0: First public release, Ken Turner, 7th July 2005

Version 2.0: Second public release, Ken Turner, 11th July 2006

Version 1.3: Ken Turner, 18th February 2013


Up Arrow Up one level to Communications Utilities

Web Ken Turner Home   Email    Search Search Web Pages

Last Update: 18th February 2013
URL: http://www.cs.stir.ac.uk/~kjt/software/comms/wxdisplay.html