CA code for GPS PRN-1
14 views (last 30 days)
vimal kumar chawda on 24 Nov 2019
1-Does anyone know how to generate the CA code for GPS
ca_1(i,:)=[x1 x2 x3 x4 x5 x6 x7 x8 x9 x10];
I want to know how to shift the first value to right side if we have 10 value in the one row. So new data is entering at 1st place is sum of the 3rd and 10th place then convert it into binary form which is new value at 1st position. Hence we have to do till 1023 times.
One can see the video to know more what we have to do in the exercise.
Kaashyap Pappu on 27 Nov 2019
Edited: Kaashyap Pappu on 14 Jan 2020
You can use the comm.PNSequence object to generate the gold code for both generators. For the second generator, you will have to set the mask property to the appropriate phase delay polynomial, and number of bits out as 1023.
chips = 1023;
genG1 = [10 7 0]; % 1 + x^3 + x^10
initVector =[1 1 1 1 1 1 1 1 1 1];
generator = comm.PNSequence('Polynomial',genG1,...
Generate similarly for generator G2 using the phase delay polynomial as the mask, add both sequences using Modulo-2 addition using xor and you will have your sequence.
Hope this helps!