# 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 = ['os38',] ignore_ADCPs = ['wh300'] #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 = [] use_publishers = True #use_publishers = False # 2-letter abbreviation for logging file prefix and constructing dbase name; # read by procsetup.py shipabbrev = "ex" ADCPs = [ { 'instrument' : 'wh300', 'setup' : 'rdi_setup', 'terminal' : 'oswh_term', 'defaultcmd' : 'wh300_default.cmd', 'commands' : ('CL0',), # is required to make bottom track work 'datatypes' : ('wh300',), 'wakeup_baud' : 9600 }, { 'instrument' : 'os38', 'setup' : 'rdi_setup', 'terminal' : 'oswh_term', 'defaultcmd' : 'os38_default.cmd', # 'commands' : ('EA04500',), 'commands' : ('EA04500', 'EC1500', 'EZ0011101'), #constant soundspeed 'datatypes' : ('os38bb', 'os38nb'), 'wakeup_baud' : 9600 } ] # 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' : 'wh300', 'device' : 'ttyUSB4', 'baud' : 38400, 'format' : 'binary', 'subdir' : 'wh300', 'ext' : 'raw', 'opt' : oswh_opts, }, { 'instrument' : 'os38', # Passive logging of OS 'device' : 'ttyUSB5', 'baud' : 38400, 'format' : 'binary', 'subdir' : 'os38', 'ext' : 'raw', 'opt' : oswh_opts}, { 'instrument' : 'C-Nav', 'device' : 'ttyUSB3', 'baud' : 9600, 'format' : 'ascii', 'subdir' : 'cnav', 'ext' : 'gps', 'strings' : ('',), # all # ('$GPGGA',), ### maybe this isn't the only message... 'messages' : ('gps',), 'opt' : '-tc'}, { 'instrument' : 'POS/MV', 'device' : 'ttyUSB6', 'baud' : 9600, 'format' : 'ascii', 'subdir' : 'posmv', 'ext' : 'pmv', 'strings' : ('$GPGGA', '$PASHR'), # use () for all 'messages' : ('gps', 'pmv'), 'opt' : '-tc'}, { 'instrument' : 'Gyro', 'device' : 'ttyUSB0', 'baud' : 4800, 'format' : 'ascii', 'subdir' : 'gyro', 'ext' : 'hdg', 'strings' : ('$HEHDT',), 'messages' : ('hdg',), 'opt' : '-tc -s5'}, # comes in at 10Hz ] ## speedlog: enabled in /home/adcp/config/uhdas_cfg.py speedlog_config = { 'instrument' : 'os38', 'serial_device' : '/dev/ttyUSB1', 'baud' : 9600, 'zmq_from_bin' : "tcp://127.0.0.1:38010", 'pub_addr' : 'tcp://127.0.0.1:38020', #NO SPACES # 'heading_offset' : xx.x, # get from EA_estimator.py 'scale' : 1.0, # multiplies velocity measurement 'bins' : (0,1), # zero-based; input to python slice() 'navg' : 5, # pings to average } ## this section describes... publishers = [ { 'subdir' : 'posmv', 'pub_addr' : 'tcp://127.0.0.1:38000', # uses this port #NO SPACES 'sample_opts' : '-tc -s60', 'autopilot_msg': '$GPGGA', # autopilot looks at this position msg }, ] #### 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] from uhdas.uhdas import make_publishers # append zmq_from_bin port to opts in appropriate ADCP sensor block make_publishers.modify_sensors_for_speedlog(sensors, speedlog_config) # substitute publishers into sensors for zmq publishing if use_publishers==True: make_publishers.modify_sensors_and_publishers(sensors, publishers)