资源简介
高灵敏度GPS接收机MATLAB仿真,含捕获与跟踪,解调,非常具有参考价值
代码片段和文件信息
% %程序捕获代码部分
function acquisitionAll(x)
% Performs a cold start acquisition on the collected data x
% Searches through all satellites
% Returns the code phase and the coarse frequency of the signal
% ***** initial conditions *****
global gold % Gold codes
global settings % The Settings of the recevier
global channel % The Settings of the channels
fs=11.999e6; % sampling freq
ts=1/fs; % sampling time
n=fs/1000; % data pt in l ms
nn=[0:n-1]; % total no. of pts
if_freq=3563000;% Intermediate frequency;
%if_freq=0;% Intermediate frequency;
% for svnum=1:32
for svnum=2
fprintf(‘.‘);
frequency = 0;
codephase = 0;
% ***** DFT of C/A code *****
codefreq = conj(fft(gold(svnum:)));
xxxx=zeros(4111999);
for mmmmm=1:100 %非相干100次
for i=1:41
fc(i) = 3.553e6 + 0.0005e6*(i-1);
%for i=1:21 % for if_freq=0
%fc(i) = 0+500*(i-1);
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;
xxxx(i:)=xxxx(i:)+result(i:);
end
end
figure(1)
mesh(result)
figure(2)
mesh(xxxx)
[peak codephase]=max(max(result));
[peak frequency]=max(max(result‘));
result_noise=result;
result_noise(:codephase)=[];
result_noise(frequency:)=[];
meanValue = mean(mean(result_noise));
meanPeak = peak/meanValue
if meanPeak>15.9
% ***** Search for fine resolution frequency *****
ncodephase = n - codephase;
code = [gold(svnumncodephase:n) gold(svnum1:ncodephase-1)];
xcarrier = x‘.*code;
for i=1:11
fc_fine(i) = fc(frequency) + (i-6)*100;
if fc_fine(i) < 0
fc_fine(i) = 0;
end
expfreq=exp(j*2*pi*fc_fine(i)*ts*nn);
sine= imag(expfreq); % generate local sine
cosine= real(expfreq); % generate local cosine
I = sine.*xcarrier;
Q = cosine.*xcarrier;
result_fine(i:)=sum(I‘).^2+sum(Q‘).^2;
end
%[peak codephase1]=max(max(result_fine));
%[peak frequency]=max(max(result_fine‘));
%result_noise=result_fine;
%result_noise(:codephase1)=[];
%result_noise(frequency:)=[];
%meanValue = mean(mean(result_noise));
%meanPeak = peak/meanValue;
[peak frequency]=max(result_fine‘);
result_noise=result_fine;
result_noise(frequency)=[];
%meanValue = mean(result_noise);
%meanPeak = peak/meanValue;
frequency = fc_fine(frequency);
% ***** Setup a channel for the satellite *****
channel(settings.nextChannel).SVN=svnum;
channel(settings.nextChannel).AcqFreq=frequency;
channel(settings.nextChannel).Doppler=frequency-if_freq;
channel(settings.nextChannel).AcqCAPhase=mod(ncodephasen); % phase means end phase of gold code
channel(settings.nextChannel).Status=‘P‘;
settings.nextChannel=settings.nextChannel+1;
end
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2851 2010-11-05 20:54 gps_lunwen\acquisitionAll.m
文件 314 2010-11-02 19:12 gps_lunwen\calculatePLLCoef.m
文件 1321 2010-11-02 19:15 gps_lunwen\decodeNavigation.m
文件 1040 2010-11-02 21:38 gps_lunwen\GPS_shixiong.m
文件 532 2010-11-02 23:03 gps_lunwen\init.asv
文件 532 2010-11-02 23:04 gps_lunwen\init.m
文件 668 2010-11-02 19:16 gps_lunwen\ShowChannelStatus.m
文件 4664 2010-11-02 19:15 gps_lunwen\tracking.m
目录 0 2010-11-06 10:26 gps_lunwen
----------- --------- ---------- ----- ----
11922 9
- 上一篇:基于MATLAB的质点弹道计算与外弹道优化设计
- 下一篇:没有了
相关资源
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
- 通过不同方法进行粗糙集属性约简m
- k近邻算法matlab实现
- matlab识别系统
- 神经网络分类matlab程序
评论
共有 条评论