# Cloud-Based Single-Frequency Snapshot RTK Positioning
## 2 Methodology
### Acquisition  
Currently, there are mainly two receiver design choices in order to obtain valid measurements of code delay, Doppler offset and carrier phase. This brings 2 types of GNSS positioning architecture: the closed-loop sequential tracking architecture and the open-loop batch processing architecture [7]. The former is used in most of the GNSS receivers currently in the market. It computes the code delay errors using, for example, an early-minus-late discriminator and the carrier phase errors using a Costas loop. These measurement errors are then utilized in a feedback loop to generate a local replica that better aligns the received signal. This architecture provides a continuous measurement output coming from these replicas. The latter, one the contrary, computes the correlation between the input signal and a batch of replica signals that are constructed based on the code and frequency search spaces, then the outputs are generated by seeking for the parameters that lead to the maximum energy. This method is less commonly used but is more practical for snapshot data due to the short duration of the recording and, at the same time, it can improve the  
Figure 2: SRTK data processing steps. positioning robustness in harsh signal reception scenarios [18]. The open loop strategy was also chosen for this research. The main goal of the acquisition module is to estimate the code delay, Doppler offset and carrier phase for each satellite signal. The code delay measurements of each satellite in view are computed by exploiting the autocorrelation properties of the Pseudo-Random Noise (PRN) codes [5; 19]. The coarse position and time information in the assistance data is used to obtain a rough estimate of the Doppler values; based on that, a few initial guesses of Doppler offset are used together with the known PRN sequences in order to form a batch of local replicas. After that, a Cross Ambiguity Function (CAF) is computed and the primary results can be obtained by searching for the parameters that lead to the maximum CAF magnitude. The CAF is a complex-valued function that is modeled as [20]:  
\[Y(\tau,F_{D})=Y_{I}(\tau,F_{D})+jY_{Q}(\tau,F_{D}), \tag{1}\]  
where \(Y_{I}(\tau,F_{D})\) and \(Y_{Q}(\tau,F_{D})\) are the in-phase and quadrature components of the CAF and represented, respectively, as follows:  
\[ \begin{split} Y_{I}(\tau,F_{D})=\frac{1}{N}\sum_{n=0}^{N-1}r[n] \cos(2\pi F_{D}n)c[n-\tau],\\ Y_{Q}(\tau,F_{D})=\frac{1}{N}\sum_{n=0}^{N-1}-r[n]\sin(2\pi F_{D} n)c[n-\tau].\end{split}  \tag{2}\]  
Here, \(\tau\) and \(F_{D}\) stand for the code delay and Doppler frequency normalized by the sampling rate \(f_{s}\), i.e., \(F_{D}=f_{d}T_{s}=\frac{f_{d}}{f_{s}}\) with \(T_{s}\) representing the sample duration. \(r[n]\) is the received signal and \(c[n-\tau]\) is the shifted local replica of the PRN code. \(N\) is the number of samples, which is determined by the duration of coherent integration time used in acquisition and the sampling rate selected. Note that the previous equations have ignored the effects brought by the possible phase changes of the navigation bits or secondary codes. In closed-loop architecture, a bit synchronization process is usually implemented to handle this issue, and the navigation bits are demodulated and wiped out in the following tracking loops. However, when computing the CAFs for open loop architectures, it is important to introduce multiple hypotheses for these data bits in order not to degrade the correlation peak magnitude [21]. For example, GPS LICA signals are modulated with navigation data bits with a duration of 20 ms. If the coherent integration time is set to 20 ms as well, there could be one navigation bit sign change at any of the code period edges inside this signal recording. Therefore, 20 hypotheses are taken, corresponding to the possible bit shifts, and when there is a bit transition, the correct shift will maximize the CAF correlation peak. Note that these hypotheses need to be made for each satellite and are treated independently.