Main Content

gpsL5Codes

Generate ranging codes for GPS L5

Since R2024b

    Description

    [i5code,q5code] = gpsL5Codes(prnid) generates an in-phase L5 code, i5code, and quadrature-phase L5 code, q5code, for the satellite pseudo-random noise (PRN) indices specified in PRNIprnid. The function generates the ranging codes as specified in the modernized Global Positioning System (GPS) L5 standard IS-GPS-705.

    example

    Examples

    collapse all

    Generate in-phase (I5) and quadrature-phase (Q5) codes for GPS L5 signal.

    Specify the PRN IDs for the GPS satellites.

    prnid = [1; 5];

    Generate the I5 and Q5 codes.

    [i5,q5] = gpsL5Codes(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 I5 and Q5 codes for a specific PRNID, refer to these tables in the GPS L5 standard IS-GPS-705 [1].

    • PRN ID in the range [1, 63] — Tables 3-Ⅰa and 3-Ⅱa

    • PRN ID in the range [64, 210] — Table 6-Ⅱ

    Data Types: double | uint8

    Output Arguments

    collapse all

    I5 ranging codes, returned as a matrix. The matrix always contains 10,230 rows, and the number of columns is equal to the length of prnid.

    Each column of this matrix contains the ranging code used to spread the in-phase component of the L5 signal of the satellite specified by its corresponding prnid.

    Data Types: logical

    Q5 ranging codes, returned as a matrix. The matrix always contains 10,230 rows, and the number of columns is equal to the length of prnid.

    Each column of this matrix contains the ranging code used to spread the quadrature-phase component of the L5 signal of the satellite specified by its corresponding prnid.

    Data Types: logical

    References

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

    Extended Capabilities

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

    Version History

    Introduced in R2024b

    See Also

    Functions

    Objects