Global Positioning System Reference
In-Depth Information
10. Compute the cross-correlation function between PRN1 and PRN2, and no-
tice the maximum and minimum values.
Plot the resulting correlation function.
11. Load the M -file unknown_prn.mat , and examine which of the 32 GPS
satellites transmitted this code.
Hint: Use correlation! Determine the code phase (code phase is the location of
the beginning of the PRN code in a sequence) of the unknown code.
12. Create an M -function that generates a GPS C/A code. The function should
have the PRN as input and should return the 1023-long sequence. The code gen-
erator should be based on the block diagram in Figure 2.5. Compare the results to
the codes in Problems 9 and 10.
Hint: Use the following procedure:
- Select the G2 code phase selectors S1 and S2 based on the input PRN and
the code phase selector column in Table 2.3.
- Initialize G1 and G2 registers (set all values to 1).
- Make a loop that runs until the registers have changed state to their initial
value (all ones):
- generate XOR output from G1;
- generate XOR output from G2;
- create the output value of the generator;
- shift the values of the registers;
- change all values to
1's and 1's.
13. Write an M -script that generates sine and cosine carriers. Generate two 1 ms
sequences with
- sampling frequency f s =
10 MHz,
- carrier frequency f c =
1
.
2MHz.
Plot the first 50 samples of the sequences and notice the discrete-time signals.
14. Make a serial search algorithm based on the block diagram in Figure 6.1.
Use the M -file data.mat , which is real GPS data sampled at a frequency of
38
548
MHz. Use the sampled C/A codes for satellites 1, 3, and 6 from the M -files
gold1.mat , gold3.mat ,and gold6.mat .These M -files each contain a 1023
.
192 MHz. The signal is downconverted to a nominal carrier frequency of 9
.
×
38,192 array corresponding to 1023 different versions of the C/A code with differ-
ent code phases each of them with a length of 38,192 corresponding to the length
of a complete code (1 ms with a sampling frequency of 38.192 MHz). Let the
algorithm search for satellites 1, 3, and 6. Plot the result using the surf function.
Search WWH ::




Custom Search