Prelab: Prefit Residuals

Due: November 6

Given:

Note: You previously used a RINEX reader that read all the observations for a given satellite. That was useful for homeworks. You will now use a RINEX reader that reads in all the satellite data for a given epoch. You must call the RINEX reader for each epoch.

Task:

Write MATLAB code to compute the prefit residual for PRN 24 for 600 epochs (sound familiar?).

Prefit residual is defined as :

prefit = ionosphere corrected pseudorange data - geometric range + satellite clock correction - troposphere correction

Your code should follow these steps:

  1. Read the header and find the nominal receiver location.
  2. Read the navigation orbit information (file #1).
  3. Read the navigation clock information (file #1).
  4. Set up a for loop for epochs, i.e.

    for epoch=1:600

       read the C1 and P2 observations; convert to ionosphere free
       find the satellite coordinates (use new code)
       find the geometric range
       find the elevation angle
       find the troposphere correction
       find the satellite clock correction
       compute the prefit residual.

    end

  5. plot the prefit residuals

Discussion: What does this plot remind you of? Go ahead and subtract the error that you think is causing this (and make another plot). Have we gotten rid of the sinusoidal nature of the last plot we did in GPS Errors Lab 2? Repeat all the steps above using navigation clock/orbit file #2. How do your prefit residuals change? Speculate as to which orbit file is more accurate for PRN 24 on this day (for the hours observed at TMGO).

Turn in: code, plots and printout of your first 10 prefit residuals to an accuracy of 1 mm (so I can check your code).