Main Content

navicL1Codes

R2026b

Generate NavIC L1 ranging codes

Since R2026b

    Description

    [L1D,L1P,L1O] = navicL1Codes(PRNID) generates the data L1D and pilot L1P ranging codes, and the overlay L1O codes, for the satellite pseudo-random noise (PRN) indices specified in PRNID. The function generates the codes as specified in the Navigation with Indian Constellation (NavIC) Signal in Space ICD for Standard Positioning Service in L1 Frequency [1].

    Note

    The first call to the function prompts you to download the required NavIC L1 initial conditions dataset. After MATLAB® downloads and extracts the dataset to prefdir, the function uses the local files for subsequent calls.

    example

    Examples

    collapse all

    Generate ranging codes for multiple NavIC satellites.

    The first call to the function prompts you to download the required NavIC L1 initial conditions dataset. After MATLAB downloads and extracts the dataset to prefdir, the function uses the local files for subsequent calls.

    Specify the PRN IDs for three NavIC satellites.

    prnid = [1; 5; 10];

    Generate the corresponding data, pilot, and overlay codes for each specified satellite.

    [l1d,l1p,l1o] = navicL1Codes(prnid);

    Verify the sizes of the generated codes. The data and pilot codes have 10,230 chips each, and the overlay code has 1,800 chips. Each output matrix contains one column per satellite.

    size(l1d)  % Size of data ranging code
    ans = 1×2
    
        10230    3
    
    
    size(l1p)  % Size of pilot ranging code
    ans = 1×2
    
        10230    3
    
    
    size(l1o)  % Size of overlay code
    ans = 1×2
    
        1800    3
    
    

    Input Arguments

    collapse all

    Satellite PRN index, specified as one of these options:

    • Integer in the range [1, 64] — Use this option to input a PRN index for a single satellite.

    • Vector of integers in the range [1, 64] — Use this option to input PRN indices for multiple satellites.

    Data Types: double | uint8

    Output Arguments

    collapse all

    Data ranging codes, returned as a binary-valued matrix. The number of rows in the matrix is 10,230, corresponding to one full code period of 10 milliseconds at a chip rate of 1.023 MHz. The number of columns is equal to the length of PRNID.

    Each column of L1D contains the data ranging code for the NavIC L1-SPS signal specified by the corresponding element of PRNID.

    Data Types: logical

    Pilot ranging codes, returned as a binary-valued matrix. The number of rows in the matrix is 10,230, corresponding to one full code period of 10 milliseconds at a chip rate of 1.023 MHz. The number of columns is equal to the length of PRNID.

    Each column of L1P contains the pilot ranging code for the NavIC L1-SPS signal specified by the corresponding element of PRNID.

    Data Types: logical

    Overlay codes, returned as a binary-valued matrix. The number of rows in the matrix is 1,800 and the number of columns is equal to the length of PRNID.

    Each column of L1O contains the overlay code for the corresponding element of PRNID. The overlay code modulates the pilot ranging code. Operating at 100 chips per second, the overlay code provides one chip every 10 ms, so each overlay-code chip XORs an entire pilot-code cycle of 10,230 chips (in 10 ms).

    Data Types: logical

    References

    [1] Indian Space Research Organisation (ISRO). Signal-In-Space Interface Control Document (ICD) for NavIC Service on L1 Frequency. ISRO-NavIC-SIS-ICD-L1-V1.0. ISRO, August 2023.

    Extended Capabilities

    expand all

    C/C++ Code Generation
    Generate C and C++ code using MATLAB® Coder™.

    Version History

    Introduced in R2026b