
pywws.LogData
*************

Save weather station history to file

   usage: python RunModule.py LogData [options] data_dir
   options are:
    -h   | --help     display this help
    -c   | --clear    clear weather station's memory full indicator
    -s n | --sync n   set quality of synchronisation to weather station (0 or 1)
    -v   | --verbose  increase number of informative messages
   data_dir is the root directory of the weather data

This program / module gets data from the weather station's memory and
stores it to file. Each time it is run it fetches all data that is
newer than the last stored data, so it only needs to be run every hour
or so. As the weather station typically stores two weeks' readings
(depending on the logging interval), LogData.py could be run quite
infrequently if you don't need up-to-date data.

There is no date or time information in the raw weather station data,
so LogData.py creates a time stamp for each reading. It uses the
computer's clock, rather than the weather station clock which can not
be read accurately by the computer. A networked computer should have
its clock set accurately by ntp.

Synchronisation with the weather station is achieved by waiting for a
change in the current data. There are two levels of synchronisation,
set by the config file or a command line option. Level 0 is quicker,
but is only accurate to around twelve seconds. Level 1 waits until the
weather station stores a new logged record, and gets time stamps
accurate to a couple of seconds. Note that this could take a long
time, if the logging interval is greater than the recommended five
minutes.

-[ Functions ]-

+------------+--------------------------------------------------------------------------------------------+
+------------+--------------------------------------------------------------------------------------------+
+------------+--------------------------------------------------------------------------------------------+
+------------+--------------------------------------------------------------------------------------------+
+------------+--------------------------------------------------------------------------------------------+

pywws.LogData.Catchup(ws, logger, raw_data, last_date, last_ptr)

pywws.LogData.CheckFixedBlock(ws, params, logger)

pywws.LogData.LogData(params, raw_data, sync=None, clear=False)

pywws.LogData.main(argv=None)
