function analyzeGLONASS(fid, ...
                        L2Present, ...
                        L1PPresent, ...
                        PlotPNG, ...
                        L1_CA, ...
                        L2, ...
                        L1_P, ...
                        GLN_Range_Mean, ...
                        GLN_Range_Sigma, ...
                        GLN_Phase_Mean, ...
                        GLN_Phase_Sigma, ...
                        GLN_NumEpochs, ...
                        FDMAChan);
                        

FALSE = 0;
TRUE  = 1;
                        
% Define the table
fprintf(fid,'<div align="center"><center>');
fprintf(fid,'<table border="1">');
fprintf(fid,'<tr>\n');
  
% Write out the table header
fprintf(fid,'<th>GLN #</th>\n');
fprintf(fid,'<th>FDMA #</th>\n');
fprintf(fid,'<TH># L1-C/A Epochs</TH>\n');

if(L2Present == TRUE)
  fprintf(fid,'<TH># L2 Epochs</TH>\n');
end

if(L1PPresent == TRUE)
  fprintf(fid,'<TH># L1-P Epochs</TH>\n');
end
  
fprintf(fid,'<th>Pseudorange L1-C/A Mean [cm]</th>\n');
fprintf(fid,'<th>Pseudorange L1-C/A Sigma [cm]</th>\n');
  
if(L2Present == TRUE)
  fprintf(fid,'<th>Pseudorange L2 Mean [cm]</th>\n');
  fprintf(fid,'<th>Pseudorange L2 Sigma [cm]</th>\n');
end

if(L1PPresent == TRUE)
  fprintf(fid,'<th>Pseudorange L1-P Mean [cm]</th>\n');
  fprintf(fid,'<th>Pseudorange L1-P Sigma [cm]</th>\n');
end
  
fprintf(fid,'<th>Phase L1-C/A Mean [mm]</th>\n');
fprintf(fid,'<th>Phase L1-C/A Sigma [mm]</th>\n');
  
if(L2Present == TRUE)
  fprintf(fid,'<th>Phase L2 Mean [mm]</th>\n');
  fprintf(fid,'<th>Phase L2 Sigma [mm]</th>\n');
end

if(L1PPresent == TRUE)
  fprintf(fid,'<th>Phase L1-P Mean [mm]</th>\n');
  fprintf(fid,'<th>Phase L1-P Sigma [mm]</th>\n');
end


fprintf(fid,'</tr>\n');


for i=1:24
  if( isfinite(GLN_Range_Mean(L1_CA,i)) | ... 
      isfinite(GLN_Range_Mean(L2,i)) | ...
      isfinite(GLN_Range_Mean(L1_P,i)) )
  
    % Output to an HTML file
    fprintf(fid,'<TR><td align="center">%d</td>\n',i);
    fprintf(fid,'<td align="center">%d</td>\n',FDMAChan(i));
    fprintf(fid,'<td align="center">%d</td>\n', GLN_NumEpochs(L1_CA,i));
  
    if(L2Present == TRUE)
      fprintf(fid,'<td align="center">%d</td>\n', GLN_NumEpochs(L2,i));
    end
      
    if(L1PPresent == TRUE)
      fprintf(fid,'<td align="center">%d</td>\n', GLN_NumEpochs(L1_P,i));
    end
      
    if(PlotPNG == TRUE)
      fprintf(fid,'<td align="center"><a href="GLN%d_RANGE.png">%.1f</a></td>\n',i,GLN_Range_Mean(L1_CA,i));
    else
      fprintf(fid,'<td align="center">%.1f</a></td>\n',GLN_Range_Mean(L1_CA,i));
    end
      
    fprintf(fid,'<td align="center">%.1f</td>\n', GLN_Range_Sigma(L1_CA,i));

    if(L2Present == TRUE)
      fprintf(fid,'<td align="center">%.1f</td>\n', GLN_Range_Mean(L2,i));
      fprintf(fid,'<td align="center">%.1f</td>\n', GLN_Range_Sigma(L2,i));
    end
      
    if(L1PPresent == TRUE)
      fprintf(fid,'<td align="center">%.1f</td>\n', GLN_Range_Mean(L1_P,i));
      fprintf(fid,'<td align="center">%.1f</td>\n', GLN_Range_Sigma(L1_P,i));
    end


    if(PlotPNG == TRUE)
      fprintf(fid,'<td align="center"><a href="GLN%d_PHASE.png">%.1f</a></td>\n',i,GLN_Phase_Mean(L1_CA,i));
    else
      fprintf(fid,'<td align="center">%.1f</a></td>\n',GLN_Phase_Mean(L1_CA,i));
    end
      
    fprintf(fid,'<td align="center">%.1f</td>\n', GLN_Phase_Sigma(L1_CA,i));

    if(L2Present == TRUE)
      fprintf(fid,'<td align="center">%.1f</td>\n', GLN_Phase_Mean(L2,i));
      fprintf(fid,'<td align="center">%.1f</td>\n', GLN_Phase_Sigma(L2,i));
    end
      
    if(L1PPresent == TRUE)
      fprintf(fid,'<td align="center">%.1f</td>\n', GLN_Phase_Mean(L1_P,i));
      fprintf(fid,'<td align="center">%.1f</td>\n', GLN_Phase_Sigma(L1_P,i));
    end

  else
    disp(['No data: ',num2str(i)]);
  end
end      

% Close up the table
fprintf(fid,'</table></center></div><HR>\n');


