function trackingSaveResults( pathName, fileName, ...
                              settings, acqResults, trackResults )

%==============================================================================%
%                                                                              %
%   trackingSaveResults( pathName, fileName, ...                               %
%                        settings, acqResults, trackResults )                  %
%                                                                              %
%   Save results to disk                                                       %
%   David S. De Lorenzo                                                        %
%   01 November 2005                                                           %
%                                                                              %
%==============================================================================%
%                       GPS Software Receiver in Matlab                        %
%     Copyright (c) 2003-2017 David S. De Lorenzo / 2018-2023 Trimble Inc.     %
%==============================================================================%
%#ok<*NASGU,*INUSD>

if isfield(settings, 'timePts')
    settings = rmfield(settings, 'timePts');
end

if isfield(settings, 'phasePts')
    settings = rmfield(settings, 'phasePts');
end

if isfield(settings, 'acq')
    settings = rmfield(settings, 'acq');
end

fprintf('\nSaving results to disk ...\n\n');

save(fullfile(pathName, [fileName '_trackResults.mat']), ...
     'settings', 'acqResults', 'trackResults', '-mat');

fprintf('  DONE!!\n\n');

return
%===============================================================================