function logmeta = readAWAClog(basefile) %function to get instrument metadata about AWAC deployment from header file logFile = strcat(basefile,'.log'); hdr = fopen(logFile); str='Deployment'; while (~strncmp(str,'Copyright',8)); str=fgetl(hdr); if (strncmp(str,'Assumed duration',15)) logmeta.AWACSetupAssumedDuration = str2num(str(29:end)); elseif (strncmp(str,'Battery utilization',15)) logmeta.AWACSetupBatteryRequirement = str2num(str(29:end)); elseif (strncmp(str,'Battery level',12)) logmeta.AWACSetupInitialBatteryLevel = str2num(str(29:end)); elseif (strncmp(str,'Recorder size',12)) logmeta.AWACSetupRecorderSize = str2num(str(29:end)); elseif (strncmp(str,'Recorder free space',12)) logmeta.AWACSetupRecorderFreeSpace = str2num(str(29:end)); elseif (strncmp(str,'Memory required',15)) logmeta.AWACSetupRequiredMemory = str2num(str(29:end)); elseif (strncmp(str,'Vertical vel. prec',12)) logmeta.AWACSetupVerticalVelocityPrecision = str2num(str(29:end)); elseif (strncmp(str,'Horizon. vel. prec',12)) logmeta.AWACSetupHorizontalVelocityPrecision = str2num(str(29:end)); elseif (strncmp(str,'AquaPro Version',14)) logmeta.AWACSoftwareVersion = str2num(str(17:end)); end end fclose(hdr)