function config = configinit(instclass)
%initialize config structure for raw read

config.yearbase     = NaN;
config.nbytes       = NaN;
config.nbeams_used  = NaN;
config.ncells       = NaN;
config.num_pings    = NaN;
config.cell         = NaN;
config.blank        = NaN;
config.pulse        = NaN;
config.bin1distance = NaN;
config.head_align   = 0;
config.head_bias    = 0;
config.bt_was_on    = NaN;
config.tr_pressure  = 0;
config.convex       = NaN;
config.orientation  = NaN;
config.beamangle    = NaN;
config.frequency    = NaN;
config.coordsystem  = NaN;


if (isa(instclass, 'bb') | isa(instclass,'os'))
   config.mode       = NaN;
   config.code_reps  = NaN;
   config.EZ         = NaN;
   config.lag        = NaN;
   config.sensornames = {'temp', 'cond', 'roll', 'pitch', 'head', ...
                    'press', 'sspeed'};
   
   if (isa(instclass, 'os'))
      config.pingtype = NaN;
      
   end
end

