function event = read_eventfile(varargin)

fid = fopen('event.txt');

%get rid of heather
for i = 1:4
    tline = fgetl(fid);
end

% read surveydate until now this is not used yet
tline = fgetl(fid);
[dum surveydate] = strread(tline,'%s %s','delimiter','\t');

% read processdate until now this is not used yet
tline = fgetl(fid);
[dum processdate] = strread(tline,'%s %s','delimiter','\t');

tline = fgetl(fid);
tline = fgetl(fid);

while ~isnumeric(tline) | tline(1) ~= -1
%     tline = fgetl(fid);
    [dum i] = strread(tline,'%s %f','delimiter',' ');
    
    tline = fgetl(fid);
    [dum time] = strread(tline,'%s %s','delimiter',' ');
    event(i).begintime = time{1};
    
    tline = fgetl(fid);
    [dum time] = strread(tline,'%s %s','delimiter',' ');   
    event(i).endtime = time{1};
    
    tline = fgetl(fid);
    [dum height] = strread(tline,'%s %s','delimiter',' ');
    event(i).surveyorheight = height{1};
    
    tline = fgetl(fid);
    tline = fgetl(fid);

end

fclose(fid);