function dp = Omega10dp(v,units)
% Omega10dp  Convert voltage to pressure for Omega model PX653-10D5V transducer
%            Calibration is for serial number 00100382
%            Output is 1 to 5 Volts for pressure range 0 to 10 inch H20
%
% Synopsis:  dp = Omega10dp
%            dp = Omega10dp(v)
%            dp = Omega10dp(v,units)
%
% Input:  v = voltage output of transducer  
%         units = (string) to indicate the system of units for pressure.
%                   If units = 'SI', (default) then dp is in Pascals
%                   If units = 'BG', dp is in inches of H20
%                 Default: units = 'SI'. Other value is units = 'BG'
%
% Output:  dp = EITHER the calibration uncertainty for the pressure
%               transducer or the pressure differential across the transducer
%               dp = Omega10dp; (with no input arguments) returns the
%               estimate of the calibration uncertainty.  dp = Omega10dp(v)
%               returns the pressure differential for voltage v

inchH2O_toPa = 998*9.8*2.54e-2;  % multiplier to convert inch H2O to Pa
if nargin<1
  dp = 0.029*inchH2O_toPa;  % calibration uncertainty in Pascal
  return
end
if nargin<2, units='SI';  end

% -- Range check on transducer output
if any(v<1 | v>5)
  fprintf('\nWarning in %s:\n',mfilename);
  fprintf('\tv = %g (volts) is out of range\n',v(v<1|v>5));
end
% --- Calibration equation
h = 2.50600948477838 * v - 2.51613612227667;  % delta p, inch H20
if strcmpi(units(1:2),'SI')
  dp = inchH2O_toPa*h;                     % convert inch H2O to Pa
else
  dp = h;
end
