资源简介
高灵敏度GPS程序.rar
代码片段和文件信息
% %程序捕获代码部分
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
- 上一篇:mycp 实现文件拷贝
- 下一篇:基于FLL和PLL的载波跟踪技术研究
相关资源
- PID_AutoTune_v0.rar
- vspd7.2.308.zip
- 价值2k的H漫画小说系统
- Pythonamp;课堂amp;笔记(高淇amp;400;集第
- ddos压力测试工具99657
- UML建模大全
- 开源1A锂电池充电板TP4056原理图+PCB
- m1卡 ic卡可选择扇区初始化加密软件
- TSCC.exe
- FTP课程设计(服务端+客户端)
- 计算机图形学 边填充算法实现代码
- 电力系统潮流计算程序集合
- oracle数据迁移项目实施方案
- Web Api 通过文件流 文件到本地
- Visio图标-最新最全的网络通信图标库
- Spire API文档
- OpenGL参考手册
- Python中Numpy库最新教程
- SPD博士V5.3.exe
- 直流无刷电机方波驱动 stm32 例程代码
- layui后台管理模板
- 仿知乎界面小程序源代码
- 云平台-阿里云详细介绍
- photoshop经典1000例
- scratch垃圾分类源码(最终版本).sb
- IAR ARM 7.8破解
- TI CCS V5.4 安装步骤及破解文件
- 松下plc FP-XH的驱动
- 局域网硬件信息收集工具
- 加快Windows XP操作系统开机速度
评论
共有 条评论