function [new_oxy,Soc,Voffset,Boc,tcor,pcor,gama]=...
    oxy_fit_pres(volt,OXSAT,temp,press,sta,bot_oxy, ...
		Soc,Voffset,Boc,tcor,pcor,gama);
%OXY_FIT_PRES - oxygen coeffs from volt and botOx (pressure dependence)

% $Revision: 1.4 $
% $Date: 2008/01/19 13:57:47 $
% $Id: oxy_fit_pres.m,v 1.4 2008/01/19 13:57:47 duncombe Exp duncombe $

x=[volt OXSAT temp press sta];
beta(1,1)=Soc;
beta(1,2)=Voffset;
beta(1,3)=Boc;
beta(1,4)=tcor;
beta(1,5)=pcor;
beta(1,6)=gama;
beta0=non_lin_fit(x,bot_oxy,'oxygen_fit_pres',beta);
Soc=beta0(1);
Voffset=beta0(2);
Boc=beta0(3);
tcor=beta0(4);
pcor=beta0(5);
gama=beta0(6);
new_oxy=((Soc.*(volt+Voffset))+(Boc.*exp(-0.03.*temp))+(gama*press)).*exp(tcor.*temp).*OXSAT.*exp(pcor.*press);
return
