The Final Step - Calculate the Receiver Position

At this stage the following quantities should be available:

From these quantities the following 4 unknowns are to be solved: the receiver coordinates Xr, Yr and Zr, and the receiver clock error Cr. The relation between the known quantities and the unknown quantities are given by Pythagoras' theorem:

Prs + Cr + Es = sqrt{(Xr - Xs)^2 + (Yr - Ys)^2 + (Zr - Zs)^2};    s = 1 , ... , n

with Es the lump sum of all remaining model errors (SV clock error, iono- and tropo delay) and unmodelled errors (such as multipath error and receiver noise) in the pseudoranges Prs.

To solve these n equations, first linearize:

Prs + Cr + Es = Rrs + dX * (Xr - Xs) / Rrs + dY * (Yr - Ys) / Rrs + dZ * (Zr - Zs) / Rrs ;
s = 1 , ... , n

with Rrs the distance between the receiver and satellite s, calculated with the apProximated receiver position coordinates, and dX, dY, dZ the updates to these coordinates.

The n equations can be re-arranges as follows:

[(Xr - Xs) / Rrs] * dX + [(Yr - Ys) / Rrs] * dY + [(Zr - Zs) / Rrs] * dZ - Cr = Prs - Rrs + Es ;
s = 1 , ... , n

To solve this set of n equations with 4 unknowns is a standard least squares Problem, which is treated in any textbook on applied math. In case n equals 4, the Es's are set to zero.
The Procedure is as follows: 

  1. Make an initial guess for Xr, Yr and Zr.
  2. Enter the values in the above set of equations and solve them for dX, dY, dZ and Cr.
  3. Update the position estimate
  4. If dX, dY and dZ are greater that than some criterion (for a GPS position calculation based on pseudoranges 1 cm may be a good guess) go back to step 2.

Click here to  inspect, or download the Turbo Pascal Procedure 'solve' It's a procedure within my program to calculate receiver position from raw data. It is an example of an implementation of the above described steps. I made it for demonstration purposes, certainly not for efficiency and speed. The implementation of the least squares solution is VERY basic textbook and according mathematicians may be numerically unstable! However, it serves its demonstration purposes (and I use it for real-world problems without difficulty). You'll find stable and efficient procedures in math toolkits for your programming language.


Back to s/w index.
This page was modified on 29 October 1997