# Detecting and Mitigating Attacks on GPS Devices
## 3 GNSS Overview  
### GPS System  
The GPS constellation comprises 31 satellites operated by the United States Air Force (USAF). The first GPS generation achieved full operational capability in 1995 and has been subsequently modernized with GPS Block III satellites, which began launching in 2018. GPS works through a process known as trilateration, where the location of one point in space can be determined by the known characteristics of at least three other points in space. Each GPS satellite transmits a unique signal that can be received by a GPS receiver on Earth's surface. Embedded in that unique signal are the satellite's current location and the absolute time that the satellite transmitted the message. The GPS receiver then estimates how long the message took to travel from the satellite to the receiver, providing the receiver with an estimate of the distance between itself and that satellite. A 2D position estimate can be calculated once the distance is estimated from at least three satellites. A 3D position estimate can be calculated with range estimations from at least four satellites through a process known as trilateration. Figure 1 depicts the GPS trilateration process. GPS satellites broadcast multiple downlink signals, including the L1 and L2 carriers operating at 1575.42 MHz and 1227.60 MHz, respectively. Newer GPS satellites also broadcast additional carriers, such as the L2C, L5, and L1C carriers. The L2C carrier was introduced in 2005 and gets its name from the frequency it uses (1227 MHz, the same as L2) and the fact that it is intended for civilian use. The L2C carrier is broadcast at a higher power than the L1 carrier, with the goal of better penetration through trees and buildings. The L2C carrier, sometimes referred to as the second civil signal, began broadcasting civil navigation (CNAV) messages in 2014; however, the USAF still considers L2C to be pre-operational. The L5 carrier, the third civil signal, is broadcast at 1176 MHz and was first introduced in 2010, with CNAV messages broadcast beginning in 2014. The L5 carrier is reserved exclusively for aviation safety services and features higher power and an advanced signal design for increased robustness compared with other carriers. L5 is still considered pre-operational by the USAF. The L1C carrier, referred to as the fourth civil signal, is broadcast at 1575 MHz and was originally designed as a common civil signal for GPS and Galileo. This carrier was designed to improve mobile reception in urban environments. Other GNSSs, such as BeiDou, are adopting similar signals. The first GPS satellites capable of broadcasting L1C were launched in 2018; however, L1 and L2, now known as the GPS legacy signals, remain the most common carriers supported by all PS satellite generations. There is also an L3 carrier at 1381.05 MHz, which is not used for navigation purposes. This carrier is used by the United States Nuclear Detonation (NUDET) Detection System (USNDS) to detect and locate nuclear detonations in the Earth's atmosphere and is used primarily for enforcing nuclear test ban treaties. The GPS signal is a spread-spectrum signal that simultaneously transmits multiple types of ranging and navigation messages. The GPS employs the Binary Phase Shift Keying (BPSK) digital modulation scheme for transmission. Some GPS satellites also employ a form of Quadrature Amplitude Modulation (QAM). Each GPS satellite has several identifiers that are conveyed via ranging and navigation messages, including the space vehicle number (SVN), the space vehicle identifier (SVID), and the pseudorandom noise number (PRN). The PRN identifies which range code the satellite is using. A fixed unique mapping exists between the SVN, SVID, and PRNs described in the GPS interface specification [27]. The L1 and L2 carriers carry Course Acquisition (C/A) PRN codes, which are Gold codes transmitted at a rate of 1.023 Mbps and repeated every one millisecond. These C/A codes are exclusive or'd with a 50 bps navigation message containing information on the time and the satellite's position.