Logiciel pour la station de surveillance des PIDB

Les programmes suivants sont disponibles :

SID station scripts

Téléchargement

Les logiciels ont été développés en Perl. Ils ont été testés sous Linux ainsi que sous Windows XP.

La version actuelle est 1.0.0.
Les scripts peuvent être téléchargés par SVN anonyme à l'adresse :
https://anonsvn.loudet.org/sidstation-scripts/tags/

Les templates gnuplot signal-level.plt et goes.plt doivent aussi être téléchargés.

Sous Linux, ne pas oublier de rendre les fichiers exécutables :

chmod +x sidRxTest max187acq sidPlot download-goes

Historique

Installation

Etape 1: Installation de Perl

Linux

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

Windows

Vous pouvez choisir parmi ces distributions de Perl :

Veuillez suivre les instructions d'installation décrites dans ces sites.

Etape 2: Mise à jour de Perl et ajout de librairies

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

Etape 3: Installation de MySQL

Linux

sudo apt-get install mysql-server

Windows

Vous pouvez télécharger MySQL ici : http://www.mysql.com/downloads/mysql/.

Veuillez suivre les instructions d'installation décrites dans ce site.

Etape 4: Initialisation des bases de données MySQL

Cette partie suppose une connaissance de base de MySQL. Merci de vous reférer à la documentation de MySQL.

4.1: Creation de la base de données MySQL pour les mesures d'amplitude

La base de données MySQL VLF et la table doivent être définies comme décrit ci-dessous.

Cet exemple est donné avec "vlf" en tant que nom de base de donnnées, "signal_level" comme nom de table, "DHO38" comme nom de colonne, "date" comme nom de colonne pour les dates et heures.

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

Description de la table VLF signal_level :

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

4.2: Création d'un login spécifique

Les scripts ont besoin d'un login spécifique pour accéder à la base de données.
Ce login doit avoir les droits SELECT, UPDATE et INSERT.

L'exemple ci-dessous est donné pour en tant que nom de base de donnnées, "signal_level" comme nom de table, "sidmonitor" pour le login, "sidmonitor" pour le mot de passe et "192.168.%.%" pour la plage d'adresses IP autorisées pour la connexion.

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

4.3: Creation de la base de données MySQL pour les mesures GOES

La base de données MySQL VLF et la table doivent être définies comme décrit ci-dessous.

L'exemple est donné pour "spaceweather en tant que nom de base de données, "goes" en tant que nom de table, "goes15" pour le satellite GOES primaire, "date" comme nom de colonne pour les dates et heures.

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 de la table GOES :

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

Etape 5: Installation de gnuplot

gnuplot doit être installé pour la génération des graphiques.

Linux

sudo apt-get install gnuplot msttcorefonts

Windows

Voir la procédure d'installation sur le site de gnuplot : http://www.gnuplot.info/download.html.

Etape 6: Configuration des scripts

sidRxTest n'a pas besoin d'être configuré.

max187acq, download-goes et sidPlot doivent être configurés afin de permettre une connexion correcte avec le serveur MySQL.
Il est nécessaire de préciser des données telles que l'adresse IP du serveur MySQL, le login/password à utiliser, les noms des bases de données et des tables.

La configuration est faite en éditant les fichiers max187acq, download-goes et sidPlot. Merci de lire avec attention les commentaires dans les fichiers. La section configurable est au début de chaque fichier.

Aide

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.
]]>
Licence Creative Commons SID Monitoring Station de Lionel LOUDET est mis à disposition selon les termes de la
licence Creative Commons Attribution - Pas d’Utilisation Commerciale - Partage dans les Mêmes Conditions 3.0 non transposé.
Disclaimer
Dernière mise à jour : 23 Apr 2011
Apache Web Server PHP
Apache/2.4.59 (Debian)
Valid XHTML + RDFa Valid CSS!
Page générée en 0.016 secondes.