Introduction

GPS background
Space segment
Control segment
User segment

Channel States
Acquisition
Confirmation
Pull-in
Tracking

Navigation fix
Tics
Position
Velocity
Time

Before you attempt to get into the level of detail of this project you should know a lot more about GPS than I can provide here.  A number of good websites are available, links are provided here

GPS works by making one way range measurements from the receiver to the satellites.  In order to arrive at a position fix we must know precisely where the satellites are and how far we are from them.  These data are available to the receiver by reading the data message from each satellite which provides a precise description of the satellite orbit and timing information which is used to determine when the signal was transmitted by the satellite. 

GPS background

GPS is a military system run by the United States Air Force.  GPS consists of three "segments", the user segment (receiver), the space segment (the satellites) and the control segment (ground control).

Space segment:  The space segment consists of a constellation of 24(or more) satellites in medium earth orbit.  Each satellite transmits on 2 frequencies in the L band (L1=1575.42 MHz and L2=1227.6 MHz).  The radio signal is transmitted with right hand circular polarization. Currently only the L1 C/A (coarse acquisition) signal is available to civilians.  There are other signals transmitted for the military but I will confine this discussion to the civilian signal.  Each satellite transmits a unique CDMA (Code Division Multiple Access) code on these frequencies.  The C/A CDMA signal is a PRN (Pseudo Random Noise) sequence of 1023 "chips" which are BPSK (Bi-Phase Shift Key) transmitted at a rate of 1.023 MHz.  Thus the sequence repeats once a millisecond.  On top of this the signal is modulated with a 50 Hz data message which provides precise timing information and orbital parameters.  In order to keep very precise time each satellite carries a number of atomic clocks that drift off slowly enough that they only need to be calibrated about once each day.

Control Segment:  The satellites must be uploaded with their orbital and timing information as well as be monitored and given commands to control the use of backup systems etc.  It consists of a number of monitor stations where range measurements are made to each of the satellites and used to produce the precise orbital parameters and timing information.  In addition a number of ground antennas are used to communicate with the satellites from the Air Force GPS control center in Colorado Springs, Colorado.

User Segment:  Since the receiver knows which sequence is assigned to each satellite it knows what satellite the data is coming from.  The receiver creates a copy of the sequence and correlates or integrates the received signal multiplied by this copy over a period of time (in our case 1 ms).  The particular sequence transmitted by each satellite has been chosen to reduce the chance that a receiver will track a satellite transmitting a different PRN sequence.  For more detail on correlators see the Mitel chipset documentation or some of the other references

Channel States

Receivers typically work with "states" that represent what it is trying to do with a channel in the receiver.  Each channel (in this case 12) is capable of handling 1 satellite.  The receiver must first search for the signal, and then once it is found transition to tracking the signal.  In my scheme the receiver has 4 states.

State 1 is the acquisition state.  It does the code and frequency (doppler) search to find a high correlation peak.  If a peak in either the prompt or delay correlator is above threshold it switches to state 2.

State 2 is the confirmation state.  The confirmation state stops the search and dwells at the code and doppler where the high correlation peak was found to confirm the presence of the signal in order to reduce the false alarm rate.   If n of m samples (e.g. 8 of 10) are above threshold it switches to state 3.

State 3 is the pull-in state.  The signal has been confirmed but the frequency may be up to ~500 Hz off.  The pull-in state attempts to start tracking the signal in order to pull the frequency in close enough that the carrier phase can be tracked.  This state is enabled for about 1000ms, during the last part of this state the C/No and phase error is measured and it attempts to synchronize on the edge of a data bit.  If it confirms carrier and code tracking it switches to state 4.

State 4 is the normal tracking state.  The tracking loops integrate over a data bit (20 ms) to track code and phase.  The data message is recorded and the time synchronized to the TOW (time of week) of the data message.

More detail is available in receiver operation.

Navigation Fix

Tics  Calculating a navigation fix begins with a "tic".  The tic is a timer that is independent of the channels.  It is used to fix a common time for a measurement.  It is programmable but is generally set to 99.9999 ms in this chipset.  Since the reception time is fixed all we need to do is determine when the signal from each satellite was transmitted to determine a pseudo-range to the satellite (range to the satellite without knowing the time offset of the receiver).  The tic latches the state of the code and carrier loops and millisecond and data bit counters so that we can determine precisely when the signal was transmitted.

Position

Knowing when the signal was transmitted allows us to use the broadcast ephemeris data to determine the precise location of the satellite when the signal was transmitted.  The software uses an iterative approach to compute this function:

(HtGH)-1HGdr = dx

H  = the cosine direction matrix in local level axes

G  = the pseudorange weighting matrix.

dr  =  the difference between the pseudorange and the computed range

dx  =  the correction to the receiver position vector

 

More detail is available in receiver operation.

Velocity

Receivers have two ways that velocity can be computed.  One way is to use doppler shift data or frequency from the carrier loop.  The second way is to use carrier phase cycles to determine how many cycles have occurred between tics.  This software uses doppler shift data.  Since we have already computed the receiver position the equation is nearly linear.

HtGH)-1H G df = v

H  = the cosine direction matrix in local level axes

G  = the pseudorange weighting matrix.

df  =  the difference between measured doppler frequency and satellite velocity

v   =  the receiver velocity vector

 

Instead of time offset in the fourth dimension as we get when solving for receiver position we get receiver clock frequency offset.  This data is later used to decrease our doppler search range when acquiring new satellites. 

More detail is available in receiver operation.