The civil-moderate and civil-long ranging codes are generated by a modular LFSR which is reset periodically to a predetermined initial state. The period of the CM and CL is determined by this resetting and not by the natural period of the LFSR (as is the case with the C/A code). The initial states are designated in the interface specification and are different for different PRN numbers and for CM/CL. The feedback polynomial/mask is the same for CM and CL. The ranging codes are thus given by: