function  [new_oxy,Soc,Boc,tcor,wt,pcor,p1,tau]=...
    oxy_fit_linear_beckman(curr,oxy_temp,OXSAT,temp,press,sta,bot_oxy,docdt,...
    Soc,Boc,tcor,pcor,wt,p1,tau);
%OXY_FIT_LINEAR_BECKMAN - oxygen coeffs from voltage and bottle Oxygen 
%	(linear trend)

% 
%	$Revision: 1.3 $
%	$Date: 2008/04/09 14:13:00 $
%	$Id: oxy_fit_linear_beckman.m,v 1.3 2008/04/09 14:13:00 duncombe Exp duncombe $
% 


x=[curr OXSAT temp press docdt oxy_temp sta];
beta(1,1)=Soc;
beta(1,2)=Boc;
beta(1,3)=tcor;
beta(1,4)=wt;
beta(1,5)=pcor;
beta(1,6)=p1;
beta(1,7)=tau;
beta0=non_lin_fit(x,bot_oxy,'oxygen_fit_linear_beckman',beta);
Soc=beta0(1);
Boc=beta0(2);
tcor=beta0(3);
wt=beta0(4);
pcor=beta0(5);
p1=beta0(6);
tau=beta0(7);

new_oxy=((Soc.*(curr+(tau.*docdt)))+Boc+(p1.*sta)).* ...
	exp(tcor.*(temp+(wt*(oxy_temp-temp)))).*OXSAT.*exp(pcor.*press);

return;

