# 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. # # always restart the GUI and a new cruise after making changes # to sennsor_cfg.py ignore_ADCPs = [] # if enabling all 3 #ignore_ADCPs = ['wh300',] # if only using os150 and os75 ignore_other_sensors = [] use_publishers = False # 2-letter abbreviation for logging file prefix and constructing dbase name; # read by procsetup.py shipabbrev = "skq" 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' : 'os150', 'setup' : 'rdi_setup', 'terminal' : 'oswh_term', 'defaultcmd' : 'os150_default.cmd', 'commands' : ('EA04500',), 'datatypes' : ('os150nb', 'os150bb'), 'wakeup_baud' : 9600 }, { 'instrument' : 'os75', 'setup' : 'rdi_setup', 'terminal' : 'oswh_term', 'defaultcmd' : 'os75_default.cmd', 'commands' : ('EA04500',), # 45deg to stbd 'datatypes' : ('os75nb', 'os75bb'), 'wakeup_baud' : 9600 }, ] common_opts = '-f %s -F -m 1 -H 2 ' % (shipabbrev,) oswh_opts = '-lE -c -O -I' # -O for OS/WH data format # -c for checksum, -I to initiate pinging # In the following list of "sensors" (which are simply serial streams # being logged) the ADCPs must come first, and they must come in # the same order as in the ADCPs list above; that is, there must # be a 1:1 correspondence between the instrument fields in the # ADCPs list and those in the first entries in the sensors list. sensors = [ { 'instrument' : 'wh300', 'device' : 'ttyUSB4', 'baud' : 38400, 'format' : 'binary', 'subdir' : 'wh300', 'ext' : 'raw', 'opt' : oswh_opts , }, { 'instrument' : 'os150', # Passive logging of OS150 'device' : 'ttyUSB6', 'baud' : 38400, #9600, #115200, #19200, #38400, 'format' : 'binary', 'subdir' : 'os150', 'ext' : 'raw', 'opt' : oswh_opts, }, # Note -I option for new ser_bin. { 'instrument' : 'os75', # Passive logging of OS 'device' : 'ttyUSB7', 'baud' : 38400, #9600, #115200, #19200, #38400, 'format' : 'binary', 'subdir' : 'os75', 'ext' : 'raw', 'opt' : oswh_opts, }, # Note -I option for new ser_bin. { 'instrument' : 'SeaPath', 'device' : 'ttyUSB0', 'baud' : 9600, 'format' : 'ascii', 'subdir' : 'seapath', 'ext' : 'sea', 'strings' : ('$GPGGA','$PSXN,20','$PSXN,23','$GPHDT'), 'messages' : ('gps', 'sea', 'hdg'), #hdg 'opt' : '-c -Y2', # $PYRTM }, { 'instrument' : 'C-NAV', 'device' : 'ttyUSB1', 'baud' : 9600, 'format' : 'ascii', 'subdir' : 'cnav', #primary position for processing 'ext' : 'gps', # 'strings' : ('',), # all 'strings' : ('$PHGGA', '$GPGGA', '$GNGGA', '$INGGA',), 'messages' : ('gps',), 'opt' : '-c -Y2', # $PYRTM }, { 'instrument' : 'Gyro1', 'device' : 'ttyUSB2', 'baud' : 4800, 'format' : 'ascii', 'subdir' : 'gyro1', 'ext' : 'hdg', 'strings' : ('$HEHDT',), 'messages' : ('hdg',), 'opt' : '-c -Y2 -s9', # $PYRTM }, { 'instrument' : 'Gyro2', 'device' : 'ttyUSB3', 'baud' : 4800, 'format' : 'ascii', 'subdir' : 'gyro2', 'ext' : 'hdg', 'strings' : ('$HEHDT',), 'messages' : ('hdg',), 'opt' : '-c -Y2 -s9', # $PYRTM }, ] ## enabling or disabling this occurs in uhdas_cfg.py ## speedlog: enabled in /home/adcp/config/uhdas_cfg.py speedlog_config = { 'instrument' : 'wh300', # 'os150', 'serial_device' : '', # no serial out (else: '/dev/ttyUSB1',) 'baud' : 9600, 'eth_port' : 'enp3s0', # this is the NIC to serve web_speedlog.py 'udp' : '10.1.0.255:58989', 'zmq_from_bin' : "tcp://127.0.0.1:38010", # port to read os75 indexing 'pub_addr' : "tcp://127.0.0.1:38020", # port to publish speedlog #NO SPACES # 'heading_offset' : xx.x, # uses h_align; better would be from EA_estimator.py 'scale' : 1.0, # multiplies velocity measurement 'bins' : (1,3), # zero-based; input to python slice() 'navg' : 5, # pings to average } ## this section describes... publishers = [ { 'subdir' : 'cnav', 'pub_addr' : 'tcp://127.0.0.1:38000', # uses this port #NO SPACES 'sample_opts' : '-c -Y2 -s60', # $PYRTM }, ] #### 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)