function dp = Omega30dp(v,units)
% Omega25dp  Convert voltage to pressure for Omega model PX653-03D5V  transducer
%            Calibration for serial number 01212460
%            Output is 1 to 5 Volts for pressure range 0 to 3 inch H20
%
% Synopsis:  dp = Omega30dp
%            dp = Omega30dp(v)
%            dp = Omega30dp(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 = Omega30dp; (with no input arguments) returns the
%               estimate of the calibration uncertainty.  dp = Omega30dp(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.00765*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 = 0.750664358028092 * v - 0.753430174833871;  % delta p, inch H20
if strcmpi(units(1:2),'SI')
  dp = h*inchH2O_toPa;                        % convert inch H2O to Pa
else
  dp = h;
end