资源简介
gps信号捕获程序,matlab仿真FFT+PMF
代码片段和文件信息
samplesPerCode = round(settings.samplingFreq / ...
(settings.codeFreqBasis / settings.codeLength));
% Create two 1msec vectors of data to correlate with and one with zero DC
signal1 = longSignal(1 : samplesPerCode);
signal2 = longSignal(samplesPerCode+1 : 2*samplesPerCode);
% index=ceil(samplesPerCode*(1 : 40920)/40920);
signal0DC = longSignal - mean(longSignal);
% Find sampling period
ts = 1 / settings.samplingFreq;
% Find phase points of the local carrier wave
phasePoints = (0 : (samplesPerCode-1)) * 2 * pi * ts;
% Number of the frequency bins for the given acquisition band (500Hz steps)
numberOfFrqBins = round(settings.acqSearchBand * 2) + 1;
% Generate all C/A codes and sample them according to the sampling freq.
%--- Initialize arrays to speed up the code -------------------------------
% Search results of all frequency bins and code shifts (for one satellite)
results = zeros(numberOfFrqBins 2046);
% Carrier frequencies of the frequency bins
frqBins = zeros(1 numberOfFrqBins);
%--- Initialize acqResults ------------------------------------------------
% Carrier frequencies of detected signals
acqResults.carrFreq = zeros(1 32);
% C/A code phases of detected signals
acqResults.codePhase = zeros(1 32);
% Correlation peak ratios of the detected signals
acqResults.peakMetric = zeros(1 32);
IQ1_add=zeros(11023*2);
IQ2_add=zeros(11023*2);
fprintf(‘(‘);
% Perform search for all listed PRN numbers ...
for PRN = settings.acqSatelliteList
%% Correlate signals ======================================================
%--- Perform DFT of C/A code ------------------------------------------
caCodes=generateCAcode(PRN);
caCodes1=kron(caCodesones(12));
% caCodes2=[caCodes1 0 0];
caCodeFreqDom = conj(fft(caCodes1));
%--- Make the correlation for whole frequency band (for all freq. bins)
for frqBinIndex = 1:numberOfFrqBins
%--- Generate carrier wave frequency grid (0.5kHz step) -----------
frqBins(frqBinIndex) = settings.IF - ...
(settings.acqSearchBand/2) * 1000 + ...
0.5e3 * (frqBinIndex - 1);
%--- Generate local sine and cosine -------------------------------
sinCarr = sin(frqBins(frqBinIndex) * phasePoints);
cosCarr = cos(frqBins(frqBinIndex) * phasePoints);
%--- “Remove carrier“ from the signal -----------------------------
I1 = sinCarr .* signal1;
Q1 = cosCarr .* signal1;
I2 = sinCarr .* signal2;
Q2 = cosCarr .* signal2;
IQ1=I1 + j*Q1;
IQ2=I2 + j*Q2;
% IQ11=IQ1(:index);
% IQ22=IQ2(:index);
for i=1:1023*2
IQ1_add(i)=sum(IQ1((i-1)*8+1:8*i));
IQ2_add(i)=sum(IQ2((i-1)*8+1:8*i));
end
%--- Convert the baseband signal to frequency domain --------------
- 上一篇:电压型逆变器双闭环仿真
- 下一篇:空气参数计算器
相关资源
- 改进八点算法求基础矩阵,再求本质
- Matlab实现快速傅里叶变换FFT
- 基于神经网络的手写字母识别算法M
- 面阵相控阵天线方向图仿真
- 图像模糊C均值聚类分割matlab代码
- 使用matlab实现遗传算法,选择,交叉
- 基于Matlab的QPSK调制解调星座图
- matlab指纹识别指纹匹配
- 用于图像识别的2DPCA算法程序matlab
- match_filter(匹配滤波代码matlab
- 基于matlab的GPS数据读取
- Matlab2016b + VS2017
- Mie散射Matlab源代码
- matlab对矩阵进行LDLT和cholesky分解
- matlab录音与音频处理GUI界面
- Louvain算法Matlab版本
- 爬山算法matlab程序
- magnify matlab用放大局部绘图程序
- 局部加权回归的MATLAB实现机器学习之
- matlab 读取envi标准格式文件
- 《SeDuMi — 基于matlab的优化软件》帮助
- 图像分类matlab代码
- MATLAB 曲面拟合
- Matlab Hu矩7个不变矩源码
- NURBS_MATLAB
- matlab_非线性时滞系统的仿真程序
- 卷积码仿真程序matlab仿真,得到误码
- SCMA调制解调matlab仿真代码
- PID控制器与状态反馈控制器MATLAB教学
- MATLAB实现人眼定位程序
评论
共有 条评论