Contenu principal

gpsL1CCodes

Generate ranging and overlay codes for GPS L1C

Since R2024a

    Description

    [L1CD,L1CP,L1CO] = gpsL1CCodes(PRNID) generates ranging codes and overlay codes, as specified in the modernized Global Positioning System (GPS) L1 civil (L1C) standard IS-GPS-800 section 3.2.2 [1], for the satellite pseudo-random noise (PRN) indices specified in PRNID. The function returns the ranging codes for the data and pilot, L1CD and L1CP, respectively, and the overlay code L1CO.

    For details on how to generate a GPS L1C waveform, see Generate GPS L1C Waveform.

    example

    Examples

    collapse all

    Generate the ranging codes and overlay codes for GPS L1C and Quasi-Zenith satellite system (QZSS) signals.

    Generate GPS L1C Ranging and Overlay Codes

    Specify the PRN IDs for the GPS satellites.

    PRNID = [4; 70];

    Generate the ranging and overlay codes for the set PRN IDs.

    [l1cd,l1cp,l1co] = gpsL1CCodes(PRNID);

    Generate QZSS Data Ranging Codes

    Specify the PRN IDs reserved for QZSS satellites.

    PRNID = [193:200];

    Generate the data ranging codes for the set PRN IDs.

    l1cd_qzss = gpsL1CCodes(PRNID);

    Input Arguments

    collapse all

    GPS satellite PRN index, specified as one of these options.

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

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

    For details on how to generate these ranging and overlay codes for a specific PRNID, refer to these tables in GPS L1C standard IS-GPS-800 [1].

    • PRN ID in the range [1, 63] — Table 3.2-2 for data and pilot ranging codes, and Table 3.2-3 for overlay codes.

    • PRN ID in the range [64, 210] — Table 6.3-1 for additional data and pilot codes, and Table 6.3-2 for additional overlay codes.

    Data Types: double | uint8

    Output Arguments

    collapse all

    Data ranging codes, returned as a matrix. The number of rows in the matrix, 10,230, corresponds to 10 milliseconds of the ranging code. The number of columns is equal to the length of PRNID.

    Each column of L1CD contains the ranging code used to spread the data of the L1C satellite signal specified by the corresponding element of PRNID.

    For details on how to generate a GPS L1C waveform, see Generate GPS L1C Waveform.

    Data Types: logical

    Pilot ranging codes, returned as a matrix. The number of rows in the matrix, 10,230, corresponds to 10 milliseconds of the ranging code. The number of columns is equal to the length of PRNID.

    Each column of L1CP contains the ranging code used to spread the pilot of the L1C satellite signal specified by the corresponding element of PRNID.

    For more information, see More About.

    Data Types: logical

    Overlay code, returned as a 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 L1CO contains the overlay code for the corresponding PRNID. Overlay code modulates the pilot ranging code.

    For details on how to generate a GPS L1C waveform, see Generate GPS L1C Waveform.

    Data Types: logical

    More About

    collapse all

    References

    [1] IS-GPS-800, Rev:J. "NAVSTAR GPS Space Segment/User Segment L1C Interfaces." Aug 22, 2022.

    Extended Capabilities

    expand all

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

    Version History

    Introduced in R2024a