资源简介
关于GPS信号如何产生、如何捕获、如何追踪的所有matlab程序大集合!
代码片段和文件信息
function [correlation codePhase]= acquisition(datachipratesamplingFreqIFsamplesPerCode)
% performs a circular convolution by using the FFT and IFFT .
% Generate CA code
CA_code = makeCaTable(181023chipratesamplingFreq);
CA_double = [CA_code CA_code];
CA = CA_double(10001:48192);
% time vector/矢量,向量
t = (0:(samplesPerCode-1))/samplingFreq;
% In-phase component
I_comp = cos(2*pi*IF.*t).*data;
% quadrature component
Q_comp = sin(2*pi*IF.*t).*data;
% FFT of I and Q comps
X = fft(I_comp + i*Q_comp);
% conj(FFT) of CA code
F_CA = conj(fft(CA));
% Multiply in freq domain and perform IFFT
% then get the squared magnitude
correlation = abs(ifft(X.*F_CA)).^2;
settings.acqThreshold = 2.5;
%% Look for correlation peaks in the results ==============================
% Find the highest peak and compare it to the second highest peak
% The second peak is chosen not closer than 1 chip to the highest peak
%--- Find code phase of the same correlation peak ---------------------
[peakSize codePhase] = max(correlation);
%--- Find 1 chip wide C/A code phase exclude range around the peak ----
samplesPerCodeChip = round(samplingFreq / chiprate);%38
excludeRangeIndex1 = codePhase - samplesPerCodeChip;
excludeRangeIndex2 = codePhase + samplesPerCodeChip;
%--- Correct C/A code phase exclude range if the range includes array
%boundaries
if excludeRangeIndex1 < 2
codePhaseRange = excludeRangeIndex2 : ...
(samplesPerCode + excludeRangeIndex1);
%samplesPerCode是38192,不要与samplesPerCodeChip混了,
%这排除了不可能的码区间
elseif excludeRangeIndex2 >= samplesPerCode
codePhaseRange = (excludeRangeIndex2 - samplesPerCode) : ...
excludeRangeIndex1;
else
codePhaseRange = [1:excludeRangeIndex1 ...
excludeRangeIndex2 : samplesPerCode];
end
%--- Find the second highest correlation peak in the same freq. bin ---
secondPeakSize = max(correlation( codePhaseRange));
%注意这个是codePhaseRange,在相位区间之外
%--- Store result -----------------------------------------------------
acqResults.peakMetric = peakSize/secondPeakSize;
% If the result is above threshold then there is a signal ...
if (peakSize/secondPeakSize) > settings.acqThreshold
fprintf(‘捕获成功‘)
else
fprintf(‘捕获失败‘)
end
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2543 2012-12-22 09:42 tracking_30\acquisition.m
文件 2347 2011-05-23 19:26 tracking_30\cacode.m
文件 503 2011-05-23 19:21 tracking_30\calcLoopCoef.m
文件 1219 2013-03-25 10:30 tracking_30\main.m
文件 1805 2012-12-22 20:14 tracking_30\makeCaTable.m
文件 6804 2011-05-24 09:36 tracking_30\test.m
文件 6787 2011-05-31 15:53 tracking_30\tracking.m
目录 0 2018-11-13 22:30 tracking_30
----------- --------- ---------- ----- ----
22008 8
相关资源
- matlab版本的红外目标跟踪代码
- GPS/INS组合导航Matlab仿真源码包含实验
- 目标跟踪常速度CV及常加速度CA模型程
- kalman运动目标跟踪
- matlab 音调跟踪Pitch Tracking
- GPS载波相位平滑伪距
- 基于视频图像的车辆检测与跟踪
- GPS位置解算MATLAB仿真
- matlab视日轨迹跟踪算法仿真程序
- 北斗/GPS卫星轨道动态仿真
- 卡尔曼滤波用于自由落体运动目标跟
- 基于Matlab读取标准RINEX格式的GPS星历数
- 3.19 基于Kalman滤波的目标跟踪.rar
- 随机集目标跟踪开发包
- camshift运动目标跟踪(matlab)
- 直序扩频信号 基于FFT频率并行捕获代
- INS/GPS matlab仿真程序
- 基于MeanShift的目标跟踪算法
- matlab实现的meanshift视频目标跟踪程序
- GPS网平差matlab程序
- kalman滤波器VD、CA、CV算法实现目标跟
- 用matlab实现的meanshift跟踪算法
- 模糊PID轨迹跟踪
- GPS软件接收机MATLAB代码
- 轨迹跟踪---船舶航迹控制matlab程序
- 卡尔曼滤波在雷达目标跟踪中的应用
- 基于卡尔曼滤波的视频人脸跟踪MATL
- MATLAB 软件最大功率跟踪
- 关于GPS的matlab程序
- 边界跟踪算法 输入是一幅图像,输出
评论
共有 条评论