function codeChips = codeGenerateMASTER( signalType, prn )

%==============================================================================%
%                                                                              %
%   codeChips = codeGenerateMASTER( signalType, prn )                          %
%                                                                              %
%   Master interface routine to all supported code generators                  %
%   David S. De Lorenzo                                                        %
%   07 July 2011                                                               %
%                                                                              %
%------------------------------------------------------------------------------%
%                                                                              %
%   Generate PRN code sequence for the specified signal type.                  %
%                                                                              %
%   NOTE:  the values are returned as -1 and +1 instead of [0,1].              %
%                                                                              %
%==============================================================================%
%                       GPS Software Receiver in Matlab                        %
%     Copyright (c) 2003-2017 David S. De Lorenzo / 2018-2023 Trimble Inc.     %
%==============================================================================%

switch signalType
    
    case 'L1-C/A'
        codeChips = codeGenerateCA( prn );
        
    case {'L5-Inphase', ...
          'L1-10Mchip_test_code'}
        codeChips = codeGenerateL5Inphase( prn );
        
    case 'L5-Quadrature'
        codeChips = codeGenerateL5Quadrature( prn );
        
    case 'GLONASS/G3-Data'
        codeChips = codeGenerateGlonassG3Data( prn );
        
    case 'GLONASS/G3-Pilot'
        codeChips = codeGenerateGlonassG3Pilot( prn );
        
    otherwise
        error('***  Invalid signal type!!  ***');
        
end

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