function generateStatisticsHTML ( paramters, statistics ) 

disp('Generating Statistics HTML file');

%% Generate the HTML output
fid = fopen('statisticsSnippet.html','w+');

s = statistics; 
%% Create a Table of Statistics
fprintf(fid,'<h2>Statistics</h2>\n');
fprintf(fid,'<table border=#3>\n');
fprintf(fid,'<tr>\n');
fprintf(fid,'<td>Position Type</td>\n');
fprintf(fid,'<td align="center">Epochs</td>\n');

titleStrings = {'Mean Pos Error', 'Std Pos Error', 'Mean Vel Error', ...
                'Std Vel Error' };
titleModifiers = {'Latitude', 'Longitude', 'Height'}; 
for sIdx = 1:length(titleStrings)
  for mIdx = 1:length(titleModifiers)
    fprintf(fid,'<td align="center">%s %s</td>', titleStrings{sIdx}, titleModifiers{mIdx});
  end
end
fprintf(fid,'</tr>\n\n');

for idx = 1:length(s.posTypeBySeg)
  fprintf(fid, '<tr>');
  fprintf(fid, '<td>%s</td>',s.posTypeBySeg{idx});
  fprintf(fid, '<td align="center">%d</td>', s.epochsBySeg(idx));
  fprintf(fid, '<td align="center">%.3f m</td>', s.meanPosErrBySeg{idx});
  fprintf(fid, '<td align="center">%.3f m</td>', s.stdPosErrBySeg{idx});
  fprintf(fid, '<td align="center">%.3f mm</td>', s.meanVelErrBySeg{idx});
  fprintf(fid, '<td align="center">%.3f mm</td>', s.stdVelErrBySeg{idx});
  fprintf(fid, '</tr>\n\n');
end

fprintf(fid, '<tr>');
fprintf(fid, '<td><b>Total</b></td>');
fprintf(fid, '<td align="center"><b>%d</b></td>', s.epochs);
fprintf(fid, '<td align="center"><b>%.3f m</b></td>', s.meanPosErr);
fprintf(fid, '<td align="center"><b>%.3f m</b></td>', s.stdPosErr);
fprintf(fid, '<td align="center"><b>%.3f mm</b></td>', s.meanVelErr);
fprintf(fid, '<td align="center"><b>%.3f mm</b></td>', s.stdVelErr);
fprintf(fid, '</tr>\n\n');

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

fclose(fid); 


return; 

