function acquisitionPlot3D( jj, prn, dopplerFreqVector, ...
                            resultsNoncoherent, chipsPer1ms )

%==============================================================================%
%                                                                              %
%   acquisitionPlot3D( jj, prn, dopplerFreqVector, ...                         %
%                      resultsNoncoherent, chipsPer1ms )                       %
%                                                                              %
%   3-D Acquisition Plot                                                       %
%   David S. De Lorenzo                                                        %
%   29 January 2008                                                            %
%                                                                              %
%==============================================================================%
%                       GPS Software Receiver in Matlab                        %
%     Copyright (c) 2003-2017 David S. De Lorenzo / 2018-2023 Trimble Inc.     %
%==============================================================================%

[peakSize,codePhaseIndex] = max(max(resultsNoncoherent, [], 1));

codePhaseVector = linspace(0, chipsPer1ms, size(resultsNoncoherent, 2));
codePhaseVector = codePhaseVector(mod(codePhaseIndex-1,5)+1:5:end);

[X,Y] = meshgrid(codePhaseVector, dopplerFreqVector);

resultsPlot = resultsNoncoherent(:, mod(codePhaseIndex-1,5)+1:5:end);

figNum = figure(700 + jj);
clf(figNum);
mesh(X, Y, resultsPlot);
view(-25, 20);
axis([0 chipsPer1ms ...
     dopplerFreqVector(1) dopplerFreqVector(end) ...
     0 1.2*peakSize]);
title(sprintf('Code Correlation - PRN #%s', prn));
xlabel('Code-Phase (chips)');
ylabel('Doppler Frequency (Hz)');
drawnow();

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