?? acquisitionconvolution.m
字號:
function [codephase,frequency] = acquisitionConvolution(svnum)% Performs acquisition on collected data% Searches for the satellite with number svnum% Returns the code phase and the coarse frequency of the signal% ***** initial conditions *****load data.matx=double(data');fs=11.999e6; % sampling freqts=1/fs; % sampling timen=fs/1000; % data pt in l msnn=[0:n-1]; % total no. of ptsfc0=3.563e6; % center freq without Doppler% ***** Reads code with 1024 different phasesfilename=sprintf('gold%i.mat',svnum);load(filename);code=double(code(1,:));% ***** DFT of C/A codecodefreq = conj(fft(code));for i=1:41 fc(i) = fc0 + 0.0005e6*(i-21); expfreq=exp(j*2*pi*fc(i)*ts*nn); sine= imag(expfreq); % generate local sine cosine= real(expfreq); % generate local cosine I = sine.*x; Q = cosine.*x; IQfreq = fft(I+j*Q); convcodeIQ = IQfreq .* codefreq; result(i,:) = abs(ifft(convcodeIQ)).^2;end[peak codephase]=max(max(result));[peak frequency]=max(max(result'));frequency = fc(frequency);codephaseChips = round(1023 - (codephase/11999)*1023)gold_rate = 1.023e6; % Gold code clock rate in Hzts=1/fs;tc=1/gold_rate;b=[1:n];c=ceil((ts*b)/tc);figure(1)x_axis=c;y_axis=fc/1e6;s=surf(x_axis,y_axis,result);set(s,'EdgeColor','none','Facecolor','interp');axis([min(x_axis) max(x_axis) min(y_axis) max(y_axis) min(min(result)) max(max(result))]);caxis([0 max(max(result))]);xlabel('Code Phase [chips]');ylabel('Frequency [MHz]');zlabel('Magnitude');text=sprintf('SVN %i',svnum);title(text);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -