; Standard configuration setup.cfg file for a MicroRider on a TWE Slocum glider.
; Created by RSI, 2015-12-17
; Modified by RSI AB, 2016-02-24
; Edited pressure coefficient to 0 at RSI by subtracting 0.97 from coeff 0 2016-08-15
; Any line that starts with a semicolon, ";", is a comment and is ignored by 
;  software. Likewise, everything to the right of a semicolon is ignored.
;  Use this feature to leave notes and to indicate that you have made changes 
;  to this file. Indicate the date (YYYY-MM-DD), your name and a brief 
;  description of your changes.
; MicroRiders are internally recording instruments.
; Replaced ASTP-LP with TE VMP250 gain reduced shear and accel channels.2016-08-15.
; Replaced ASTP-LP with normal SN199 2018-06-05 DC.
; Adjusted setup file for MBARI Lease  2021-09-08 AB
; Changed vehicle type to rvmp for mbari cpf, 2021-10-05 Evan at Rockland. 
; Modified by Magdalena Carranza @ MBARI, 10-26-2021: 
; - expanded cruise info, 
; - modified sensor dependent parameters (sens, SN and cal_date) for shear probes SH1 (SN:M2406) and SH2 (SN:M2407)

; The first section is the [root] section. It determines the data 
;  acquisition parameters. It does not need to be declared explicitly.

rate        = 512    ; The sampling rate of fast channels
prefix      = dat_   ; The base name of your data files. A 3-digit 
					 ;  file number is appended to this base name.
					 ; The limit is 8 characters total for internally
                     ;  recording instruments.
disk        = /data  ; The directory for the data files. Use /data only.
recsize     = 1      ; The size of a record in seconds
no-fast     = 6      ; number of fast "columns" in the address matrix (see below).
no-slow     = 2      ; number of slow "columns" in the address matrix.

; -----------------
;This section presents the address [matrix] of your instrument and 
;  automatically ends the [root] section above. The first columns are "slow"
;  channels as defined by the "no-slow" parameter in the [root] section.
;  The remainder are "fast" columns ("no-fast").
[matrix]
num_rows=8
row01   =	255	0	1	2	5	7	8	9			
row02   =	32	40	1	2	5	7	8	9		
row03   =	41	42	1	2	5	7	8	9		
row04   =	4	6	1	2	5	7	8	9		
row05   =	10	11	1	2	5	7	8	9		
row06   =	12	0	1	2	5	7	8	9		
row07   =	0	0	1	2	5	7	8	9		
row08   =	0	0	1	2	5	7	8	9		

; --------------------
;This section identifies your instrument. Only the vehicle is important.
[instrument_info]
vehicle = RVMP ; rising VMP, upward profiles for Coastal Profiling Float, downward profiles ignored
; vehicle = VMP ; change back to this one for downward profiles. 
model   = mr_1000       ; the actual model
sn      = 174           ; the serial number of the instrument

; --------------------
; The next section is optional and can be expanded. Do not use the parameter "id = ".
[cruise_info]
operator    = MBARI-MagdalenaCarranza
project     = TurbulenceScoping
ship        = Paragon
leg         =
glider      = CPF003

; --------------------
; Next come the [channel] sections. These are used to convert your data 
;  into physical units, and to save them into a mat-file. 
;  They also determine the name given to various signals 
;  in your data file. Please, stick to the convention of 
;  RSI because data visualization using the RSI Matlab Library of functions
;  assumes particular names. However, data will be converted into physical
;  units regardless of the name of the channels. If you change the names,
;  then data visualization and further processing is your responsibility.
;  A list of typical channel addresses (id) and their names and functions
;  is at the end of this file.

; Each channel section consists of a part that is unique to your instrument.
;  It does not need to be changed. The second part is dependent on your 
;  sensors (shear probes, FP07 thermistors, etc.) and must be updated 
;  whenever you change a probe.

; The ground reference channel.
[channel]
; instrument dependent parameters
id      = 0   ; the channel address, 0 to 255.  Listed in the [matrix] section.
name    = Gnd ; the name it will have in the mat-file.
type    = gnd ; the algorithm used to convert raw data into physical units.
coef0   = 0   ; the coefficients required for conversion. None in this case.

; --------------
; The piezo-vibration sensors
[channel]
; instrument dependent parameters
id      = 1
name    = Ax
type    = piezo
; units = [counts]

[channel]
; instrument dependent parameters
id      = 2
name    = Ay
type    = piezo
; units = [counts]

; -----------------
; The thermistor channels
; without pre-emphasis
[channel]
; instrument dependent parameters
id=4
name=T1
type=therm
adc_fs  = 4.096
adc_bits= 16
a       =-3.9
b       = 0.99776
G       = 6.0
E_B     = 0.68234
; sensor dependent parameters
SN      = T1000
beta_1  = 3143.55
beta_2  = 2.5e5
T_0     = 289.301
cal_date=
; units = [C]

; with pre-emphasis
[channel]
; instrument dependent parameters
id          = 5
name        = T1_dT1
type        = therm
diff_gain   = 0.924

; without pre-emphasis
[channel]
; instrument dependent parameters
id      = 6
name    = T2
type    = therm
adc_fs  = 4.096
adc_bits= 16
a       =-5.4
b       = 0.99852
G       = 6.0
E_B     = 0.68231
; sensor dependent parameters
SN      = T1001
beta_1  = 3143.55
beta_2  = 2.5e5
T_0     = 289.301
cal_date=
; units = [C]

; with pre-emphasis
[channel]
; instrument dependent parameters
id          = 7
name        = T2_dT2
type        = therm
diff_gain   = 0.908

; -----------------
; The shear probe channels
[channel]
; instrument dependent parameters
id          = 8
name        = sh1
type        = shear
adc_fs      = 4.096
adc_bits    = 16
diff_gain   = 0.942
; sensor dependent parameters
sens        = 0.0819
SN          = M2406
cal_date    = 2021-06-02

[channel]
; instrument dependent parameters
id          = 9
name        = sh2
type        = shear
adc_fs      = 4.096
adc_bits    = 16
diff_gain   = 0.948
; sensor dependent parameters
sens        = 0.0835
SN          = M2407
cal_date    = 2021-05-25

; -----------------
; The pressure transducer
; without pre-emphasis
[channel]
; instrument dependent parameters
id          = 10
name        = P
type        = poly
; sensor dependent parameters
coef0       = -5.58  ;offset reading to zero. -4.61(coef0) - 0.97(p.ch. reading)= -5.58
coef1       = 0.054394
coef2       = 3.4713e-8
cal_date    = 2018-06-05
;units       = [dBar]

; with pre-emphasis
[channel]
; instrument dependent parameters
id          = 11
name        = P_dP
type        = poly
diff_gain   = 20.53

; pressure transducer voltage
[channel]
; instrument dependent parameters
id      = 12
name    = PV
type    = poly
coef0   = 4.096
coef1   = 1.25e-4
; units   = [V]

; -----------------
; Battery voltage or power supply voltage
[channel]
; instrument dependent parameters
id          = 32
name        = V_Bat
type        = voltage
G           = 0.1
adc_fs      = 4.096
adc_bits    = 16
; units       = [V]

; -----------------
; The ADIS precision inclinometer with built in thermometer
[channel]
; instrument dependent parameters
id      = 40
name    = Incl_Y
type    = inclxy
; sensor dependent parameters
coef0   = 0
coef1   = 0.025
; units   = [degree]

[channel]
; instrument dependent parameters
id      = 41
name    = Incl_X
type    = inclxy
; sensor dependent parameters
coef0   = 0
coef1   = -0.025
; units   = [degree]

[channel]
; instrument dependent parameters
id      = 42
name    = Incl_T
type    = inclt
; sensor dependent parameters
coef0   = 624
coef1   =-0.47
; units   = [C]

; -------------------------


; ------------------
; This is a list of typical channels (addresses) and their signals
; that are currently available for a MicroRider on a TWE Slocum glider.

;  id     Name   - rate - Signal
; -------------------------------------------------------------------
;  0     Gnd     - slow - Reference ground
;  1     Ay      - fast - athwartship acceleration. 
;  2     Az      - fast - vertical acceleration parallel to the direction of the pressure port.
;  4     T1      - slow - Temperature from Thermistor 1 without pre-emphasis
;  5     T1_dT1  - fast - Temperature from Thermistor 1 with pre-emphasis
;  6     T2      - slow - Temperature from Thermistor 2 without pre-emphasis
;  7     T2_dT2  - fast - Temperature from Thermistor 2 with pre-emphasis
;  8     sh1     - fast - velocity derivative from shear probe 1
;  9 	 sh2     - fast - velocity derivative from shear probe 2
; 10     P       - slow - pressure signal without pre-emphasis
; 11     P_dP    - slow - pressure signal with pre-emphasis
; 12     PV      - slow - voltage on pressure transducer
; 32     V_Bat   - slow - Battery or power supply voltage
; 40     Incl_Y  - slow - Inclinometer, rotation around the Y-axis
; 41     Incl_X  - slow - Inclinometer, rotation around the X-axis
; 42     Incl_T  - slow - Inclinometer, its temperature 
; 255    sp_char - slow - special Character that always returns 32752D or 7FF0H and 
;                         is used to test the integrity of communication.
;
; End of setup configuration file.

