If you wish to contribute or participate in the discussions about articles you are invited to contact the Editor

# Code Based Positioning (SPS) Fundamentals
Title Code Based Positioning (SPS)
Author(s) J. Sanz Subirana, J.M. Juan Zornoza and M. Hernández-Pajares, Technical University of Catalonia, Spain.
Year of Publication 2011

The target is to determine the receiver coordinates $\displaystyle{ {\mathbf r}=(x,y,z) }$ and clock offset $\displaystyle{ \delta t }$ from pseudorange measurements $\displaystyle{ R^j }$ of at least 4 satellites in view. The positioning principle is based on solving a geometric problem from the measured ranges to the satellites, with known coordinates. The satellite coordinates can be computed from the broadcast message, which also provides all necessary information for the measurements modelling for the Standard Positioning Service (SPS).

From the code pseudorange measurements $\displaystyle{ R^j }$ for, at least, four satellites (see GNSS Measurements Modelling and Instrumental Delay),

$\displaystyle{ R^j=\rho^j+c(\delta t-\delta t^j)+T^j+\hat{\alpha}\, I^j+TGD^j+\mathcal{M}^j+{\boldsymbol \varepsilon}^j \qquad \mbox{(1)} }$

The following measurement equations system can be written, neglecting the multipath and receiver noise terms:

$\displaystyle{ \begin{array}{r} R^j-D^j\simeq \sqrt{(x^j-x)^2+(y^j-y)^2+(z^j-z)^2}+c\,\delta t\\[0.3cm] j=1,2,...,n~~~~ (n \geq 4)\\ \end{array} \qquad \mbox{(2)} }$

where the left side equations contain the measurements $\displaystyle{ R^j }$ and all modeled terms $\displaystyle{ \left ( D^j=-c\,\delta t^j+T^j+\hat{\alpha}\,I^j+TGD^j \right ) }$ (see Clock Modelling, Tropospheric Delay, Klobuchar Ionospheric Model, and Instrumental Delay).

The right side contains the four unknown parameters: The receiver coordinates $\displaystyle{ (x,y,z) }$ and the receiver clock offset $\displaystyle{ \delta t }$.

The previous equation (2) defines a non linear system, which a usual resolution technique consists of linearising the geometric range $\displaystyle{ \rho }$ in the neighbourhood of a point $\displaystyle{ (x_0,y_0,z_0) }$ corresponding to an approximate receiver position.

Then, linearising the satellite-receiver geometric range

$\displaystyle{ \rho^j(x,y,z)=\sqrt{(x^j-x)^2+(y^j-y)^2+(z^j-z)^2} \qquad \mbox{(3)} }$

at the approximative solution $\displaystyle{ {\mathbf r}_0=(x_0,y_0,z_0) }$, one obtains:

$\displaystyle{ \rho^j=\rho_0^j+\frac{x_0-x^j}{\rho_0^j} dx +\frac{y_0-y^j}{\rho_0^j} dy+\frac{z_0-z^j}{\rho_0^j}dz \qquad with \qquad dx=x-x_0; dy=y-y_0;dz=z-z_0 \qquad \mbox{(4)} }$

Substituting (4) into (2) we can rewrite the measurement equations as a linear system (where $\displaystyle{ R^j }$ can be whatever, smoothed or unsmoothed code):

$\displaystyle{ \begin{array}{r} R^j-\rho_0^j-D^j=\frac{x_0-x^j}{\rho_0^j}dx +\frac{y_0-y^j} {\rho_0^j} dy+\frac{z_0-z^j}{\rho_0^j} dz+c\,\delta t\\ \\ j=1,2,...,4~~~~(n \geq 4) \end{array} \qquad \mbox{(5)} }$

The previous navigation equation system [footnotes 1] is written in matrix notation as:

$\displaystyle{ \left[ \begin{array}{l} R^1-\rho_0^1-D^1\\ \vdots\\ R^n-\rho_0^n-D^n \end{array} \right] = \left( \begin{array}{cccc} \frac{x_0-x^1}{\rho_0^1}& \frac{y_0-y^1}{\rho_0^1}& \frac{z_0-z^1}{\rho_0^1} & 1\\ \vdots&\vdots&\vdots\\ \frac{x_0-x^n}{\rho_0^n}& \frac{y_0-y^n}{\rho_0^n}& \frac{z_0-z^n}{\rho_0^n} & 1\\ \end{array} \right) \left[ \begin{array}{l} dx\\ dy\\ dz\\ c\,\delta t \end{array} \right] \qquad \mbox{(6)} }$

In general, an over-dimensioned system is obtained (for $\displaystyle{ n \gt 4 }$), which can be solved using the Least Squares adjustment.

After solving the equations system (6), the improved estimate of the receiver coordinates is:

$\displaystyle{ \begin{array}{l} \left[ \begin{array}{l} x\\ y\\ z\\ \end{array} \right] =\left[ \begin{array}{l} x_0\\ y_0\\ z_0\\ \end{array} \right] + \left[ \begin{array}{l} dx\\ dy\\ dz\\ \end{array} \right] \end{array} \qquad \mbox{(7)} }$

The equations (2) can be linearised again about these new estimates (7) of the receiver position, and the solution can be iterated until the change between two consecutive iterations is under a given threshold. Typically, the iterations converge quickly, in few iterations, even if starting with $\displaystyle{ (x_0,y_0,z_0)=(0,0,0) }$, i.e., the earth's centre.

The equations (6) will be named Navigation Equation System and can be written in compact form as:

$\displaystyle{ {\mathbf Y}={\mathbf G}\,{\mathbf X} \qquad \mbox{(8)} }$

where the vectors and matrix involved can be defined as:

• Prefit-residuals: Y is a ($\displaystyle{ n \times 1 }$) vector containing the residuals between the measured and predicted pseudoranges, "before fitting" the parameters $\displaystyle{ (dx,dy,dz, \delta t) }$ to the linear model.
• Geometry matrix: G is a ($\displaystyle{ n \times 4 }$) matrix containing the receiver-satellite geometry [footnotes 2]. The first three elements of each row (j = 1,...,n) are the components of the unitary line-of-sight-vector $\displaystyle{ {\boldsymbol \rho}= -\frac{(x_0-x^j,y_0-y^j,z_0-z^j)}{|| (x_0-x^j,y_0-y^j,z_0-z^j)||} }$.
• Unknown parameters: X is a ($\displaystyle{ 4 \times 1 }$) vector containing the deviation $\displaystyle{ (dx,dy,dz) }$ between the approximated and the true coordinates and the receiver clock offset $\displaystyle{ \delta t }$.