# Computation of Position and Time

## 1. General

Two types
of measurements can be provided by a GNSS receiver: code measurements and
carrier phase measurements. As a consequence of their respective wavelengths, the
phase measurements are significantly more precise (about 2 mm) than the code
measurements (30 cm to 3 m).

The code measurements are sent as a modulation of the carriers.
The receiver measures the time delay Δ t between the emission time t_{e} of the code at
the satellite and its reception time t_{r} at the receiver;

after multiplication by
the light velocity, this provides a distance. Ideally this distance corresponds to the distance between the
satellite and the receiver. However, as is it shown in the Tutorial How GNSS Works ,
this measurement must
be corrected for the fact that the receiver and satellite
clocks are not synchronized, and for the impacts of the ionosphere and troposphere on the signal velocity.
Consequently, the distance measured is not a real distance but a * pseudo-distance *.

The carrier phase measurements correspond to the phase shift between a replica of the carrier wave generated in the receiver and the received carrier; but as the carrier is a pure sinusoidal, it is not possible to determine the number of cycles between the emission and reception for the first measurement, only the fractional part of a cycle can be measured, as well as its evolution during a satellite track (about 4 hours). The carrier phase measurements φ contain therefore an integer number of cycle (called ambiguity and noted N) that will have to be estimated later on. The phase measurement expressed in units of cycles can be written as:

where *f* is the carrier frequency. After multiplication of the equation by the wavelength of the carrier,
one gets the phase measurement expressed in meters:

## 2. Correction for error sources

**Correction for the non-synchronization of the receiver and satellite clocks
:**

In order to obtain the distance
between the satellite and the receiver from the time difference between the
emission time t_{e} and the reception time t_{r}, these two instants must be expressed in a same time
scale. However,
t_{r}
is in the receiver timescale and t_{e} is in the satellite timescale.
In order to express them in a common reference time scale, we write

From this, by inserting (1.4) and (1.5) in (1.1) and multiplying with the speed of light, the *pseudo-distance* P
between the receiver and the satellite can be written as:

Where ρ is the geometric distance** **between the receiver position and the satellite position :

**Correction for other error sources:**

The pseudorange
equation must still be corrected for Ionospheric (I) and Tropospheric (Tr) delays, and some hardware
delays (δ^{P})
plus noise and multipath (ε^{P}). Adding the
subscripts 1,2 for the two different GPS frequencies named
L1 and L2, this gives the following equation for an observation made by a
particular receiver on a particular satellite:

A corresponding equation can be written for the carrier phase measurements, in units of meters; the additional terms concern the integer ambiguities, the phase windup due to the right polarization of the GPS signals, and the hardware delays and noise terms are different from the pseudorange ones.

where λ is the carrier wavelength. Note the opposite sign of the ionospheric delay with respect to the pseudorange equation, due to an impact on the group velocity in the pseudrange while on the phase velocity in the present case.

**Tropospheric correction : **

The troposphere delay (3 to 20 meters), is expressed as a zenith path delay (zpd) multiplied by a mapping function which accounts for the increase of troposphere delay for low elevation satellites. Depending on the precision required on the position, the troposphere delay can be modeled using a hydrostatic model (which removes about 95% of the effect), or an additional variable wet part can be estimated. See the Tutorial on troposphere for more details. When using only code measurements, the troposphere delay can be modeled as a purely hydrostatic effect with a model which depends on the station altitude and on the satellite elevation, using equations (**), (**) and (**) of the Tutorial on troposphere .

**Ionosphere correction:**

As explained in the tutorial on ionospheric effects, the ionosphere induces a code delay and a phase advance. These can have an effect of 0 to 40 meters and must therefore be removed before the determination of the position. They depend on the Total Electron Content of the ionosphere region crossed by the signal.

For single frequency users, the ionospheric delay must be determined using either a model or some external ionospheric maps, which is only possible for post-processing computations. The navigation message contains some up-to-date parameters that must be used within the Klobuchar model. Some ionospheric maps, e.g. those provided by the IGS analysis center CODE can also be used, and provide a more precise estimation of the ionospheric delay. However, small and rapid structures are not reproduced by these maps, and can therefore not be corrected for within the signal.

This is however no more the case when using dual-frequency measurements. Indeed, at its first order, the ionospheric delay is a function of the square frequency:

so that
a given combination of the code measured on the two carrier frequencies, and
of the phases measured on the two carrier frequencies,
provides a signal in which there is no more ionospheric
delay. This combination is called * ionosphere-free * and reads:

Which gives :

# Absolute Positioning

Using the equations (**) to (**), and combining several simultaneous observations from different satellites (minimum 4 as explained in the tutorial How GNSS Works ), it is therefore possible to determine the receiver position. However, the tropospheric and ionospheric delays must first be corrected, and the satellite position as well as clock non-synchronization with the reference time scale must be known. In addition to the code to be used for positioning, the satellite also sends a navigation message, with information concerning its orbit (as parameters of a Keplerian motion), and its synchronization error of its clock with respect to the reference time scale. These broadcast parameters can then be used, but their precision are limited to 1.60 m for the satellite position and 7 nanoseconds for the clock. The use of broadcast parameters is fully described in http://home-2.worldonline.nl/~samsvl/software.htm. Post-processed orbits can also be used, and offer a better precision. An example of them are the IGS orbits http://igscb.jpl.nasa.gov/siteindex.html given as (x,y,z) coordinates in the International Terrestrial Reference Frame (ITRF) at a sampling rate of 15 minutes, and the corresponding satellite clocks given as the synchronization error with respect to the IGS reference time scale, at a sampling rate of 5 minutes. These products have a precision of 5 cm and 0.1 nanosecond respectively.

The main principle consists in using an a priori station position
and then to determine from the GPS measurements the correct position
as a correction to the a priori values.
In the observation equation (**), the receiver
position is hidden in the geometric distance. The
observation equation
is therefore linearized with respect to this
position, using an a priori value for
the position (x_{0rec}) and a

Where only the differential vector *δx _{rec}* will be estimated.

In what follows, we compute the &rho(*x _{0rec}*), i.e. the distance between
the satellite position at the emission time and the receiver a priori position a the reception time.

**Satellite position**

In order to determine the position of the satellite at the time of the signal emission, first the exact signal emission time must be determined, then the satellite position is computed either from the broadcast parameters or from interpolation of post-processed orbits. An iterative process is then used:

From the pseudorange P, determine an approximate value of the the travel time

then the emission time is

and you can compute the satellite
position at t_{e}.

Then you can improve your emission time using the geometric
distance, with an approximation of your station position *x _{rec}* (1.6)

And

and iterate with t_{e}. However, in order to account for
the non-synchronization of the receiver clock and the reference time scale, you
must now compute an approximation of the receiver clock error

using the broadcast or post-processed satellite
clock error Δt_{sat} and a basic model for the ionosphere (or the ionosphere-free combination for P)
and for the troposphere,
and then restart the procedure with

to get the satellite position in t_{e}_{.}

The satellite position must then be corrected for the fact that the Earth was rotating with an angle α=ωτ during the signal travel time, where ω is the Earth rotation rate. A rotation matrix must therefore be applied to the satellite vector:

**Correction of the
satellite clock :**

The satellite clock is given by either the broadcast parameters, or some reprocessed products. In addition to that correction, one has to add one term containing the relativistic effect associated with the variable satellite velocity along the elliptical orbit:

Finally,
in the observation equation, the left hand side is the observed pseudorange, and
in the right hand side, the following terms are presently known:
the geometric distance corresponding to the a priori station position (**),
the satellite clock from boradcast navigation message or from post-processed
products, to which we must add the relativistic effect (**), and the tropospheric and
ionospheric delays which are derived from a model. All these known quantities
can be removed from the observed pseudorange. When calling Pcor the Pseudorange so-corrected
for the geometric distance computed, the tropospheric and ionospheric
effects, and the satellite clock effect, the corrected observation equation
reads:

In which the four unknowns are the three components of the
position vector, and the receiver clock error. As this corresponds to one
satellite observed at a given epoch, a minimum of four satellites (or
observation equations) are needed to get a solution for these four
unknowns.

# Relative Positioning

The relative positioning is based on the fact that for two nearby stations, some errors on the GPS signals are similar. These common errors are the satellite clock, the satellite orbit errors, the ionospheric and tropospheric delays. If one of two station positions is perfectly known, then the precise position of the second station can be deduced by correcting its measured signals with the errors determined on the signals measured in the first station. In practice, the base receiver located at a known point compares the observed pseudo-range (or code-measurement) of each visible satellite with the theoretical one (knowing the satellite and station positions). It then generates the corrections to all pseudo-ranges corresponding to the differences between the theoretical and the observed ranges. These corrections are transmitted via a radio-signal to the roving receiver for immediate correction of observed pseudo-ranges before computation of the field coordinates, or saved to file at the base station for post-processing of field receiver measurements.

If only code data are used, the method is called **DGPS** (differential GPS), and the
precision on the position is of the order of 2-3 meters.

If both code and carrier phases are used, the method is
called **RTK (Real**-time Kinematic), with a one cm precision level.

# TIME

## What time is it?

Each GNSS system has its own reference time scale. These are used as the reference time scale to determine the atomic clock behavior of the satellites of the constellation. This information is broadcasted by the satellite in real time with the navigation message. Based on atomic oscillators, GPS time is a continuous time scale that does not contain the leap seconds. The estimated difference between system time and UTC is also contained in the navigation message, so that it can be known with an uncertainty level better than one microsecond.

## Time transfer

GPS is also commonly used for
time transfer, i.e. remote atomic clock comparisons, necessary to establish any
atomic time scale based on a set of remote clocks. The principle is to connect
the clocks to GPS receivers, and to observe simultaneously the same
satellites. Knowing the station and
satellite positions, one deduces the synchronization error between each station
and the GNSS reference time scale. The simultaneous observation by two remote
labs allows then, by subtracting the common GNSS reference time scale, to
determine the clock difference between those two labs.

Using the notations
introduced here above for the positioning, we get directly

As the station
position is already known. This gives a precision of 2 nanosecond on the clock
comparison, and an accuracy which depends on the calibration of the equipment, 5 nanosecond in the best cases.

In order to get a better
precision, the PPP technique can be used. A more complete tutorial on time
transfer can be found here.

**Links to other
tutorials **

http://www.trimble.com/gps/index.shtml

http://facility.unavco.org/project_support/campaign/training/jpstutorial.pdf

http://www.u-blox.com/technology/GPS-X-02007.pdf