Database Table Structures

Overview Nodes
Hourly Daily
Monthly Records
Temperatures Winds
Humidity Precipitation
EMP (Lightning) Background Radiation
Receive Times  

The following tables are covered in their respective sections of the documentation. Links are provided to these pages in the table below.

Data Alarms Geographic Data SAME Server
Data
Trip-Points
Email List
Data
FIPS Codes
Broadcast Events
SAME Codes
SAME Events
Event Location Codes
Query Server Callbook
Queries Callbook

 


Overview of Tables

Tables are the very heart of the WXN Server. All data the server collects - it's own or that received from APRS - are stored in the tables of the WXN database. This section covers the fields and their descriptions for all tables in the system. This information is useful for Client Access covered in another section as well as maintenance.

Section Contents


Nodes

Table name: nodes
Indexed on: call_ssid, dtg_zulu
Used by: all daemons

The nodes table contains all the real-time data for a given station. Additionally, it contains trends, highs, lows as well as information about the location of the station. It is the largest table in terms of the number of fields for a given record.

Note that location information is derived from the geographic data table. For that to work, you must be using the QRZ cdrom database or have entries in the aprsqth file. Otherwise those fields will remain blank.

Field Description
call_ssid The callsign-SSID of the node. Entries must be upper-case. Also note that the SSID must be entered. That is, 'N4XI' is not legal. It must be 'N4XI-0' (without the single quotes).
alias The alias for the node. Defaults to the callsign-SSID if none exists. This would be the norm for non-WXN APRS weather nodes in the network. Other WXN nodes will broadcast their alias in the extended data packets.
city City or place where the node is located. Title-case.
county County in which the city or place resides. Title-case.
state Two letter state code of the locale. Upper-case.
fips Five-digit FIPS code for the locale. See the appropriate sub-section under geographic data for more information.
afos Three letter identifier used to identify the NWS office serving the locale. See the appropriate sub-section under geographic data for more information.
latitude The latitude of the locale in decimal degrees (e.g., 23° 30' = 23.5°)
longitude The longitude for the locale in decimal degrees (e.g., 70° 30' = 70.5°). Note that west of the prime meridian is positive, east negative.
timezone The timezone of this station. See the appropriate sub-section under geographic data for more information.
elevation Elevation of the locale in feet ASL (above sea level).
haat Height in feet of the anemometer above average terrain.
aprs_soft The type of APRS software in use at the node:
Value Software
1WXN
2Generic APRS
3DOS APRS
4Mac APRS
5Pocket APRS
6SA APRS
7Win APRS
8Unix APRS
9APRS Point
 
stn_type The type of weather station used by the node:
Value Station
1ID-5001
2Peet Bros Ultimeter II
3Peet Bros Ultimeter 2xxx Series
4Davis Instruments Monitor II
5Davis Vantage Pro
6Oregon Scientific/Radio Shack WM-918
7PIC
-1Unknown
 
dst Daylight Savings Time (DST) flag. True ('t') if the locale observes DST, false ('f') if not.
dtg_local The local date and time of the current data.
dtg_zulu The date and time of the current data expressed in UTC time. This is the same date and time as represented by dtg_local.
tcr Current temperature. NOTE: all temperature readings are in degrees Fahrenheit
thr_val High temperature since midnight local time.
thr_dtg Date-time of the above high reading.
tlr_val Low temperature since midnight local time.
tlr_dtg Date-time of the above low reading.
trh Hourly rate of change for temperature.
trd 24-hour rate of change for temperature.
tyh Yesterday's high temperature
tyl Yesterday's low temperature
tsd Soil 1 temperature at specified depth (6" typical).
tsd2 Soil 2 temperature at specified depth (8" typical).
wca Current wind-chill average
wcg Current wind-chill gust
cool_days Cooling degree days for the ...
heat_days Heating degree days for the ...
wac_dir Current wind average direction. NOTE: All wind directions are in degrees relative to true north.
wac_spd Current wind average speed. NOTE: All wind velocities in MPH.
wgc_dir Current wind gust direction.
wgc_spd Current wind gust speed.
wah_dir Wind average high direction.
wah_spd Wind average high speed.
wah_dtg Wind average high date-time.
wal_dir Wind average low direction.
wal_spd Wind average low speed.
wal_dtg Wind average low date-time.
wgh_dir Wind gust high direction.
wgh_spd Wind gust high speed.
wgh_dtg Wind gust high date-time.
pca Precipitation since midnight local time. NOTE: All precip readings are in hundredths of an inch. e.g., 100 = 1.00".
pri Instantaneous precipitation rate. How much precip will fall in the next hour if it continues at the same rate of the last five minutes.
prh Hourly precipitation rate. The amount of precipitation in the 60 minutes.
plh The amount of precipitation recorded from the top of last hour to the top of this hour.
p24 The amount of precipitation that has fallen in the last 24 hours.
pty Total amount of precipitation that fell yesterday.
ptm Total precipitation for the month.
pta Total precipitation for the year.
bcr Current barometric pressure. NOTE: All barometric pressure is expresssed in tenths of a millibar. e.g., 10235 = 1023.5 mb (30.22").
bhr_val High barometric pressure reading since midnight local time.
bhr_dtg Date-time of high barometric pressure reading.
blr_val Low barometric pressure reading since midnight local time.
blr_dtg Date-time of low barometric pressure reading.
brh Rate of barometric pressure in the last hour.
brd Rate of barometric pressure in the last 24 hours.
hcr Current relative humidity reading. NOTE: all humidity readings in percent.
hhr_val High humidity reading since midnight local time.
hhr_dtg Date-time of high humidity reading.
hlr_val Low humidity reading since midnight local time.
hlr_dtg Date-time of low humidity reading.
hrh Humidity rate of change in the last hour.
hrd Humidity rate of change in the last 24 hours.
fog Fog flag. True ('t') if fog is likely, false ('f') if not. Will set if RH is greater than 90% and wind velocity is less than 5 MPH. Note that this flag only indicates that fog is possible.
heatindex Heat index expressed in degrees Fahrenheit. This field will only be filled if the current temperature is 68 degrees Fahrenheit or higher.
dewpoint Dewpoint expressed in degrees Fahrenheit.
ist Inside temperature expressed in degrees Fahrenheit.
ish Inside relative humidity expressed in percent.
ecc EMP (lightning) hits recorded in the last five minutes.
eqc EMP (lightning) hits recorded in the last 15 minutes.
exc EMP (lightning) hits recorded in the last 30 minutes.
ehc EMP (lightning) hits recorded in the last 60 minutes.
edc EMP (lightning) hits recorded since midnight local time.
rca Current background radiation five minute average. NOTE: All radiation readings are in micro-Roentgens.
rha Current background radiation 60 minute average.
rda Background radiation average since midnight local time.
rmax Maximum five-minute background radiation average recorded since midnight local time.
ralarm_count Number of alarm trips since midnight local time. The trip point is determined by the ralarm_trip parameter that follows.
ralarm_trip Background radiation level that will trip a data alarm. This value is copied from the wxnhostd.conf configuration file and will always be updated when wxnhostd is started.
uvc Current UV reading. NOTE: All UV fields are currently not used. At some point, hardware will be available to record UV radiation.
uvh_val High UV reading since midnight local time.
uvh_dtg Date-time of high UV reading.
uvl_val Low UV reading since midnight local time.
uvl_dtg Date-time of low UV reading.
sun_now Sunshine detected flag. True ('t') if sun is currently shining, false ('f') if not. NOTE: This field is for a sunshine duration detector under development.
sun_min The number of minutes sunshine has been detected since midnight local time. (future hardware development)
sunrise Hour and minute of local sunrise for the current day.
sunset Hour and minute of local sunset for the current day.

Section Contents


Hourly Summaries

Table name: hourly
Indexed on: dtg_local
Used by: wxnhostd

The hourly table holds readings taken at the top of every hour.

Units used are the same as for the nodes table: temperature in degrees Fahrenheit, pressure in tenths of millibars, precip in hundredths of an inch, wind speed in MPH, humidity in percent and background radiation in micro-Roentgens.

Field Description
dtg_local Date-time
tcr Temperature
wac_dir Average wind direction since last hourly reading.
wac_spd Average wind speed since last hourly reading.
wgh_spd Highest wind gust recorded since last hourly reading.
bcr Barometric pressure
plh Precipitation in the last hour.
hcr Relative Humidity
emp EMP (lightning hits) in the last hour.
uvc UV (future)
ist Inside temperature.
ish Inside humidity.
tsd Soil temperature.
rha Background radiation average for the last hour.

Section Contents


Daily Summaries

Table name: daily
Indexed on: this_date
Used by: wxnhostd

The daily table holds readings taken at midnight local time and therefore holds the summary for the previous day.

Units used are the same as for the nodes table: temperature in degrees Fahrenheit, pressure in tenths of millibars, precip in hundredths of an inch, wind speed in MPH, humidity in percent and background radiation in micro-Roentgens.

Field Description
this_date Date in the form of 'yyyy-mm-dd'
thr_val High temperature
thr_dtg Date-time of high temperature
tlr_val low temperature
tlr_dtg Date-time of low temperature
mtemp Mean temperature for day
heat_days Heating degree days
cool_days Cooling degree days
bhr_val High barometric pressure reading
bhr_dtg Date-time of high barometric pressure reading
blr_val Low barometric pressure reading
blr_dtg Date-time of low barometric pressure reading
mbar Mean barometric pressure reading
wgh_dir Gust high direction
wgh_spd Gust high speed
wgh_dtg Date-time of high wind gust
mwind_spd Mean wind speed for day
mwind_dir Mean wind direction for day
hhr_val High relative humidity reading
hhr_dtg Date-time of high humidity reading
hlr_val Low relative humidity reading
hlr_dtg Date-time of low relative humidity reading
mhumid Mean relative humidity for the day
precip Precipitation total for the day
edc Total EMP (lightning) hits recorded for the day
uvh_val UV high reading (future)
uvh_dtg Date-time of UV high reading (future)
uvl_val UV low reading (future)
uvl_dtg Date-time of UV low reading (future)
muv Mean UV reading for the day (future)
mtsd Mean soil temperature for the day
rda Background radiation average for the day
rmax High background radiation average for the day
ralarm_count Total radiation alarm trips for the day

Section Contents


Monthly Summaries

Table name: monthly
Indexed on: mo_date
Used by: wxnhostd

The monthly table holds the summary of a given calendar month and is created at midnight of the last day of the month (i.e., it is the first of the new month). The daily summary is generated before the monthly summary since both take place at midnight.

Units used are the same as for the nodes table: temperature in degrees Fahrenheit, pressure in tenths of millibars, precip in hundredths of an inch, wind speed in MPH, humidity in percent and background radiation in micro-Roentgens.

Field Description
mo_date Month date in the form of 'yyyy-mm-01'. Note that the first day of the month is specified in every case.
mtemp Mean temperature
mwind_dir Mean wind direction
mwind_spd Mean wind speed
mbar Mean barometric pressure
mhumid Mean relative humidity
precip Total precipitation for the month
emp Total EMP (lightning strikes) for the month
muv Mean UV index (future)
mrad Mean background radiation count
mtsd Mean soil temperature
heat_days Heating degree days
cool_days Cooling degree days

Section Contents


Weather Records

Table name: records
Indexed on: n/a
Used by: wxnhostd

The records table holds the record highs and lows for key pieces of data collected by the server. It is suggested a print-out of this table be made periodically to fix any problems that may arise due to a bad sensor reading.

There is only one record in this table. All fields are paired by a parameter and the date the parameter was posted.

Units used are the same as for the nodes table: temperature in degrees Fahrenheit, pressure in tenths of millibars, precip in hundredths of an inch, wind speed in MPH, humidity in percent and background radiation in micro-Roentgens.

Field Description
call_ssid The CALL-SSID of this node. The only time this field should be edited would be if the CALL-SSID of this node was changed. If that is the case, the edit must be done prior to restarting the server or a new record will be created with default values. It can still be fixed at that point - just will be a nuissance.
htemp Highest temperature
htemp_date Date of highest temperature
ltemp Lowest temperature
ltemp_date Date of lowest temperature
wgh_spd Highest wind gust speed
wgh_dir Highest wind gust direction
wgh_date Date of highest wind gust
precip24 Highest 24-hour precipitation total
precip24_date Date of highest 24-hour precipitation total
precipmh Highest recorded monthly precipitation
precipmh_date Date of highest recorded monthly precipitation
precipml Lowest recorded monthly precipitation
precipml_date Date of lowest recorded monthly precipitation
precipyh Highest recorded annual precipitation. Period spanned is 01 January to 31 December.
precipyh_date Date of highest recorded annual precipitation
precipyl Lowest recorded annual precipitation. Period spanned is 01 January to 31 December.
precipyl_date Date of lowest recorded annual precipitation
bhr Highest barometric pressure reading
bhr_date Date of highest barometric pressure reading
blr Lowest barometric pressure reading
blr_date Date of lowest barometric pressure reading
hemp Highest daily EMP (lightning) hit total
hemp_date Date of highest daily EMP (lightning) hit total
hrad Highest radiation average count
hrad_date Date of highest radiation average count
huv Highest UV index recorded (future)
huv_date Date of highest UV index recorded (future)

Section Contents


Temperatures

Table name: temp
Indexed on: hour,min
Used by: wxnhostd

The temp table holds the outside temperature taken at five minute intervals over the last 24 hours. It is used primarily for determining the temperature rate of change. There will always be 288 records in this table.

Field Description
hour Hour
min Minute
tcr Temperature in degrees Fahrenheit

Section Contents


Winds

Table name: wind
Indexed on: hour,min
Used by: wxnhostd

The wind table holds the wind gust and averages taken at five minute intervals over the last 24 hours. It is used primarily for determining the wind averages. There will always be 288 records in this table.

Field Description
hour Hour
min Minute
wgc_dir Gust direction
wgc_spd Gust speed in MPH
wac_dir Average direction
wac_spd Average speed in MPH

Section Contents


Humidity

Table name: humid
Indexed on: hour,min
Used by: wxnhostd

The humid table holds humidity readings taken at five minute intervals over the last 24 hours. It is used primarily for determining rates. There will always be 288 records in this table.

Field Description
hour Hour
min Minute
hcr humidity

Section Contents


Precipitation

Table name: precip
Indexed on: hour,min
Used by: wxnhostd

The precip table holds precipitation totals taken at five minute intervals over the last 24 hours. It is used primarily for determining precipitation rates. There will always be 288 records in this table.

Field Description
hour Hour
min Minute
plt Last precipitation total

Section Contents


EMP (Lightning)

Table name: emp
Indexed on: dtg_local
Used by: wxnhostd

The emp table holds EMP (lightning) totals taken at the time they occur. It is used primarily for determining EMP rates for the 5, 15, 30, and 60 minute intervals. Unlike the previous rate tables, this one will grow in size over time.

Field Description
dtg_local The local date-time of reading
dtg_zulu Date-time of the reading in UTC
ecount The five minute EMP count recorded.

Section Contents


Background Radiation

Table name: rad
Indexed on: hour,min
Used by: wxnhostd

The rad table holds the background radiation averages taken at five minute intervals over the last 24 hours. It is used primarily for determining hourly and daily averages. There will always be 288 records in this table.

Field Description
hour Hour
min Minute
rlt Last radiation reading

Section Contents


APRS Data Receive Times

Table name: rcvtimes
Indexed on: call_ssid
Used by: wxnaprd

The rcvtimes table holds the date-time that native and extended data packets (types A-E) were received. There is no record for the local host as this would not make any sense. The data from this table can be used to determine if data stored in the nodes table is current.

Field Description
call_ssid The CALLSIGN-SSID of the node in this record
aprs_time Date-time of the last native APRS data packet
a_time Date-time of the last type A extended data packet
b_time Date-time of the last type B extended data packet
c_time Date-time of the last type C extended data packet
d_time Date-time of the last type D extended data packet
e_time Date-time of the last type E extended data packet

Section Contents