Position Calculation based on Single Difference Pseudoranges

The idea behind differential GPS is to remove as much errors as possible from the range measurements by establishing these errors at a reference site. In its most simple setup, a GPS receiver is located at a well surveyed position and its (pseudo) range measurements are compared with the actual calculated range from this receiver to the SV's. The differences between measured ranges and calculated ranges at the reference receiver are applied as corrections to the ranges measured by other receiver(s) close by.

For navigation purposes the corrections have to be applied in real time, and thus some communication link is required between the reference receiver and the moving receiver(s). For geodetic purposes the position calculation is often carried out off line, and no data link is required. For reasons of simplicity I start with the off line problem. In a following page I will emphasize real time processing.

For a Single Difference (SD) position calculation the following steps have to be made:

  1. Calculate the StandAlone (SA, not to be mistaken by S/A or Selective Availablility) position at the reference receiver (ref rcvr) and correct the measured pseudoranges for SV clock error, iono delay, tropo delay and ref rcvr clock error . One pass suffices since a very good initial guess is available: the surveyed position of the ref rcvr antenna).
  2. Do the same for the moving receiver (mov rcvr), use again the ref rcvr position as initial guess, one pass may suffice.
  3. Extrapolate the pseudoranges to a common point of time (e.g. the nearest full GPS second) by:
  4. Determine the transit times from the SV's to the ref rcvr using the corrected pseudoranges and calculate the SV positions.
  5. Calculate SD corrections of the pseudoranges at the ref rcvr.
  6. Apply the corrections to the pseudoranges at the mov rcvr.
  7. Calculate the mov rcvr position.
  8. Check:

The only assumption made above is, that the transit time from any SV to the ref rcvr equals the transit time from that SV to the mov rcvr. The validity of this assumption decreases with an increasing distance between ref rcvr and mov rcvr, and introduces an additional error. It is sometimes estimated as 1 m position error for each 100 km distance between mov and ref.

Under additional constraints some of the above steps can be ommited:

  1. If the distance between the mov rcvr and the ref rcvr is small, say below 50 km, the SV clock error, the iono delay and the tropo delay are nearly equal for both receivers and cancel when forming SD's. In this case they don't have to be determined in the SA position calculation. This saves a lot of work, because not only the calculation can be skipped, but also the conversion from iono- and clock parameters to engineering units. The latter don't even have to be downloaded and recorded !
  2. If the receiver clock errors are already known (e.g. calculated by the receiver), the SA position calculations can be skipped altogether !
  3. If the measurements times are equal within a few tens of microseconds (class 1 receivers), the pseudorange extrapolations can be skipped.

In the next theoretical section I made the above assumptions for reasons of simplicity.

The following notation is used:

For an SD position calculation based on pseudoranges the following quantities should be available:

From these quantities the following 4 unknowns are to be solved: the mov rcvr coordinates Xm, Ym and Zm, and the SD clock error Cm - Cr.
The following error model is used:

Pms + Cm + Ems = Rms     (1)
Prs + Cr + Ers = Rrs     (2)

Subtract (2) form (1):

[Pms - Prs] + [Cm - Cr] + Erms = [Rms - Rrs]     , or:
[Pms - Prs] + [Cm - Cr] + Erms = [sqrt{(Xm - Xs)^2 + (Ym - Ys)^2 + (Zm - Zs)^2} - Rrs]     (3)
with Erms the combined differential remaining errors, such as model errors, multipath and receiver noise. To solve for the unknown quantities Xm, Ym and Zm the square root form for Rms is linearized according:

Rms = Rms0 + dRms
= Rms0 + {(Xm0 - Xs)/Rms0}*dXm+{(Ym0 - Ys)/Rms0}*dYm+{(Zm0 - Zs)/Rms0}*dZm
with Xm0, Ym0, Zm0 the initial guesses for the unknown mov rcvr coordinates, and Rms0 the distance between the initial guessed mov rcvr position and the SV.

Entering the linearized form in the SD model (3) gives:

[Pms - Prs] + [Cm - Cr] + Erms = [Rms0 + {(Xm0 - Xs) / Rms0} * dXm
   + {(Ym0 - Ys) / Rms0} * dYm + {(Zm0 - Zs) / Rms0} * dZm - Rrs]

Re-arranging and renaming gives:

{(Xm0 - Xs) / Rms0} * dXm + {(Ym0 - Ys) / Rms0} * dYm + {(Zm0 - Zs) / Rms0} * dZm
   - Crm = Pmsc - Rms0 + Erms      (4)

with
Crm = Cm - Cr, the differential clock error, and
Pmsc = Pms - (Prs - Rrs), the differential corrected pseudorange observation.
The term Prs - Rrs is the difference between the pseudorange observation to an SV at the ref rcvr and the true range from ref rcvr to the corresponding SV. It is thus the differential correction at the ref rcvr and is applied to the observation at the mov rcvr.

The expression (4) has exactly the same form as the corresponding expression for the stand alone position calculation with the 'zero difference' quantities Cr, Prs, Rrs and Es replaced by their corresponding 'single difference' quantities Crm, Pmsc, Rrms0 and Erms respectively. The solution of the expression (or better: the k expressions with k the number of satellites tracked by both the reference receiver and the moving receiver) is identical, which means, that the s/w implementation can be stolen from the SA implementation ! And that saves a lot of work. Basically the SD problem has been reduced to an SA problem, by using the differential corrected pseudoranges in stead  of  the raw pseudoranges.

The Procedure is as follows: 

  1. Make an initial guess for Xm0, Ym0 and Zm0.
  2. Enter the values in the above set of equations and solve for dXm, dYm, dZm and Crm.
  3. Update the position estimate
  4. If dXm, dYm and dZm are greater that than some criterion (for a GPS position calculation based on single difference pseudoranges 1 cm may be a good guess) go back to step 2.

View and/ or download the example Turbo Pascal code 'singldif.pas' with input- and output data files. The code has been produced based on the stdalone.pas example. The code and comment should be self explaining by now.

Some remarks:

  1. The above implementation is pretty clumsy, but I like to emphasise how easy it is to do single difference processing once stand alone processing has been mastered.
  2. In the above given error model it is assumed that the moving receiver and the reference receiver 'measure' the pseudoranges at the exactly the same moment. In practice, there will alway be some time difference. If you operate with class 1 receivers (see the OEM-table for an explanation), this difference will probably not exceed 1 microsecond and can be neglected. With class 2 receivers the difference can be a few milliseconds and can be compensated by extrapolating the pseudoranges to a common point of time. With class 3 receivers the difference can be 0.5 sec and a simple extrapolation process may be in error by several meters ! (and that's the reason why I like class 1 receivers over class 2 receivers over class 3 receivers).


Back to s/w index.
This page was produced on 3 November 1997