# Cloud-Based Single-Frequency Snapshot RTK Positioning
## 2 Methodology
### Measurement Generation
#### 2.3.1 Full Pseudorange Generation  
As mentioned before, it is necessary to assign a correct integer number of code periods to each satellite in order to build a valid geometric range relationship between satellites. This process is named as pseudorange alignment by the authors, and the integer numbers found for these code delays are called code ambiguities in this paper, as a counterpart of carrier phase ambiguities. In principle, the full pseudorange of the \(k\)-th satellite can be represented as:  
\[P^{(k)}=c\cdot(\hat{\tau}^{(k)}+N_{c}^{(k)}\cdot T^{(k)}), \tag{6}\]  
where:  
* \(P\) represents the full pseudorange value, in meters;* \(\hat{\tau}\) is the fractional code delay value obtained from the acquisition step, in seconds;
* \(N_{c}\) stands for the code ambiguity, which is an integer value;
* \(T\) is the duration of a primary code periods, in seconds. For example, for GPS L1 CA signal this value is 0.001 s and for Galileo E1C signal it equals to 0.004 s;
* \(c\) stands for the speed of light constant, in m/s.  
The next step is to make sure that the geometric range values are consistent among all satellites. This can be verified with the help of the coarse time and position information. We define the following parameter \(n_{c}^{(k)}\) as the float code ambiguity  
\[n_{c}^{(k)}=\frac{1}{c}\left\|r^{(k)}-r_{0}\right\|-\hat{\tau}^{(k)}, \tag{7}\]  
where \(r^{(k)}\) is the position of satellite \(k\) computed at the given coarse time \(t_{0}\) and \(r_{0}\) is the rough position of the receiver. The flight time differences among satellites due to their different positions at the time of signal reception has been removed in this equation. However, there is still a common bias remaining in these values that need to be cleared. For this reason, we select the satellite with smallest float code ambiguity as a reference satellite and define it as \(n_{c}^{(0)}\). Then an integer can be found for each of the remaining satellites by the equation  
\[N_{c}^{(k)}=\text{round}\left(\frac{n_{c}^{(k)}-n_{c}^{(0)}}{T^{(k)}}\right), \tag{8}\]  
where \(T^{(k)}\) is the duration of the primary code period for satellite \(k\). Different signals have different primary code period lengths; to simplify this issue, usually the 1-ms code ambiguities are computed by fixing \(T^{(k)}=10^{-3}\) s, since 1 ms is a common divisor for the primary code duration of all GNSS signals. This is usually called the millisecond-ambiguity issue in other literature [14; 15].  
Now we have found a proper integer value that can be assigned to the fractional code delays and assure that they are well aligned to the signal reception time. Note that a constant integer, for example 68, can be added in order to adjust their values to be close to the nominal flight times of GNSS signals; this addition is optional as the existing common bias part will be assimilated to the receiver clock bias term in the navigation filter and does not influence SPP positioning accuracy.  
Notice that there is a rounding process in this equation; this means that, if the errors brought by the inaccuracy of the coarse position and time are too large, a wrong integer maybe computed. More specifically, the combined effect of these assistance data inaccuracy has to go above 0.5 ms, which corresponds to approximately 150 km in geometric range to the satellite. Considering that the coarse time error is usually less than a few seconds, the distance error caused by it remains under a few kilometers as the maximum GNSS satellite pseudorange rate is around 800 m/s [23]. The coarse position error is also well below this error margin as the receiver can use coordinates of nearby cell towers that are typically within tens of kilometers.