# This configuration file is Python code.  You should not
# need to change it; but if you do, you need to know that
# in Python, the *indentation matters*.

# The following will normally be empty lists, like this:
#
#ignore_ADCPs = []
#ignore_other_sensors = []
#
# But if you want to run with only a subset of the ADCPs
# and/or ancillary sensors that are defined in this file,
# you can list the ones you want to ignore like this:
#
#ignore_ADCPs = ['wh300', 'os75']
#ignore_other_sensors = ['GPS']
#
# In this case, you are listing the 'instrument' field of each
# ADCP or sensor you wish to exclude.
#

ignore_ADCPs = []
ignore_other_sensors = []

# 2-letter abbreviation for logging file prefix and constructing dbase name;
# read by procsetup.py
shipabbrev = "oc"


ADCPs = [
        { 'instrument'  :  'os75',
          'setup'       :  'rdi_setup',      
          'terminal'    :  'oswh_term',
          'defaultcmd'  :  'os75_default.cmd',
          'commands'    :  ('EA04500',),
          'datatypes'   :  ('os75bb', 'os75nb'),
          'wakeup_baud' :  9600
        },
        { 'instrument'  :  'nb150',
          'setup'       :  'rdi_setup',
          'terminal'    :  'nb_term',
          'defaultcmd'  :  'nb150_default.cmd',
          'commands'    :  (),
          'datatypes'   :  ('nb150',),
          'wakeup_baud' :  19200
        }

        ]


# Do not edit the next three lines:
common_opts = '-f %s -F -m 1 -H 2 ' % (shipabbrev,)
nb_opts =   '-rlE -c -I'          # raw data, write a log file, log errors
oswh_opts = '-rlE -c -O -I'       # -O for OS/WH data format
                                  # -c for checksum, -I to initiate pinging

sensors = [

        { 'instrument'  :  'os75',       # Passive logging of OS
          'device'      :  'tty_dgnc_0_0',
          'baud'        :   19200,       # Some errors at 115200.
          'format'      :  'binary',
          'subdir'      :  'os75',
          'ext'         :  'raw',
          'opt'         :  oswh_opts}, # Note -I option for new ser_bin.

        { 'instrument'  :  'nb150',
          'device'      :  'tty_dgnc_0_3',  
          'baud'        :   19200,      # Some errors at 115200
          'format'      :  'binary',
          'subdir'      :  'nb150',
          'ext'         :  'raw',
          'opt'         :  nb_opts}, # Note -I option for new ser_bin.


        { 'instrument'  :  'Ashtech',
          'device'      :  'tty_dgnc_0_2',  
          'baud'        :   9600,
          'format'      :  'ascii',
          'subdir'      :  'ashtech',
          'ext'         :  'adu',
          'strings'     :  ('$GPGGA', '$PASHR,ATT'),
          'messages'    :  ('gps', 'adu'),
          'opt'         :  '-tc'},

        { 'instrument'  :  'GPS Trm',
          'device'      :  'tty_dgnc_0_4',  
          'baud'        :   4800,
          'format'      :  'ascii',
          'subdir'      :  'gpsnav',
          'ext'         :  'gps',
          'strings'     :  ('$GPGGA',),
          'messages'    :  ('gps',),
          'opt'         :  '-tc'},

        { 'instrument'  :  'Gyro',
          'device'      :  'tty_dgnc_0_1',   
          'baud'        :   9600,
          'format'      :  'ascii',
          'subdir'      :  'gyro',
          'ext'         :  'hdg',
          'strings'     :  ('$HEHDT',),
          'messages'    :  ('hdg',),
          'opt'         :  '-tc'}  ]

## enabling or disabling this occurs in procsetup_onship.py
speedlog_config = {
    'instrument'        : 'nb150',
    'serial_device'     : '/dev/tty_dgnc_0_7',
    'baud'              : 4800,
    'dir_output'        : '',
    'heading_offset'    : 45.4,
    'scale'             : 1.0,
    'bins'              : (1,12),

    'heading_sensor'    : 'ashtech',
    'heading_msg'       : 'adu',

    'soundspeed_sensor' : None,
    'soundspeed_msg'    : 'snd',
    'nominal_soundspeed': 1536.0,
    }




#### DO NOT CHANGE the following ################

ADCPs = [A for A in ADCPs if A['instrument'] not in ignore_ADCPs]
sensors = [S for S in sensors if S['instrument'] not in ignore_ADCPs]
sensors = [S for S in sensors if S['instrument'] not in ignore_other_sensors]



