# A Novel Error Correction Approach to Improve Standard Point Positioning of Integrated BDS/GPS
## 2 Standard Point Positioning of Integrated BDS/GPS
### Integrated Positioning Model  
For GPS satellites, the observation equation for pseudorange is:  
\[P^{G}=\rho^{G}+c(dt_{G}-dt^{G})+T^{G}+I^{G}+e^{G} \tag{2}\]  
where \(P^{G}\) is the pseudorange measurement from satellite to receiver; \(\rho^{G}\) represents the geometric distance from receiver to satellite; \(c\) denotes the speed of light; \(dt_{G}\) means the receiver clock error; \(dt^{G}\) is the star clock error; \(T^{G}\), \(I^{G}\) and \(e^{G}\) represent the tropospheric delay, ionospheric delay and other delay error terms, respectively; and \(G\) stands for GPS satellites.  
For BDS satellites, the observation equation for pseudorange is:  
\[P^{C}=\rho^{C}+c(dt_{C}-dt^{C})+T^{C}+I^{C}+e^{C} \tag{3}\]  
where \(C\) stands for BDS satellites and the meaning of the parameters is the same with the GPS satellites.  
Suppose the number of GPS satellite signals received by the receiver is \(m\) and the number of BDS satellite signals is \(n\). The mathematical model of the combined positioning is shown in Equation (4) [27].  
\[AX=\left[\begin{array}{cccc}-\frac{X^{G1}-X_{\dot{0}}}{\rho_{i}^{c1}}&-\frac {Y^{G1}-Y_{\dot{0}}}{\rho_{i}^{c1}}&-\frac{Z^{G1}-Z_{\dot{0}}}{\rho_{i}^{c1}}&1 &0\\ \vdots&\vdots&\vdots&\vdots&\vdots\\ -\frac{X^{Gm}-X_{\dot{0}}}{\rho_{i}^{c1}}&-\frac{Y^{Gm}-Y_{\dot{0}}}{\rho_{i} ^{c1}}&-\frac{Z^{Gm}-Z_{\dot{0}}}{\rho_{i}^{c1}}&1&0\\ -\frac{X^{G1}-X_{\dot{0}}}{\rho_{i}^{c1}}&-\frac{Y^{G1}-Y_{\dot{0}}}{\rho_{i} ^{c1}}&-\frac{Z^{G1}-Z_{\dot{0}}}{\rho_{i}^{c1}}&0&1\\ \vdots&\vdots&\vdots&\vdots&\vdots\\ -\frac{X^{Gm}-X_{\dot{0}}}{\rho_{i}^{c1}}&-\frac{Y^{Gm}-Y_{\dot{0}}}{\rho_{i} ^{c1}}&-\frac{Z^{Gn}-Z_{\dot{0}}}{\rho_{i}^{c1}}&0&1\end{array}\right]\left[ \begin{array}{c}\bigtriangleup X_{i}\\ \bigtriangleup Y_{i}\\ \bigtriangleup Z_{i}\\ c\cdot dt_{Ci}\\ c\cdot dt_{Ci}\end{array}\right]=b \tag{4}\]  
where \(X^{k}\) denotes the X-axis coordinate of satellite \(k\), \(Y^{k}\) denotes the Y-axis coordinate of satellite \(k\) and \(Z^{k}\) denotes the Z-axis coordinate of satellite \(k\). \(\rho_{i}^{k}\) means the geometric distance from receiver \(i\) to satellite \(k\). \(X_{i0}\), \(Y_{i0}\) and \(Z_{i0}\) represent initial estimated coordinates of the receiver \(i\) on X-axis, Y-axis and Z-axis, while \(\bigtriangleup X_{i}\), \(\bigtriangleup Y_{i}\) and \(\bigtriangleup Z_{i}\) stand for the difference between estimated coordinates and real coordinates, respectively.  
If \(m+n\geq 5\) in the formula, the value of \(\bigtriangleup X_{i}\), \(\bigtriangleup Y_{i}\) and \(\bigtriangleup Z_{i}\) can be calculated by least square method, iteratively iterating to minimize \(b\), where \(b=P_{i}-\rho_{i}+c\cdot dt^{G}+c\cdot dt^{C}-T_{i}-I_{i}-e_{i}\).  
The steps of Integrated BDS/GPS positioning are as follows:  
1. Read RINEX format file generated by Sinan M300 GNSS receiver separately. In the RINEX format file, N file represents GPS ephemeris file, C file represents BDS ephemeris file and O file represents BDS/GPS observation file.
2. Convert the UTC time of BDS and GPS in the observation file into BDS time and GPS time, and unify the time.
3. Judge the number of visible satellites in a certain epoch. If the number of visible satellites is greater than or equal to 5, continue, and, if not, the end.
4. Select the effective ephemeris. The reference time of the effective ephemeris must be within 2 h of BDS/GPS time.
5. Calculate position and clock difference of BDS/GPS respectively. Then, correct error of Earth's rotation.
6. Calculate the elevation and azimuth of the satellite using the position of the satellite and the receiver.
7. Use the error correction model to calculate the corresponding ionosphere and tropospheric delays.
8. Calculate receiver position until the difference between the two positions of the receiver is less than a threshold.
9. Perform WLS [28; 29] or Kalman filter [29; 30; 31] on positioning.