# autoexec.mi for unit 1142
					
# Date		e-mail address			comment
# 10-24-20223	bill.rathjen@teledyne.com		initial setting

name colin_1142

# SERIAL NUMBER RECORD						

# Forward section assy	#789
# Payload bay assy		#1675
# Aft section assy		#1150
# Aft electronic assy	#1154
# Aft end cap assy		#300
# Radomefin		#1602
# Pressure transducer	#137857
# Aft hull			#3851
# Fwd hull		#3874
# Freewave master		#714-1087
# Iridium sim card		#8988169234004449153
# Argos ID		#DEC  245536  HEX 552F500 
# Altimeter		#60880188
# Pitch motor		#560
# 200- Ballast drive		#N/A
# 1000- Motor controller	#437
# 1000- Pump assy		#926
# 1000- Valve assy		#877
# Science SOM		#769
# science motherboard	#339
# Science flashcard		#N/A
# seabird CTD		#214027
# Main board		#496
# Communication board	#JJ26008
# Iridium phone		#531
# Main flashcard		#N/A
# Main SOM		#642
# Attitude sensor		#44342
# Air pump		#1609
# Communications Assy	#232
# Freewave Slave		#713-8767
# GPS			#1766
# Argos X-cat		#1425
# Air bladder		#43649182-2




#INSTALLED DEVICES						

#installed buoyancy_pump
#installed de_pump
installed hd_pump
installed gps
installed attitude_rev
installed ocean_pressure
installed vacuum
installed battery
installed argos
installed air_pump
installed pitch_motor
installed science_super
installed digifin
installed altimeter
installed iridium
#installed recovery
installed coulomb
installed leakdetect
installed veh_temp
#installed thruster

#VEHICLE SETTINGS

# Depth Ratings
# Max working depth: 51 for 50m glider, 102 for 100m, 206 for 200m, 360 for 350m, 1050 for 1000m
  sensor: F_MAX_WORKING_DEPTH(m)		1050

# Crush Depth: 225 for 50m, 100m, 200m, and 1200 for 1000m
  sensor: F_CRUSH_DEPTH(m)			1200   
					
# UNCOMMENT THIS WHEN FLYING A DEEP GLIDER IN SHALLOW WATER
# Reduce this so sensor_processing doesn't think that our dive is a hover!
# sensor: u_hovering_frac_nom_dive_rate(nodim)	0.15

# Required to be above this depth to be considered at surface 
# 
  sensor: u_reqd_depth_at_surface(m)		4

# Disable this in shallow water
  sensor: u_alt_filter_enabled(bool)       	1 		# enable median filter depth for altitude

# Altimeter model, 0 for Benthos and 1 for Airmmar, -1 for experimental
  sensor: f_altimeter_model(enum)		1		# airmar(mod1)

# Argos format 
  sensor: f_argos_format(enum)		1		# 0  rev0 legacy/smartcat (32 byte)
							# 1  rev1 Mar05/xcat  (31 byte)
# current correction on
  sensor: u_use_current_correction(nodim)	1

# File Compression
  sensor: u_use_file_compression(bool)          	1		# 0 disables compression  #### See 10.05 readme.txt ####
                                                                			# 1 enables compression

# The type of battery being used must be uncommented:
  # sensor: f_coulomb_battery_capacity(amp-hrs)	120         	# nominal alkaline                     --- Set mission undervolts abort to 10
  # sensor: f_coulomb_battery_capacity(amp-hrs) 	550         	# 4s                                   --- Set mission undervolts abort to 12
  # sensor: f_coulomb_battery_capacity(amp-hrs) 	800         	# 4s extended energy bay               --- Set mission undervolts abort to 12
  # sensor: f_coulomb_battery_capacity(amp-hrs) 	215        	# TWR rechargeable                     --- Set mission undervolts abort to 12.5
     sensor: f_coulomb_battery_capacity(amp-hrs) 	300         	# TWR rechargeable extended energy bay --- Set mission undervolts abort to 12.5

						

# IRIDIUM PHONE
# The alternate number is configurable to be available
# In the event of shore side failure resulting in inabilityos
# to complete an iridium call.  Software will "toggle"
# to the alternate number and remain there until told
# otherwise.  Both numbers MUST be uncommented or the masterdata
# default will be used.


# For a commercial card:                                               
  sensor: c_iridium_phone_num(digits)              881600005140      	# https://sfmc.webbresearch.com or enter users #here
  sensor: c_iridium_phone_num_alt(digits)        17818711614      	# number of leading zeros in phone 
  sensor: c_iridium_lead_zeros(nodim)               2            		# typically 2 for both commercial or military       
                                                                    

#VEHICLE CALIBRATIONS

# Buoyancy pump (shallow pump only)
  sensor: f_ballast_pumped_nominal_vel(cc/sec)	26		# in, nominal speed, 80 for 50m, 42 for 100m, 26 for 200m
  sensor: f_ballast_pumped_safety_max(cc)	555.0		# in, damage to glider
  sensor: f_ballast_pumped_deadz_width(cc)	20.0		# in, sets x_ limit
  sensor: f_ballast_pumped_db_frac_dz(nodim)	1.0		# deadband as fraction of dead zone
  sensor: f_ballast_pumped_cal_m(cc/Volt)	600.000		# in, slope
  sensor: f_ballast_pumped_cal_b(cc)		-450.000		# in, y-intercept
  sensor: u_ballast_pumped_stop_distance(cc)	2		# in, stopping distance after motor off
							# change to 2 for 200m glider, 5 for 100m glider, 7 for 50m glider

# Oil volume (deep pump only)
  sensor: f_de_oil_vol_pot_voltage_min(volts)	0.933		# raw AD voltage of fully retracted pot
  sensor: f_de_oil_vol_pot_voltage_max(volts) 	2.286		# raw AD voltage of fully extended pot
  sensor: f_de_oil_vol_in_system(cc)            	960             	# volume of internal oil reservoir
  sensor: f_de_oil_vol_safety_max(cc)           	460.0           	# shouldn't go beyond this
  sensor: f_de_oil_vol_deadz_width(cc)          	40.0           	# to give 40cc deadband for f_de_oil_vol_db_frac_dz=1
  sensor: f_de_oil_vol_db_frac_dz(nodim)         	1.0            	# deadband as fraction of dead zone



# 3 way valve
  sensor: f_valve_restrict(int)                 935		# ballvalve AD reading at restrict
  sensor: f_valve_open(int)                     3174		# ballvalve AD reading at open

# sensor: f_valve_tolerance(int)                160          	# +/- tolerance hitting the spot


  
# Battery Position
# max battpos = safety_max - deadzone
# x_max_battpos = f_safety_max_battpos - f_deadzone_width_battpos
  sensor: f_battpos_deadzone_width(inches)	0.2		# Sets x_ limit
  sensor: f_battpos_db_frac_dz(nodim)		0.5		# deadband as fraction of dead zone
  sensor: f_battpos_nominal_vel(inches/sec)	0.15		# nominal speed for REV.A motor
							# Specs linear relationship between sensor units (inches) and the		
							# voltage we actually read out of the AD for position         
							# battpos(inches) = _cal_m(inches/Volt) * volts + _cal_b(inches

#UNCOMMENT THE CALIBRATION NUMBERS FOR THE GLIDER CONFIGURATION
  sensor: f_battpos_safety_max(inches)	1.1		# in, damage to glider(1000m Lithium G-1405-L Hulls)
  sensor: f_battpos_cal_m(inches/Volt)		2.157		# slope
  sensor: f_battpos_cal_b(inches)		-1.801 		# y-intercept(1000m Lithium G-1405-L HullS)

# sensor: f_battpos_safety_max(inches)	1.3		# in, damage to glider(1000m Alkaline G-1405-L Hulls)
# sensor: f_battpos_cal_m(inches/Volt)	2.157		# slope
# sensor: f_battpos_cal_b(inches)		-1.951		# y-intercept(1000m Alkaline G-1405-L HullS)



# vacuum
  sensor: u_vacuum_cal_m(inHg/Volt)		-13.814		# Factory Calibration data
  sensor: u_vacuum_cal_b(inHg)		30.166		# inHg = m V + b

# ocean_pressure
  sensor: f_ocean_pressure_full_scale(bar)	140.000		# pressure @ FS volts (140 for 2000A, 24 for 300A)
  sensor: f_ocean_pressure_min(volts)		0.098		# voltage for 0 pressure
  sensor: f_ocean_pressure_max(volts)		1.645		# voltage for FS pressure

# max fin = safety_max - deadzone
  sensor: f_fin_safety_max(rad)		0.470		# in, damage to glider.
  sensor: f_fin_deadzone_width(rad)		0.02		# in, Sets x_ limit

  sensor: c_thruster_current_cal(nodim) 	0.0402		# A / count cal for thruster current. 10-25-2023  BR

#PAYLOAD BAY SETTINGS AND CALIBRATIONS				

# Turns science computer on
  sensor: c_science_on(bool)			1 

# sensor specific calibration constants for FLBBCD SN 8259				
				
  sensor: u_flbbcd_chlor_cwo(nodim)     	51		# clean water dark offset, nodim == counts	
  sensor: u_flbbcd_bb_cwo(nodim)         	49		# clean water dark offset, nodim == counts	
  sensor: u_flbbcd_cdom_cwo(nodim)       	50		# clean water dark offset, nodim == counts	
  sensor: u_flbbcd_chlor_sf(ug/l/nodim)  	0.0073		# scale factor to get units	
  sensor: u_flbbcd_bb_sf(Mnodim)         	1.719		# scale factor to get units	
  sensor: u_flbbcd_cdom_sf(ppb/nodim)    	0.0908		# scale factor to get units	
  sensor: u_flbbcd_is_calibrated(bool) 		1		# set to 1 after entering 	
                                         					# calibration constant	

   sensor: u_oxy4_slow_surface_mode(bool)     0       # default for 4330f, make false for 4831 model.

