function BattDuration = hydrabatdur(NBat, DutyCycle, VelRange, Mode, Alcal); % function BatLength = batpow(NBat, DutyCycle, VelRange, Mode, Alcal); % calcualtes battery duration (in days) for a deployment % % Nbat - number of batteries (1,2,3,4,5) % DutyCycle - duty cycle (%) % VelRange - ADV velocity range (0 to 4) % Mode - High resolution 'H' or Boundary 'B' % (determined by the probe configuration file) % Alcal - Alkaline or lithium batteries 1- alkaline; 0- lithium if lower(Mode(1))=='h' PowCons = [3.5; 3.8; 4.0; 4.5; 5.]; PowCons = [2.4; 2.6; 2.8; 3.6; 4.]; else PowCons = [2.1; 2.3; 2.5; 2.7; 3.]; end VelRange = VelRange + 1; PowCons; % total battery power if Alcal ==1 BatPow = NBat*18*42*.8; else BatPow = NBat*21.6*82*.8; end BattDuration = BatPow/PowCons(VelRange)/24/DutyCycle*100;