% computeEpochsInLoopL.m
% 
% Create statistics from the gielog_Ldiag file which contains
% debug information directly from Loop L. 
% 
% Vivek Nadkarni
% Trimble
% December 17, 2004

loadCfg;

% directoryname = 'C:\Vivek\Data\Survey\gieAnalysis\2004-12-11-static\cut2\';
diagFile = 'gielog_Ldiag'; 
load([directoryname diagFile]); 

svid = data(:,2);  

fid = fopen([directoryname 'results\epochsInLoopL.txt'], 'w');

fprintf(fid, '%%SV , number of 10 Hz epochs \r\n');
for sv = 1:32
  seg = find(svid == sv);
  numEpochsInLoopL(sv) = length(seg);
  fprintf(fid, '%2d % 8d\r\n', sv, numEpochsInLoopL(sv));
end
  
fclose(fid);
