%
fid = fopen('proc.dat','r');
fseek(fid,0,'eof');
feof = ftell(fid);
fseek(fid,0,'bof')
fmark = feof;

ncasts  = 32;

for k = 1:ncasts

% cast no in the first line
[aline, nchar] = newline(fid,40)
castno(k)    = str2num(aline(2:4));

% start time in the second line
[aline, nchar] = newline(fid,40)
year        = 1993;
mon         = str2num(aline(4:5));
day         = str2num(aline(7:8));
hour        = str2num(aline(10:11));
mins        = str2num(aline(13:14));
secs        = str2num(aline(16:17));
starttime(k)       = to_day(year, year, mon, day, hour, mins, secs);

% end time in the 3rd line
[aline, nchar] = newline(fid,40);
year        = 1993;
mon         = str2num(aline(25:26));
day         = str2num(aline(28:29));
hour        = str2num(aline(31:32));
mins        = str2num(aline(34:35));
secs        = str2num(aline(37:38));
endtime(k)       = to_day(year, year, mon, day, hour, mins, secs);


%bottom in 4th line
[aline, nchar] = newline(fid,5);
bottom(k)  = str2num(aline(1:nchar));

%position in the 5th line§
[aline, nchar] = newline(fid,40);

[latdeg, aline] 		= strtok(aline);
[latmin, aline] 		= strtok(aline);
[lathem, aline]         = strtok(aline);
[londeg, aline] 		= strtok(aline);
[lonmin, aline] 		= strtok(aline);
[lonhem, aline]         = strtok(aline)

lat(k) = str2num(latdeg) + str2num(latmin)/60.;
lon(k) = str2num(londeg) + str2num(lonmin)/60;
lon(k) = -1.* lon(k);

%blank line
[aline, nchar] = newline(fid,40);
end 
fclose(fid);

save proc castno bottom starttime endtime lat lon