configRTFileOptionsSlocum

PURPOSE ^

CONFIGRTFILEOPTIONSSLOCUM Configure download, conversion and loading options for Slocum files in real time.

SYNOPSIS ^

function slocum_options = configRTFileOptionsSlocum()

DESCRIPTION ^

CONFIGRTFILEOPTIONSSLOCUM  Configure download, conversion and loading options for Slocum files in real time.

  Syntax:
    SLOCUM_OPTIONS = CONFIGRTFILEOPTIONSSLOCUM()

  Description:
    SLOCUM_OPTIONS = CONFIGRTFILEOPTIONSSLOCUM() should return a struct
    with the parameters that control the files to retrieve, how they will 
    be converted, and which files and data should be used in real time mode.
    The returned struct should have the following fields:
      LOG_NAME_PATTERN: string with the name pattern of surface log files as
        needed by function GETDOCKSERVERFILES.
        The name of a log file should match this pattern to be downloaded.
      XBD_NAME_PATTERN: string with the name pattern of binary data files as
        needed by function GETDOCKSERVERFILES and LOADSLOCUMDATA.
        The name of a binary file should match this pattern to be downloaded,
        and the conversion to ascii format renames it according to
        this pattern and the replacement string in next field.
      DBA_NAME_REPLACEMENT: string with the name pattern replacement to use
        when converting binary files to ascii.
      DBA_NAME_PATTERN_NAV: string with the name pattern of navigation ascii 
        files to be loaded for processing by function LOADSLOCUMDATA.
        The name of an ascii file should match this pattern to be loaded 
        as a navigation file.
      DBA_NAME_PATTERN_SCI: string with the name pattern of science ascii
        files to be loaded for processing by function LOADSLOCUMDATA.
        The name of an ascii file should match this pattern to be loaded
        as a science file.
      DBA_TIME_SENSOR_NAV: string with the name of the timestamp sensor to use
        in navigation files when combining data from a set of ascii files.
      DBA_TIME_SENSOR_SCI: string with the name of the timestamp sensor to use
        in science files when combining data from a set of ascii files.
      DBA_SENSORS: string cell array with the name of the sensors to include
        in the processing. Restricting the list of sensors to load may reduce
        the memory footprint.

  Examples:
    slocum_options = configRTFileOptionsSlocum()

  See also:
    GETDOCKSERVERFILES
    LOADSLOCUMDATA

  Authors:
    Joan Pau Beltran  <joanpau.beltran@socib.cat>

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

configRTFileOptionsSlocum.m

SOURCE CODE ^

0001 function slocum_options = configRTFileOptionsSlocum()
0002 %CONFIGRTFILEOPTIONSSLOCUM  Configure download, conversion and loading options for Slocum files in real time.
0003 %
0004 %  Syntax:
0005 %    SLOCUM_OPTIONS = CONFIGRTFILEOPTIONSSLOCUM()
0006 %
0007 %  Description:
0008 %    SLOCUM_OPTIONS = CONFIGRTFILEOPTIONSSLOCUM() should return a struct
0009 %    with the parameters that control the files to retrieve, how they will
0010 %    be converted, and which files and data should be used in real time mode.
0011 %    The returned struct should have the following fields:
0012 %      LOG_NAME_PATTERN: string with the name pattern of surface log files as
0013 %        needed by function GETDOCKSERVERFILES.
0014 %        The name of a log file should match this pattern to be downloaded.
0015 %      XBD_NAME_PATTERN: string with the name pattern of binary data files as
0016 %        needed by function GETDOCKSERVERFILES and LOADSLOCUMDATA.
0017 %        The name of a binary file should match this pattern to be downloaded,
0018 %        and the conversion to ascii format renames it according to
0019 %        this pattern and the replacement string in next field.
0020 %      DBA_NAME_REPLACEMENT: string with the name pattern replacement to use
0021 %        when converting binary files to ascii.
0022 %      DBA_NAME_PATTERN_NAV: string with the name pattern of navigation ascii
0023 %        files to be loaded for processing by function LOADSLOCUMDATA.
0024 %        The name of an ascii file should match this pattern to be loaded
0025 %        as a navigation file.
0026 %      DBA_NAME_PATTERN_SCI: string with the name pattern of science ascii
0027 %        files to be loaded for processing by function LOADSLOCUMDATA.
0028 %        The name of an ascii file should match this pattern to be loaded
0029 %        as a science file.
0030 %      DBA_TIME_SENSOR_NAV: string with the name of the timestamp sensor to use
0031 %        in navigation files when combining data from a set of ascii files.
0032 %      DBA_TIME_SENSOR_SCI: string with the name of the timestamp sensor to use
0033 %        in science files when combining data from a set of ascii files.
0034 %      DBA_SENSORS: string cell array with the name of the sensors to include
0035 %        in the processing. Restricting the list of sensors to load may reduce
0036 %        the memory footprint.
0037 %
0038 %  Examples:
0039 %    slocum_options = configRTFileOptionsSlocum()
0040 %
0041 %  See also:
0042 %    GETDOCKSERVERFILES
0043 %    LOADSLOCUMDATA
0044 %
0045 %  Authors:
0046 %    Joan Pau Beltran  <joanpau.beltran@socib.cat>
0047 
0048 %  Copyright (C) 2013-2016
0049 %  ICTS SOCIB - Servei d'observacio i prediccio costaner de les Illes Balears
0050 %  <http://www.socib.es>
0051 %
0052 %  This program is free software: you can redistribute it and/or modify
0053 %  it under the terms of the GNU General Public License as published by
0054 %  the Free Software Foundation, either version 3 of the License, or
0055 %  (at your option) any later version.
0056 %
0057 %  This program is distributed in the hope that it will be useful,
0058 %  but WITHOUT ANY WARRANTY; without even the implied warranty of
0059 %  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0060 %  GNU General Public License for more details.
0061 %
0062 %  You should have received a copy of the GNU General Public License
0063 %  along with this program.  If not, see <http://www.gnu.org/licenses/>.
0064 
0065   error(nargchk(0, 0, nargin, 'struct'));
0066   
0067   % Surface log files of any kind:
0068   slocum_options.log_name_pattern = '^\w+_(modem|network|freewave)_\d{8}T\d{6}\.log$';
0069 
0070   % All binary files, renamed or not:
0071   % slocum_options.xbd_name_pattern = '^(.*)\.([smdtne]bd)$';
0072   % Already renamed binary files of all sizes:
0073   slocum_options.xbd_name_pattern = '^(\w+-\d{4}-\d+-\d+-\d+)\.([smdtne]bd)$';
0074   
0075   % xbd to dba name replacement:
0076   slocum_options.dba_name_replace = '$1-$2.dba';
0077   
0078   % Navigation files to use (restrict the character set if needed):
0079   slocum_options.dba_name_pattern_nav = '^.*-[smd]bd\.dba$';
0080   
0081   % Science files to use: (restrict the character set if needed):
0082   slocum_options.dba_name_pattern_sci = '^.*-[tne]bd\.dba$';
0083   
0084   % Time sensor column in navigation files:
0085   slocum_options.dba_time_sensor_nav = 'm_present_time';
0086   
0087   % Time sensor column in science files:
0088   slocum_options.dba_time_sensor_sci = 'sci_m_present_time';
0089   
0090   % Sensors to load:
0091   slocum_options.dba_sensors = {
0092     'm_present_time'
0093     'm_lat'
0094     'm_lon'
0095     'm_gps_lat'
0096     'm_gps_lon'
0097     'm_gps_status'
0098     'c_wpt_lat'
0099     'c_wpt_lon'
0100     'm_roll'
0101     'm_pitch'
0102     'm_heading'
0103     'm_depth'
0104     'm_final_water_vx'
0105     'm_final_water_vy'
0106     'sci_m_present_time'
0107     'sci_ctd41cp_timestamp'
0108     'sci_water_pressure'
0109     'sci_water_cond'
0110     'sci_water_temp'
0111     'sci_flntu_chlor_units'
0112     'sci_flntu_turb_units'
0113     'sci_flntu_temp'
0114     'sci_flntu_timestamp'
0115     'sci_oxy3835_oxygen'
0116     'sci_oxy3835_saturation'
0117     'sci_oxy3835_temp'
0118     'sci_oxy3835_timestamp'
0119   };
0120   
0121 end

Generated on Fri 06-Oct-2017 10:47:42 by m2html © 2005