SID monitoring station software

The following scripts are available:

SID station scripts

Download

The programs were developped in Perl. They have been tested on Linux platforms as well as on Windows XP.

Current version is 1.0.0.
The scripts can be downloaded through anonymous SVN at the following address:
https://anonsvn.loudet.org/sidstation-scripts/tags/

The gnuplot templates signal-level.plt and goes.plt must also be downloaded.

Under Linux, do not forget to make the script files executable:

chmod +x sidRxTest max187acq sidPlot download-goes

Change Log

Installation

Step 1: Install Perl

Linux

sudo apt-get install perl perl-doc libdbd-mysql-perl

Windows

You can choose from the following Windows distributions of Perl:

Please refer to documentation from each web site for installation instructions.

Step 2: Upgrade Perl and add functionalities

Linux

sudo perl -MCPAN -e shell
install Bundle::CPAN
install DateTime
install Device::SerialPort
install DateTime::Format::MySQL
install DateTime::Format::Epoch::Unix
install DateTime::Format::Natural::Lang::EN
install Readonly
reload cpan
exit

Windows

sudo perl -MCPAN -e shell
install Bundle::CPAN
install DateTime
install Win32::SerialPort
install DateTime::Format::MySQL
install DateTime::Format::Epoch::Unix
install DateTime::Format::Natural::Lang::EN
install Readonly
reload cpan
exit

Step 3: Install MySQL

Linux

sudo apt-get install mysql-server

Windows

You can download MySQL here: http://www.mysql.com/downloads/mysql/.

Please refer to documentation from the web site for installation instructions.

Step 4: Initialize MySQL databases

This section assumes basic knowledge of MySQL database manipulation. Please refer to MySQL documentation.

4.1: Create MySQL VLF database and table

The MySQL VLF database and table must be created as indicated below.

Example is given here for "vlf" as database name, "signal_level" as table name, "DHO38" as channel name, "date" as column name of date values.

CREATE DATABASE vlf;
USE vlf;
CREATE TABLE signal_level ( date DATETIME, DHO38 float,  PRIMARY KEY (date));

Description of the VLF signal_level table:

+---------+----------+------+-----+---------------------+-------+
| Field   | Type     | Null | Key | Default             | Extra |
+---------+----------+------+-----+---------------------+-------+
| date    | datetime | NO   | PRI | 0000-00-00 00:00:00 |       |
| 23400Hz | float    | YES  |     | NULL                |       |
+---------+----------+------+-----+---------------------+-------+

4.2: Create dedicated login for accessing the database from the scripts

The script tools need a login to connect to the MySQL database.
This login must be granted SELECT, UPDATE and INSERT.

Example is given here for "vlf" as database name, "signal_level" as table name, "sidmonitor" as login, "sidmonitor" as password, "192.168.%.%" as acceptable IP address range for this connection.

GRANT SELECT,UPDATE,INSERT ON vlf.signal_level TO 'sidmonitor'@'192.168.%.%' IDENTIFIED BY 'sidmonitor';

4.3: Create MySQL GOES database and table, and grant access to dedicated script login

The MySQL GOES database and table must be created as indicated below.

Example is given here for "spaceweather as database name, "goes" as table name, "goes15" as primary GOES channel name, "date" as column name of date values.

CREATE DATABASE spaceweather;
USE spaceweather;
CREATE TABLE goes ( date DATETIME, goes15 float,  PRIMARY KEY (date));
GRANT SELECT,UPDATE,INSERT ON spaceweather.goes TO 'sidmonitor'@'192.168.%.%' IDENTIFIED BY 'sidmonitor';

Description of the GOES table:

+---------+----------+------+-----+---------------------+-------+
| Field   | Type     | Null | Key | Default             | Extra |
+---------+----------+------+-----+---------------------+-------+
| date    | datetime | NO   | PRI | 0000-00-00 00:00:00 |       |
| goes15  | float    | YES  |     | NULL                |       |
+---------+----------+------+-----+---------------------+-------+

Step 5: Install gnuplot

gnuplot must be installed to generate graphs.

Linux

sudo apt-get install gnuplot msttcorefonts

Windows

Refer to the gnuplot website: http://www.gnuplot.info/download.html.

Step 6: Configure the scripts

sidRxTest does not need any configuration.

max187acq, download-goes and sidPlot need to be configured to ensure proper connection with the MySQL database server.
Information such as MySQL IP address, login/password, database and table names are to be correctly set.

The configuration is done by editing the max187acq, download-goes and sidPlot files with a text editor. Please read carefully the comments. The configurable section is at the beginning of each file.

Help

sidRxTest

] [--interval|-i=] [--help|-h|-?]
    [--man]

      Options:
      --port:         device name for the serial port (e.g. /dev/ttyS0 or COM1)
      --interval:     period in seconds between acquisition updates
      --help, -h, -?: brief message help
      --man:          full documentation

OPTIONS
    --port
        Indicate theh name of the serial port (or USB virtual COM port) to
        use. For instance /dev/ttyS0 on Linux or COM1 on Windows.

    --interval
        Delay in seconds between two data acquisitions.

    --help
        Print a brief help message and exits.

    --man
        Prints the manual page and exits.

DESCRIPTION
    sidRxTest This tool allows to check data acquisition from a MAX187 ADC.
    It performs periodic acquisition of data from a MAX187 (single channel)
    ADC connected to a serial/USB port and shows ADC values.
]]>

max187acq

]
               [--interval|-i=]
               [--channel=]
               [--offset=]
               [--gain=]
               [--help|-h|-?]
               [--man]
               [--verbose]
               [--log|-l=]


      Options:
      --port:         device name for the serial port (e.g. /dev/ttyS0 or COM1)
      --interval:     period in seconds between acquisition updates
      --channel:      name of the MySQL column in which the data will be stored
      --offset:       offset applied to ADC value. Default is 0.0.
      --gain:         gain applied to the ADC value. Default is 1.0.
      --help, -h, -?: brief message help
      --man:          full documentation
      --verbose:      display values
      --log:          logs messages

OPTIONS
    --port
        Indicate theh name of the serial port (or USB virtual COM port) to
        use. For instance /dev/ttyS0 on Linux or COM1 on Windows.

    --interval
        Delay in seconds between two data acquisitions.

    --channel
        Channel name. Corresponds to the name of the MySQL column in which
        the data will be stored.

    --offset
        Indicates an offset value to add to the acquired values. Defaults to
        0.0 (no offset)

    --gain
        Indicates if gain is to applied to the acquired values. Defaults to
        1.0 (no gain).

    --help
        Print a brief help message and exits.

    --man
        Prints the manual page and exits.

    --verbose
        Display all values acquired.

    --log
        Log output to the specified file instead of stdout/stderr.

DESCRIPTION
    max187acq performs periodic acquisition of data from a MAX187 single
    channel ADC converter connected to a serial port and stores the values
    in a MySQL database.
]]>

sidPlot

[::...]]
              [--goes=goes10[:goes11...]]
              [--sun[=PP_AA]]
              [--smooth[=nb]]
              [--gnuplot=]
              [--plot|--graph|--output=]
              [--help|-h|-?]
              [--man]
              [--log=]


      Options:
      --day, --start, --end:     plot time axis limits
      --channels:                list of signal level channels to plot
      --goes:                    list of GOES data to plot
      --sun:                     show sun position
      --smooth:                  enable signal level plot smoothing
      --gnuplot:                 path to gnuplot executable
      --plot, --graph, --output: plot filename
      --help, -h, -?:            brief help message
      --man:                     full documentation
      --log:                     logs messages

OPTIONS
    --day
    --start
    --end
        Use 'day' option for a full day display or precise start and end UTC
        times.

    --channels
        List of signal level channels to display, colon or comma separated.

    --goes
        List of goes channels to display, column or comma separated.

    --sun
        Show sun position. If sun is set but empty, defaults is 11_75

        (mid point at 75km high)

        PP is the sub reflective position (11 is middle of the path)

        AA is the altitude in km above ground (60,75,90)

    --smooth
        Indicates if signal level plot is smoothed out by averaging points
        at the same position on the time axis.

        --smooth or --smooth=1
              each point plotted is an average of all points that would
              appear at the same x index on the graph.

        --smooth=n
              n points are plotted at each x-index, averaging (all points /
              n)

        --smooth=0 (default)
              means that all points are plotted.

    --gnuplot
        Indicate location of gnuplot executable (gnuplot.exe on Windows)

    --plot or --graph or --output
        Indicate the filename of the generated image file. Defaults to
        sid.png.

    --help
        Print a brief help message and exits.

    --man
        Prints the manual page and exits.

    --log
        Log output to the specified file. Defaults to stdout.

DESCRIPTION
    sidPlot generate a graph with the VLF signal level, the GOES x-ray flux,
    and the sun position.
]]>

download-goes

]] [--secondary[=]]
                   [--help|-h|-?] [--man]
                   [--verbose] [--log|-l=]
 
      --force-update: force the update of existing entries in the database
      --primary: name of the primary GOES database column name (e.g. goes15)
      --secondary: name of the secondary GOES database column name
      --help, -h, -?: brief message help
      --man:          full documentation
      --verbose:      display values
      --log:          logs messages

OPTIONS
    --force-update
        Force overwriting all values already stored in the MySQL database
        with values dataloaded.

    --primary
        Name of the primary GOES database column name (e.g. goes15). Can be
        set to an empty value to disable update of primary GOES data.

    --secondary
        Name of the secondary GOES database column name. Can be set to an
        empty value to disable update of secondary GOES data

    --help
        Print a brief help message and exits.

    --man
        Prints the manual page and exits.

    --verbose
        Display all values acquired.

    --log
        Log output to the specified file instead of stdout/stderr.

DESCRIPTION
    download-goes downloads goes data and stores it in a MySQL database.
]]>
Creative Commons License SID monitoring station by Lionel LOUDET is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Disclaimer
Last Update: 23 Apr 2011
Apache Web Server PHP
Apache/2.4.62 (Debian)
Valid XHTML + RDFa Valid CSS!
Page generated in 0.001 seconds.