Lab 5: GPS Receiver Positioning


Due: in class September 30, 2003

Given:

Comments:

Last week you learned how to create the PRN codes for satellites 1-10. This week we will "simulate" what a receiver does in terms of using this information to find our position.

Information:

You have signals from three GPS "satellites." These satellites live in a two-dimensional world and they transmit from these X,Y coordinates (in ambiguous units) :

In order to find your position, you need to find the range between yourself and these three satellites. These ranges define three circles. Unless the circles exactly intersect at one point, you need to pick the position that best fits the observations from the three satellites.

Steps to follow:

  1. Generate 1+ x3 + x10 PRN sequence using your homework. Calculate reference sequences for PRN 1-3.

  2. Load the satellite data for PRN 1-3 given above.

  3. Cross-correlate the given satellite data with your reference PRN 1-3 data. Determine how much the satellite data are shifted with respect to your data (if your shift is negative, just take the absolute value). Each shift equals 0.25, so the range is the number of shifts multiplied by 0.25. What are the ranges for your three satellites?

  4. Plot the three circles that represent the ranges for your three satellites.

  5. Make a close-up plot of where those three circles interest. Instead of plotting circles of radius R, plot two circles: one of radius R+0.1 and the other R-0.1. If the error in the GPS data is 0.1, your position should lie somewhere within these "error bounds." Speculate where the GPS receiver would place the correct position (i.e. use a pen or pencil to put an X in your plot).

  6. Later in this class, you will learn how to solve for the correct position mathematically (Gauss figured this out in the early 19th century). You can also try the "hunt and peck" method, where you search a grid of values, determine a misfit value, and then minimize that misfit. In your case, I would like you to search between X= [0.0:0.01:0.4] and Y=[0.1:0.01:0.5];

  7. Misfit will be defined as: the sum of (observation - model)^2. Your observations are the ranges for each satellite. The model is the straight-line distance between your X,Y search position and the transmitter (satellite) location.

  8. Contour your misfit results for your grid:

    [c,h] = contour(xlocation,ylocation,misfit);
    clabel(c,h);

    Once you have looked at the results, you should set your own contour labels, for example:

    v=[1 2 3 4 5];
    [c,h] = contour(xlocation,ylocation,misfit, v);

    Make the contours small enough that you can see the minima.

  9. Reproduce your earlier close-up plot and put your locdation on it (with an X). Does its location agree with your intution?

Turn in:

Requested answers to questions, plots and code.