G=CACODE(SV,FS)
G is a matrix with 1023*FS columns with a row for each PRN desired.
SV is a vector containing PRN numbers to be generated, from 1 to 37.
FS is the number of samples per chip desired in the code sequence. (Default=1).
Dan Boschen (2021). GPS C/A Code Generator (https://www.mathworks.com/matlabcentral/fileexchange/14670-gps-c-a-code-generator), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.
Hello
1-How one can get if we want to shift sv1= 345 chip , sv2= 23 chip and sv3= 795 chip then after that we want to generate the CA code for the GPS?
sv1=6
sv2=16
sv3=26
just provide me some hint?
I have change the first line of the code but it is not resulting the answer.
like i need for prn6 prn16 prn 26
so i have change it to
g=cacode([6 12]), in place of g=cacode(sv,fs), may i know sir what went wrong ?
For example to generate the C/A codes for PRN 6 and PRN 12 use:
% g=cacode([6 12]),
% and to generate the C/A codes for PRN 6 and PRN 12 at 5 MHz use
% g=cacode([6 12],5/1.023)
I have the same:
Error in cacode (line 48)
if (max(sv)>37) || (min(sv)<1) || (min(size(sv))~=1)
Can you help me?
I have this:
Error in cacode (line 48)
if (max(sv)>37) || (min(sv)<1) || (min(size(sv))~=1)
Can you help me?
Thank you Dan!
Its awesome man :) Thank you,great work ;)
ok
It is really helpful
Good job,
thanks for the leg up on learning about GPS
I think this is a wonderful function. I did encounter an column index error on line 116, and I think it's caused by floating point error when the ceil(cnt) is performed and ceil is ~ L. I was able to correct the problem with the following code:
if ceil(cnt) > L
gfs(:,index)=g(:,L);
else
gfs(:,index)=g(:,ceil(cnt));
end
Thanks for coding up the C/A algorithm.
you have done a good job!
without think about time clock,use FPGA to produce cacode maybe better.what do you think,Dan Boschen?
I tried to run the code in matlab but I got the following error
Error in ==> cacode at 36
if (max(sv)>37) || (min(sv)<1) || (min(size(sv))~=1)
Great programm !