## 2 Medium Baseline RTK Algorithm  
### Double-Difference Triple-Frequency Measurement Model  
Considering DD ionosphere delay and troposphere delay residuals as the parameters to be estimated, the original triple-frequency DD code and phase observation equations are given [18] as  
\[\left\{\begin{aligned} &\
abla\Delta P_{1}=\
abla\Delta\rho_{rb}^{st}+m^{ st}\
abla\Delta T_{rb}+\alpha_{1}\
abla\Delta I_{rb}^{st}+\varepsilon_{rb,1}^{st}\\ &\
abla\Delta P_{2}=\
abla\Delta\rho_{rb}^{st}+m^{st}\
abla \Delta T_{rb}+\alpha_{2}\
abla\Delta I_{rb}^{st}+\varepsilon_{rb,2}^{st}\\ &\
abla\Delta P_{3}=\
abla\Delta\rho_{rb}^{st}+m^{st}\
abla \Delta T_{rb}+\alpha_{3}\
abla\Delta I_{rb}^{st}+\varepsilon_{rb,3}^{st}\\ &\
abla\Delta L_{1}=\
abla\Delta\rho_{rb}^{st}+m^{st}\
abla \Delta T_{rb}-\alpha_{1}\
abla\Delta I_{rb}^{st}+\lambda_{1}\
abla\Delta N_{1}^ {st}+\varepsilon_{rb,1}^{st}\\ &\
abla\Delta L_{2}=\
abla\Delta\rho_{rb}^{st}+m^{st}\
abla \Delta T_{rb}-\alpha_{2}\
abla\Delta I_{rb}^{st}+\lambda_{2}\
abla\Delta N_{2} ^{st}+\varepsilon_{rb,2}^{st}\\ &\
abla\Delta L_{3}=\
abla\Delta\rho_{rb}^{st}+m^{st}\
abla \Delta T_{rb}-\alpha_{3}\
abla\Delta I_{rb}^{st}+\lambda_{3}\
abla\Delta N_{3} ^{st}+\varepsilon_{rb,3}^{st}\end{aligned}\right. \tag{1}\]  
where \(\
abla\Delta\) is the DD operator; \(P_{i}\) and \(L_{i}\) denote the code and phase observations, respectively, with \(i=1,2,3\) being the frequency; \(\rho_{rb}^{st}\) is the geometry distance between the receiver and satellite, with \(b,r\) being the base station and the rover station and \(t,s\) being the pivot satellite and the rover satellite; \(T\) denotes the zenith tropospheric delay with the mapping function \(m\); \(I\) represents the slant ionospheric delay with the coefficient \(\alpha_{i}=\frac{\lambda_{i}^{2}}{\lambda_{i}^{2}}\) depending on the wavelength \(\lambda_{i}\); \(N_{i}\) refers to the phase ambiguity; and \(e\) and \(\varepsilon\) denote the code and phase observation noise. In this research, for GPS, the three frequencies refer to L1/L2/L5; for Galileo, the three frequencies refer to E1/E5a/E5b; for BDS, the three frequencies refer to B1I/B2a/ B3I.  
Based on the raw code and phase observation equations, the combined DD code and phase are defined as  
\[\begin{aligned} \
abla\Delta P_{(i,j,k)}&=\frac{i \cdot f_{1}\cdot\
abla\Delta P_{1}+j\cdot f_{2}\cdot\
abla\Delta P_{k}+k\cdot f _{3}\cdot\
abla\Delta P_{3}}{i\cdot f_{1}+j\cdot f_{2}+k\cdot f_{3}}\\ \
abla\Delta L_{(i,j,k)}&=\frac{i\cdot f_{1}\cdot \
abla\Delta L_{1}+j\cdot f_{2}\cdot\
abla\Delta L_{2}+k\cdot f_{3}\cdot\
abla \Delta L_{3}}{i\cdot f_{1}+j\cdot f_{2}+k\cdot f_{3}}\end{aligned} \tag{2}\]  
where the coefficients \(i,j,k\) are arbitrary integers and \(f_{i}=\frac{\varepsilon}{\lambda_{i}}\) denotes the frequency, with \(c\) being the speed of light. The combined wavelength \(\lambda_{(i,j,k)}\) is defined as  
\[\lambda_{(i,j,k)}=\frac{c}{i\cdot f_{1}+j\cdot f_{2}+k\cdot f_{3}} \tag{3}\]  
and the combined ambiguity is  
\[N_{(i,j,k)}=i\cdot\
abla\Delta N_{1}+j\cdot\
abla\Delta N_{2}+k\cdot\
abla \Delta N_{3} \tag{4}\]  
The combined ionosphere delay coefficient is  
\[\alpha_{(i,j,k)}=\frac{f_{1}^{2}\Big{(}\frac{i}{f_{1}}+\frac{j}{f_{2}}+\frac{k }{f_{3}}\Big{)}}{i\cdot f_{1}+j\cdot f_{2}+k\cdot f_{3}} \tag{5}\]  
For GPS, when \((i,j,k)=(0,1,-1)\) and \((i,j,k)=(1,-1,0)\), the wavelengths \(\lambda_{(0,1,-1)}\) and \(\lambda_{(1,-1,0)}\) are about 5.86 m and 0.86 m, typically referred to as EWL and WL, showing that their ambiguities are easy to be fixed.