Estimation of Satellite-User Ranges Through GNSS Code Phase Measurements

A Global Navigation Satellite System (GNSS) receiver is able to compute the user position through a trilateration procedure, which includes the measure of the distance between the receiver and a set of satellites. Two different approaches are tipically used and implemented in commercial receivers. The former relies on code tracking, the latter leverages carrier phase measurements performed during carrier tracking.


Introduction
A Global Navigation Satellite System (GNSS) receiver is able to compute the user position through a trilateration procedure, which includes the measure of the distance between the receiver and a set of satellites. Two different approaches are tipically used and implemented in commercial receivers. The former relies on code tracking, the latter leverages carrier phase measurements performed during carrier tracking.
This chapter focuses on the first approach and discusses the procedures that GNSS receivers perform to finely estimate satellite-user ranges. First, in section 2 we introduce the concept of pseudorange and in section 3 we give some fundamentals on primary signal processing blocks of every GNSS receiver: signal acquisition, tracking and data demodulation. In section 4, two common methods used to estimate the user-satellite range, on the basis of code phase measurements are presented. Finally, section 5 completes the chapter, providing an example of combined Position, Velocity and Time (PVT) computation for a GPS/Galileo receiver.

Theory and methods
Let us start with a simple example to introduce the concepts we will describe in the next sections.
John usually bikes to school following a straight path, keeping a constant speed. John wants to measure the distance between his house and the school and decides to compute such a distance by measuring the time it takes to go to school. He uses the following formula: where: • x is the distance estimated by John; • v is the average speed, read on the bike speedometer; • t is the difference between the time instant when John arrives at school and the time instant when he leaves home. In both cases, John reads the time on his digital watch.

www.intechopen.com
Global Navigation Satellite Systems -Signal, Theory and Applications 108 The following day, John repeats the experiment, but he measures t as the difference between the arrival time read on the school clock and the leaving time, read on his watch. John realizes that the estimated distance is significantly different from that estimated the previous day. Likely, his watch and the clock at school are not synchronized. In this case, the measured time interval can be written as follow: Equation (2) takes into account the bias δt between John's watch and the school clock. Considering this term, John understands that this reflects to an error δx on the estimated distance.
At this point, John wants to compare the result with one of his friends. He asks Alice to do the same measurement from her house, since John knows that his house is exactly 500 m away from hers. Before the measurements, Alice and John synchronize their watches. Referring the measurements taken by John and Alice to the subscripts J and A, equation (3) becomes: where: • J x and A x are the distances estimated by John and Alice, respectively; Recalling that Alice's house is 500 m away from John's, the previous system of equations can be rewritten as: This new system has two equations and two unknowns: J x and t δ . In few steps, John can finally compute the distance between his house and the school, realizing that he obtains the same result of the first experiment. The conclusion of this simple example is that in 1 dimension, if the clocks used to measure time intervals are not synchronized, we need an additional equation to solve the problem.
Bringing the concept to a three-dimensional space, it is easy to understand that we need four equations to solve the problem and determine the unknown user position respect to a reference system. This is the case of Global Navigation Satellite System (GNSS) receivers.
Referring to the geometry sketched in Fig. 1, there are satellites in view broadcasting ranging signals, while a user on the Earth wants to estimate his unknown coordinates (x u ,y u ,z u   The user needs at least 4 equations to be able to compute (,,) kkk xyz , because of the bias δt between his clock and the satellite time scale. Due to the presence of a common bias that affects all the measures of distance between the user and the satellites, we have to refer to such a distance as a pseudorange k ρ instead of a range. From this moment on, the reader has to keep in mind this distinction.
The system (6) is the set of equations that every GNSS receiver has to solve. With the problem stated above and having in mind the task of the receiver, this chapter explains the operations performed to measure the user-satellite ranges. The focus will be mainly on measurements taken on the received spreading codes, while for carrier-phase measurements, interested readers can find comprehensive theory in (Misra & Enge, 2001;Jonge & Teunissen, 1996).

www.intechopen.com
Global Navigation Satellite Systems -Signal, Theory and Applications 110

From the incoming signal to the pseudorange
When the GPS signal arrives at the receiver, it is very weak and the received power, proportional to the distance between the satellite and the user, is well below the noise floor. However, GPS receivers are able to compute their position with an accuracy that ranges from a couple of meters to centimeters in case of carrier-phase measurements. Such performance are possible thanks to the spread-spectrum nature of GNSS signals. It is useful to recall that each satellite utilizes Direct Sequence Spread Spectrum (DSSS) modulation (Kaplan & Hegarty, 2006), broadcasting the navigation message on pseudo random noise (PRN) spreading codes, over the same frequency. Taking as example the GPS L1 C/A code, each satellite uses a Gold code, quasi-orthogonal with respect to those used by the other satellites. Applying signal processing algorithms based on the correlations between the incoming signal and local replicas, the receiver can de-spread the incoming signal and retrieve the navigation message. Such algorithms are used to perform two fundamental processes, commonly known as acquisition and tracking, respectively. The first aims at roughly estimating the Doppler frequency and the code delay of the received signal. The tracking phase adjusts the parameters assessed by the acquisition, to finely measure the phase of each tracked GPS signal, keeping trace of changes in the future. The estimate of the code delay for all the tracked satellites is at the basis of the pseudoranges computation.

Signal acquisition
The first task of a GNSS receiver is to detect the presence of the satellites in view. This is performed by the acquisition system, which also provides a coarse estimate of two parameters of the received Signal In Space (SIS): the Doppler shift and the delay of the received spreading code with respect to the local replica. In the next sections, we will see that the precise alignment between the received and the local spreading codes, is fundamental for the measure of user-satellites ranges, that is necessary to fix the receiver position.
There are two mathematical disciplines which govern the operation performed by acquisition systems: the Estimation theory and the Signal Detection theory. These two extensive theories are described in various literature, whereas comprehensive analysis and applications can be found in many papers. For a complete mathematical background of the operation performed by GNSS signal acquisition, interested readers can refer to (Kay, 1993(Kay, , 1998.
Keeping our description terse, real acquisition systems search for a satellite in view, correlating the received signal with a local replica of the spreading code and a local carrier. The search consists in finding the values of code delay and carrier frequency of the local signals that maximize the correlation. Exploiting the concepts and the methodology of the rn is the local signal sampled with a rate equal to the sampling frequency used by the ADC and can be expressed as follows: is the local spreading code with delay τ , represents the local carrier, in-phase and quadrature, s T is the sampling interval.
Real acquisition systems find the values of τ and d f that maximize equation (7). As an example, Fig. 2 reports τ (, ) d R f over a predefined search space. A correlation peak corresponding to a defined pair of τ and d f clearly raises above the cross-correlation noise floor and indicates a first rough alignment between the incoming and the local signals. Generally, the first estimate of τ and d f that maximizes equation (7) is followed by a decision process. The maximum of τ (, ) d R f is taken as decision variable and compared against a threshold, that is often set according to the Neyman-Pearson (NP) theorem (Kay, 1998). If the maximum is higher than the threshold, the satellite is considered present,

www.intechopen.com
Global Navigation Satellite Systems -Signal, Theory and Applications 112 otherwise absent. Note that the performance of real acquisition algorithms are evaluated in terms of Probability of Detection and Probability of False Alarm.
It is important to highlight that for civilian GNSS signals (i.e. GPS L1 C/A, Galileo E1-B), the spreading code contained in [ ] IF y n is a periodic sequence with period equal to the code period p T (i.e. 1 ms for the GPS L1 C/A code, 4 ms for the Galileo E1-B): therefore the delay τ can be estimated only in the range (0, ) p T . In practice only a portion of this infinite sequence enters into the summation in equation (7) (i.e. the samples of the portion of signal under test for n = 0,…,L -1). This means that for a given value of d f , the correlation assumes the form of a circular correlation when the interval (0,L − 1) contains an integer number of code periods. This remark is quite important and helps to understand why real acquisition systems are based on Fast Fourier Transforms (FFTs). In fact, FFTs are used to implement fast circular correlations and scan the search space efficiently. Insights on the design of FFT-based signal acquisition system is out of scope for this chapter. However, one can find many algorithms proposed in recent literature and can refer to (Borre et al., 2006) for didactical examples.

Code and carrier tracking
Digital receivers sample the analog signal and split the stream of samples over different digital channels. As seen above, the first step in GNSS processing is the signal acquisition: the satellites in view are detected and a first rough estimation of the Doppler shift and code delay is performed. The signal tracking follows the signal acquisition. Most of the receivers use a Delay Lock Loop (DLL) to synchronize the spreading code from each satellite (Parkinson & Spilker, 1996), while a Phase Lock Loop (PLL) is generally employed to track the phase of the incoming carrier. The theory behind digital tracking loops is reported in many books (Kaplan & Hegarty, 2006;Parkinson & Spilker, 1996). Here the signal tracking is only introduced to give fundamentals for the following sections.
Roughly speaking, the signal tracking relies on the properties of the signal correlation and is fundamental to demodulate the navigation message and estimate the range between the user and the satellites. A generic block diagram of the code and carrier tracking system for GNSS receivers is shown in Fig. 3  [ ] IF y n ) is correlated with the local code and with two carriers, one in phase and one in quadrature, respectively. At the end of each integration period, the values of correlation are used to generate feedback control signals, one for the DLL and one for the PLL. Early minus Late DLLs use additional replicas of the local code, shifted of 0.5 chips earlier and later than the reference one, which is referred as Prompt code. The Early and Late correlations are combined to generate the DLL feedback on the basis of a proper discrimination function. Such a feedback is filtered to smooth the noise effect and is used to steer the code generator, that prepares the local code for the next loop iteration. In such a way the DLL continues to track the correlation peak in the time domain. The PLL works in a similar way. Generally, the in-phase and quadrature Prompt correlations are passed to a Costas-PLL (that is not sensitive to navigation bits transitions) (Kaplan & Hegarty, 2006;Misra & Enge, 2001) that generates the loop control signal. This is filtered and applied to the local carrier generator, that prepares the local carrier for the next iteration. This process repeats over time, making the receiver able to track the correlation peak in frequency domain.
When both the DLL and PLL are locked, the incoming signal is despread and converted to baseband. The navigation data bits appear at the output of the in-phase Prompt correlator and can be decoded. In addition, with the DLL locked, the local and the incoming codes are aligned. Referring to the local code, the receiver exactly knows when a new code period starts and is able to recognize navigation data bits and boundaries of the navigation message. The receivers stays synchronized to the tracked satellites, continuously counting the number of received chips, full code periods, navigation bits and message frames. These counters are fundamental to measure the misalignment over different channels, tracking different satellites, and are used to compute the pseudoranges. For sake of completeness, note that real receivers generally use architecture more complex than that reported in Fig. 2. For example, a Frequency Lock Loop (FLL) is employed to refine the rough estimate performed by the signal acquisition and ease the PLL lock, reducing the transient time between the signal acquisition and the steady-state carrier/code tracking. Recently new techniques based on digital signal processing have been developed in order to obtain higher precision and reduced computational load, improving the robustness against noise and interference. In this section, we have recalled only some fundamentals of code and carrier tracking, with the goal of providing the necessary background for the following part of the chapter.

Navigation message demodulation, frame and page synchronization
Once the tracking loops are locked (i.e. the local code keeps the alignment with the incoming code and the local carrier is exactly a replica of the received one), the navigation data bits appear at the output of the Prompt correlator, on the in-phase branch of the tracking loops. Considering the GPS L1 C/A code, using an integration time equal to the code period, we obtain a bit value every ms. However, due to the low signal power, real receivers usually set the integration time to 20 ms, which is the inverse of the navigation data rate (i.e. 50 Hz). Fig. 4.a shows 1 second of normalized navigation data bits at the Prompt correlator output, using an integration time of both 1 ms (blue) and 20 ms (red). The same example could be repeated considering the Galileo E1-B signal. In this case, a proper value of integration time is 4 ms, that corresponds to either the code period and the inverse of the navigation data rate. An example of navigation data bits, recovered processing the signal tranmitted by a simulated Galileo satellite, is shown in Fig. 4.b. The stream of data bits must be decoded to recover the message broadcast by the satellite. The navigation data follow the scheme defined in the GPS Interface Control Document (Arinc Research Corporation, 1991) in case of GPS, while all the information regarding the navigation message of the Galileo Open Service can be found in (European Commission, 2010).
Since the navigation format is out of scope of this chapter we will give just an introduction to the argument by showing the general structure both of the GPS and Galileo message. In Fig. 5 the overall navigation data in case of GPS L1 C/A code is depicted. The rate of the navigation data bits is 50 bits per second. The whole message is 12.5 minutes long and is divided in 25 frames. Each frame lasts 30 seconds and is further divided in 5 subframes, six seconds long. Each subframe of the navigation message always starts with two special words, the Telemetry (TLM) and the Handover word (HOW).
In case of the Galileo E1 signal, the complete navigation message is transmitted on the data channel (E1-B) as a sequence of frames. A frame is composed of several sub-frames, and a sub-frame, in turn, is composed of several pages. The page is the basic structure to build the navigation message. Fig. 6 shows the structure of the Galileo data and an example of page for the E1-B message.
Prior to the navigation data decoding, the receives seeks for the preamble, a defined sequence of n bits, that marks the beginning of a subframe for the GPS L1 C/A, a page for the Galileo E1-B. A simple, but efficient, way to detect the preamble is to correlate the navigation data stream with a local binary sequence equal to the preamble. A maximum is detected when such a local sequence is aligned with the preamble. Naturally, the bit pattern used for the preamble can occur anywhere in the received data stream, thus an additional check must be carried out to authenticate the real preamble (e.g. in case of GPS, only when the maximum of correlation is found exactly every 6 seconds). When the beginning of the subframe is identified, the content of the subframe can be decoded. The receiver retrieves all the orbital parameters (i.e. ephemeris) necessary to compute the satellite position corresponding to the transmission of the subframe. Through the process used for navigation data decoding, the receiver is able to understand which subframe and word a certain bit belongs to. In this way, the receiver can have an exact, precise and real-time "comprehension" of each sample/bit broadcast by the satellite. This aspect will be fundamental in the computation of the pseudoranges as it will be explained in the next section.

Performing range measurements using GNSS signals
In this section we focus on the measurements of the pseudorange, describing some methods commonly used to estimate the distance between the satellite and the user's receiver.
So far, we have explained how the detection of a preamble is an effective way to recognize the beginning of a subframe (a page in case of Galileo) and the starting point for decoding the navigation message. Here and in the following we want to introduce how GNSS receivers use the detection of a preamble to compute a valid pseudorange and estimate the user's position and velocity. According to (Borre et al., 2006), the pseudorange estimations can be divided into two sets of computations: the first is devoted to find the initial set of pseudoranges, the second keeps track of the pseudoranges after the first set is estimated.

Computation of the first set of pseudoranges
Before proceeding with the explanation of the pseudorange computation, it is useful to recall some hypothesis, that will be taken as true from now on.
All the clocks on-board of the satellites are assumed perfectly synchronized to a reference GNSS time-scale. In other words, we assume that the first chip of a definite subframe/page leaves the satellites at the same instant GNSS tx t . In addition: • all the satellites belonging to the same system (i.e. GPS, GLONASS, Galileo) are synchronized each others but they are not with respect to different GNSSs; • the receiver clock is not synchronized with the GNSS time-scale (as the school clock in the example of section 2 was not synchronized to Alice and John's watches). The actual time at the receiver can be written as = Δ is the bias with respect to the clock on board of the satellite. For sake of simplicity, we assume that b Δ remains constant over time. In the notation, the superscripts refer to the time-scale, while we use subscripts to identify definite time instants; • all the examples and equations are given for the GPS satellites only but the explanation can be considered valid and easily extended for other GNSS systems too.
With these hypothesis in mind, once the preamble has been correctly detected, every navigation data for each satellite in view can be tagged with additional information such as the corresponding subframe, the number of bits read from the beginning of that subframe as well as the number of samples processed up to that time instant by acquisition and tracking stages. In this way, it will be easy to make comparisons among channels and calculate the time delay of the satellites. In fact, "during the collection of the digitized data there is no absolute time reference and the only time reference is the sampling frequency. Moreover, the pseudorange can be measured only in a relative way because the clock bias of the receiver is an unknown quantity" (Tsui, 2000). Therefore the pseudorange can be computed as the distance (or time) between two reference points. The way the reference points are chosen makes the main difference in the two methods that are commonly used in commercial receivers for the pseudorange computation and that we can call "common transmission time" and "common reception time", respectively.

Common transmission time
According to this approach, since all the satellites are synchronized, they broadcast the same preamble at the same moment, which is received by the user at different instants, due to different propagation delays. This approach follows what pragmatically happens in a real scenario where the satellites have different distances with respect to the user.
The left side of Fig. 7 represents the same subframe transmitted by the satellites at GPS tx t . On the right, Fig. 7 shows the local codes displacement at the receiver, assuming four tracked satellites. The blue rectangular is the TLM word of the subframe, which is received at different instants , Δ is unknown. If the receiver was able to compute i τ , the distances between the receiver and satellites would be simply obtained as: where c stands for the speed of light.

www.intechopen.com
Global Navigation Satellite Systems -Signal, Theory and Applications 118 Fig. 7. Pseudorange computation based on "comon tranmission time", evaluating the beginning of a subframe for GPS system Referring to Fig. 7, the satellite tracked on channel 1 is taken as reference, since the subframe transmitted at GPS tx t arrives first. In other words this means that the satellite tracked on channel 1 has the shortest distance respect to the receiver. Since the same subframe from the other satellites is received at different times, the receiver has to count, for each tracked satellite, the amount of time past from the reception of the subframe on the reference channel. Regarding to this concept, it is important to stress that the measurement of the delay between the reference satellite and the others in view has not necessarily to be performed on the beginning of a subframe, but it must be computed consistently (i.e. with respect to the same word or data bit belonging to the same subframe).
When the receiver is able to compute, for each tracked satellite, the relative time difference with respect to the reference channel, the relative pseudoranges can be evaluated.
In formula this difference can be written as: ρ is the reference pseudorange, corresponds to the satellite closest to the user. Even if the receiver does not know the distance between this satellite and the user, a realistic value of 1 ρ can be set as an approximation. In fact, by considering that a typical travel time from the satellites to the Earth is on the order of 65-83 ms, an appropriated value could be 1 =70 τ ms (Borre et al., 2006), thus 11 = = 20985.47 cK m ρτ ⋅ . It is important to note that such approximated reference pseudorange, does not affect the computation of the user's position. Eventually, a the error due to on such approximation falls in the terms that takes into account the clock bias.; • b Δ has not been determined yet, but it will be solved computing the set of equations (6).

Common reception time
The second approach performs the pseudoranges estimation, setting a common receiving time R u t over all the channels. Also in this case, the reference channel is the one that receives the subframe transmitted at GPS tx t first. For all the tracked satellites (including the reference one), the receiver counts the elapsed time between the reception of subframe and R u t .This means that the receiver measure the delays as: Once the i δ has been computed, the receiver is able to calculate the pseudorange easily. This can be accomplished by evaluating the delta-difference ( i Δ ) of delays with respect to the satellites and the reference one. The aforementioned relative difference i Δ is stated as: and consequently, by modifying equation (12), the pseudoranges can be written as: where, as in the case of "common transmission time": Δ represents the clock bias between the one on board of the satellite and the receiver's one.
This second method is usually employed in commercial GPS receivers. The main reason behind this choice is the relative simplicity and suitability of that approach in real-time implementations, since it does not require to wait until all the channels have received the same data bit (e.g. the beginning of the same subframe) to compute the pseudoranges. This concept gets more clear if we consider that, during the data demodulation and the tracking process, the receiver continously counts the number of samples processed on that channels, as well as the number of frames, subframes and data bits decoded. As a consequence, through a system of counters, it becomes easy to compute the time difference i Δ among the channels at a certain R u t .

Computation of the subsequent sets of pseudoranges
Once the initial set ot pseudoranges has been computed, subsequent pseudoranges can be estimated. In this case, the computation of the reference pseudorange (i.e. 1 ρ ) can be refined with respect to the approximated value set during the first estimate (see section 4.1.1 for details). In fact, at this stage, the receiver has already computed the first estimate of its position and is able to accurately calculate the geometrical distance between the satellite and itself.
As far as the pseudoranges of the other satellites in view is concerned, let suppose that the receiver performs a new PVT every second.
According to the method based on common transmission time, the receiver has to measure a delay of 1s for the reference channel. By considering that a GPS navigation data lasts for 20 ms, it means that, after 1 second, 50 bits have been decoded for the reference satellite, starting from the beginning of the subframe. In order to estimate the time difference, the receiver must wait until each channel has demodulated 50 bits after the beginning of the subframe. Then, the pseudoranges can be computed as stated in equation (6) and the process repeats over time.
On the contrary, if the receiver follows the"common reception time", it moves ahead R u t of 1s, before measuring the time difference among the channels. Again, it is important to stress that this reception time is fixed by the receiver and it is independent from the number of navigation bits have been read for each tracked satellite.
The receiver can compute the user's position estimation at a rate much higher than 1 Hz. If we consider as the reference time the beginning of a new C/A code (i.e. every ms), the receiver can update the PVT at a 100 Hz rate.

Position, velocity and time (PVT) computation
This section completes the chapter and deals with the estimation of the user's PVT that comes after the measurement of a set of pseudoranges, for at least four satellites in view.
In order to have an accurate estimate of the user's position, the receiver has to consider additional error sources that typically affect the measured pseudorange and that have to be compensated. These sources include atmospheric effects (e.g. ionosphere and troposhere, that generate a delay in the signal broadcast by the satellite) and other kinds of noise related to the presence of multipath and interference.
A valid PVT can be estimated after the receiver retrives the satellites' positions, (i.e.: i x , i y , i z as stated in equation (6)) from the navigation message. To compute the satellite position, the receiver needs the ephemeris and the time of transmission, which is usually referred to the beginning of the subframes. All the information the receiver needs is embedded in the navigation message. The time of transmission can be read every 6 seconds at the beginning of a subframe in a specific word that corresponds to the HOW. From the HOW the receiver retrieves a truncated version of the absolute GPS time (TOW). This number is referred to as Z-count. The Z-count is the number of seconds passed since the last GPS week rollover in units of 1.5s. The truncated Z-count in the HOW corresponds to the time of transmission of the next navigation data subframe. To get the time of transmission of the current subframe, the Z-count should be multiplied by 6 and 6s should be subtracted from the result (Borre et al. 2006). Therefore, if we assume to perform the pseudorange estimation at the beginning of a new subframe, the time of transmission will be exactly equal to the value reported in the HOW of the previous subframe. Otherwise, if we implement the computation of the pseudorange in a different instant, we have to count the time elapsed between the beginning of the subframe and that instant. The way the time of transmission is computed represents the main difference between the two aforementioned methods (i.e. "common transmission time" and "common reception time"). According to the first method, all the satellites transmit the signal at the same time and, if we assume to calculate the pseudorange at the beginning of a subframe, this correspond to the TOW. On the contrary, if we consider the second approach, we have to keep in mind a different time of transmission for each satellite. Practically speaking, we have to sum up the TOW with the δ i delay that elapsed from the starting point of the subframe and R u t . Since every satellite has a different distance with respect to the Earth, it follows that the δ i delay will vary according to the satellite under consideration.
When four satellite have been correctly tracked, the full set of equations can be rewritten after having removed the satellite offset and atmospheric effects. According to the "common transmission time", the equations can be stated as in equation (6)  If we suppose to start the PVT computation at the beginning of a subframe, updating the computation every second, using the common transmission time method, the first set of pseudorange corresponds to a time of transmission equal to TOW and is always an integer time of seconds for the subsequent sets. On the contrary, using the common reception time method, the pseudorange is computed at a transmission time that is not the same as TOW, but changes according to the reception time that has been fixed in the receiver. An example of real values of transmission time, following the two different approaches is reported in Table 1 Table 1. Different time of transmission according to the "common transmission" and "common reception" methods An example of position estimation using the LS method is reported in Fig. 10. The LS algorithm have been run on the data sets of pseudoranges computed according to the two techniques and using both real GPS and simulated Galileo satellite signals.  Fig. 10. PVT solution for a joint GPS/Galileo receiver by using "common reception time" and "common transmission time" for the pseudoranges computation and a LS-based receiver As expected, the trajectory of the user estimated by the two methods does not significantly differ and the variance of the positioning error along the three axis X,Y,Z has the same magnitude in both cases. This fact proves once again the benefit of using a unique time of reception, which is particularly suitable without affecting the position accuracy.

Conclusion
In this chapter we have examined the GPS code-phase measurements in order to compute precise satellite-user ranges and to estimate the receiver's position accurately. Since the clocks on board of the satellites are not synchronized with the clock of the receiver, measures of code phase gives pseudoranges instead of ranges. Then, by limiting the discussion only at the pseudoranges computed through the code-phase estimation, two different methods have been presented. The former considers that all the satellites are synchronized and each navigation message is received by the user at different time instants. Therefore, measuring the time offset among all the channels and assigning a nominal travel time to the closest satellite, we are able to calculate the pseudoranges. On the other hand, the latter technique foresees the measure of time delays by fixing a common reception time over all the receiver channels. The first method is the most intuitive and didactic, while the second is more suitable for real-time implementations and is often employed in commercial GPS receivers. In both the approaches, a fundamental role is played by the tracking stage whose aim is to continuously refine the misalignment between the incoming signal and the local replica in order to perform the code de-spreading and retrieve the navigation data. On the basis of the local code evolution, GNSS receivers measure code phase delays, implementing a set of time-counters that accumulate the number of processed frames, subframes, data bits, code periods and samples for all the tracked satellites.