Overview:
If  you own a ws2300 weather station (ws22310, ws2315, etc.), operate it in a wired mode, and use the Virtual Weather Station (VWS) software, then you might find this update to the open2300 project useful.  Applying this update will optimize the ws2300 weather station by allowing 8 second interval updates into VWS.

Background:
In the recently released version of VWS (version 12.08), a direct connection to the ws2300 weather station can be made instead of using the HeavyWeather program supplied by LaCrosse Technologies.  The direct communication mechanism released with VWS uses the fetch2300 program from the open2300 project.
The update contained in this package addresses the following limitations that exist with the VWS implementation.  
•	Data refreshes from the ws2300 weather station are limited to 15 seconds.  This is because VWS will allow a minimum sleep time of 10 seconds in between executions of the fetch2300.exe program.  Since the fetch2300.exe program takes a minimum of 5 seconds to complete, the total amount of time needed for one cycle is 15 seconds.  The ws2300 weather station will allow 8 second updates when running in a wired mode.
•	When running at the maximum update frequency, the ws2300 weather station is not able to process data refreshes at the 8 second frequency.  There is not enough processing power available in the ws2300 weather station to allow data updates every 8 seconds and to respond to requests on the COM port from the computer at this frequency.

High-Level Solution:
In order to solve this problem, a new program was added to the open2300 project: vws_fetch2300.exe.  This is a clone of the fetch2300.exe program that writes out only data to the standard out that VWS requires.  It will also create a temporary save data file so that data can be pulled from this temporary file instead querying the ws2300 weather station each time that it is run.  This new program has the following attributes:
•	Each time vws_fetch2300 executes, the wind speed and wind direction is obtained from the ws2300 weather station.
•	The vws_fetch2300 program will obtain other data (temperature, pressure, dew point, etc.) from the ws2300 weather station only if a specified number of seconds has elapsed as compared to the “Measurement Save.txt” file.  Otherwise, the other data is re-used as it was stored in the “Measurement Save.txt” file.  The number of seconds is controllable by a parameter which can be changed in the “Measurement Save.txt” file.
•	The vws_fetch2300 program will also re-define the delay that VWS uses in between data fetches.  This allows for an update period of 8 seconds or less and is controllable by an additional parameter in the “Measurement Save.txt” file.
•	The wind speed and wind direction shared functions were also changed to handle data spikes sometimes generated by EM interference with the anemometer.  This version will return zero wind speed if a spike is detected.  The previous version would attempt a re-try for 10 second intervals for three minutes.
•	The wind speed and wind direction shared functions were also changed to recognize if the anemometer is not plugged into the temperature and humidity sensor.  If it detects this condition, a zero wind speed and zero degrees wind direction will be returned.
•	Instructions for installing the vws_fetch2300 program into the VWS environment can be found in the “vws_fet2300 Install Instructions.txt” file.

Detailed Changes:
Changes have been made to the following code modules to support this release.
cw2300.c	•	Call to wind_current function due to function format change	
Makefile	•	Added vws_fetch2300 to makefile
•	Added .h headers as dependencies to the .c files	
Makefile-windows	•	Added vws_fetch2300 to makefile
•	Added .h headers as dependencies to the .c files	
Measurement Save.txt	•	New file to save measurements
•	Also contains parameters for controlling execution of vws_fetch2300	
rw2300.c	•	Modified wind_current shared function to handle data spikes differently.  This version will update the wind speed to 0 if a spike is detected.  Also, a 0 wind speed and 0 degrees wind direction will be written if it can determine that the anemometer is not connected.  The function now returns a 0 if a wind spike is detected and a 1 otherwise.
•	Modified wind_all shared function to handle data spikes differently.  This version will update the wind speed to 0 if a spike is detected.  Also, a 0 wind speed and 0 degrees wind direction will be written if it can determine that the anemometer is not connected.
•	Created new function read_saved_data to parse data from “Measurement Save.txt”
•	Created new function convert_time convert time to convert date and time strings into time_t data types for comparison.
•	Created new function read_init2300_file to determine first run after VWS is started
•	Created new function write_init2300_file to update VWS batch file to update the sleep delay time.
•	Modified read_history_record to output a zero windspeed and direction if it returns a 51 m/s or greater.  This is a necessary because 51 m/s wind speed will be stored in the history if the anemometer is not connected.	
rw2300.h	•	Added TRUE and FALSE macro values
•	Added save_data_type structure to hold values read in from “Measurement_Save.txt”
•	Modified wind_current function prototype
•	Added new function prototypes:  read_saved_data, convert_time, read_init2300_file, write_init2300_file	
vws_fet2300 Install Instructions.txt	•	Instructions for how to install vws_fetch2300 into the VWS program environment	
vws_fetch2300.c	•	Clone of fetch2300
•	Modifications to obtain only measurements needed by VWS
•	Modifications to produce “Measurement Save.txt” file
•	Calls additional functions to adjust the delay that VWS uses in between calls to fetch2300