function [data, lines] = loadpps(mjd)

% function [data, lines] = loadpps(mjd)
% Loads binary file '/home/ftp/pub/hmaser/bin/q?????.bin' containing floats.
% by Kaj Wiik (3 Oct 95)
% 23 Sep 96 Added recovery from nonexistent files (kwi)

mjd_str = sprintf('%d', mjd);
filename = ['/home/ftp/pub/hmaser/bin/q' mjd_str '.bin'];

if exist(filename)
   fd = fopen(filename, 'r');
   [data, floats] = fread(fd, 'float');
   data = reshape(data, 6, floats/6)';
   lines = floats/6;
   fclose(fd);

else
   data = [];
   floats = [];
end
%endfunction
