function [ dm, dyd]=readvla( vlafile)
% 
% read vla file
%

fid=fopen( vlafile, 'r', 'ieee-be');
line=fgetl( fid);
line=fgetl( fid); % disp(line);
while strcmp( line, '*DATA*') == 0
  line=fgetl( fid); % disp(line);
  off=findstr( line, 'start_time');
  if off
    yr=str2num(line(off+14:off+15));
    yd=str2num(line(off+17:off+19));
    hr=str2num(line(off+21:off+22));
    mn=str2num(line(off+24:off+25));
    sc=str2num(line(off+27:off+28));
  end
end

start=ftell(fid); fseek(fid,0,'eof'); stop=ftell(fid);
fseek(fid,start,'bof'); sizs=(stop-start)/4;

dm=fread( fid, sizs, 'long'); dm=dm(:);
dmr=dm(1:2:length(dm));
dmi=dm(2:2:length(dm));
dm=dmr+sqrt(-1)*dmi;

fclose( fid);

dyd=yd+hr/24+mn/60/24+sc/60/60/24;

return









