Ctrl+P again to print, arrows/tab to navigate results, Enter to confirm, Ctrl+Enter to open in new tab.

    The Semiprime Numbers and Sphenic Numbers holes will go live in approximately . Why not try and solve them ahead of time?

    This hole is experimental, passing requirements may change. Solutions won't contribute to scoring until the hole goes live.

    Please leave feedback on the GitHub issue.

    Details

    Every GPS satellite broadcasts its own 1023-chip C/A code, a pseudo-random sequence that repeats every millisecond. All satellites share the same frequency, so a receiver tells them apart by their codes.

    The code is generated by two 10-stage shift registers, G1 and G2, with stages numbered 1 to 10 and every stage initially set to 1. For each chip:

    1. Output G110 ⊕ G2a ⊕ G2b, where a and b depend on the satellite's PRN number (see table).
    2. Shift both registers one stage towards stage 10. The new stage 1 of G1 is G13 ⊕ G110, the new stage 1 of G2 is G22 ⊕ G23 ⊕ G26 ⊕ G28 ⊕ G29 ⊕ G210, both computed before shifting.

    For example, the code of PRN 1 starts 1100100000111001…

    PRN12345678
    a⊕b2⊕63⊕74⊕85⊕91⊕92⊕101⊕82⊕9
    PRN910111213141516
    a⊕b3⊕102⊕33⊕45⊕66⊕77⊕88⊕99⊕10
    PRN1718192021222324
    a⊕b1⊕42⊕53⊕64⊕75⊕86⊕91⊕34⊕6
    PRN2526272829303132
    a⊕b5⊕76⊕87⊕98⊕101⊕62⊕73⊕84⊕9

    Each argument is a recording of 1023 chips from one satellite. The recording may start anywhere within the repeating code, and up to eight chips have been flipped by noise. For each argument, print the PRN number (1 to 32) of the satellite that sent it.

    External links: IS-GPS-200, Wikipedia

    0 bytes, 0 chars
    Restore solution
    Compiled from AT&T syntax to x86-64 Linux. Use syscalls to write output.
    05AB1E is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    APL is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    Arturo is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    Befunge is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    BQN is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    CJam is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    CoffeeScript is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    Egel is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    Fennel is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    Harbour is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    Hare is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    Haxe is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    Hush is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    Hy is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    Knight is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    Lily is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    Luau is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    Odin is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    Picat is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    Qore is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    Racket is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    Rebol is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    Rexx is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    Scala is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    Squirrel is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    Stax is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    Uiua is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    Umka is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    Vala is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    Vyxal is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    ZuzuScript is an experimental language, solutions won't contribute to scoring until the language goes live. Please leave feedback on the GitHub issue.
    ctrl + enter or

    Delete Solution

    Are you sure you want to delete your solution(s) for GPS Satellite Identification?

    If you have separate bytes and chars solutions then both will be deleted.

    This is irreversible, please backup any code you care about.

    Type I understand and press confirm to continue.