您现在的位置:首页 >> 技术文章 >> MATLAB技术 >> 内容

MATLAB代做|FPGA代做|--GPS相关检测源码程序

时间:2021/2/11 11:33:47 点击:

  核心提示:MATLAB代做|FPGA代做|--GPS相关检测源码程序...
clc;
clear;
close all;



load fdcorr_demo.mat
% loads three variables to the workspace:
%
% prn_code: This is the Gold Code for GPS Satellite SV26
% rx_seg:   This is an actual GPS signal captured on 
%           Saturday 4/7/2007 at 1:35 PM in Chelmsford, MA
%           and downconverted to (nearly) baseband.
%
% Both sequences are sampled at Chip2x (2.046 MHz) and 
% 1023 chips long (one GPS PN sequence length).
%
% frange:   This sets the frequency search range for fdcorr


fs= 2*1.023e6;  % sampling rate  (used to determine freq offset in Hz)


[fdout, freq_axis]= fdcorr(rx_seg,prn_code,frange);

%find delay and frequency offset for SV26:
[temp1, temp2]=max(fdout);   %max in each col of fdout
[maxcorr,freq_index]=max(temp1);  
delay=temp2(freq_index)-1;
chip_delay=(delay)/2;   %in chips since sampled at chip2x
freq= freq_axis(freq_index);   % in radians/sample
freqHz= freq*fs/(2*pi); % in Hz


%run again without a return variable to plot result:
figure(1)
fdcorr(rx_seg,prn_code,frange);



%correct course frequency offset:
rotation=[1:length(rx_seg)]'*freq;
rx0= rx_seg.*exp(-j.*rotation);

%align code with signal
codeshift=circshift(prn_code,-delay);

%correlation at aligned frequency and delay:
svcorr= abs(rx0'*codeshift);

%plot aligned result:

figure(2)
fdcorr(rx0,codeshift,frange);






联系:highspeedlogic

QQ :1224848052

微信:HuangL1121

邮箱:1224848052@qq.com

网站:http://www.mat7lab.com/

网站:http://www.hslogic.com/

微信扫一扫:

作者:GPS相关检测源 来源:GPS相关检测源
  • 您是如何找到本站的?
  • 百度搜索
  • Google搜索
  • 查阅资料过程中
  • 论坛发现
  • 百度贴吧发现
  • 朋友介绍
本站最新成功开发工程项目案例
相关文章
  • 没有相关文章
相关评论
发表我的评论
  • 大名:
  • 内容:
  • matlab代做|matlab专业代做|matlab淘宝代做|FPGA项目合作(www.hslogic.com) © 2023 版权所有 All Rights Reserved.
  • Email:highspeed_logic@163.com 站长QQ: 1224848052

    专业代做/代写/承接、MATLAB、SIMULINK、FPGA项目、博士/硕士/本科课题、Coursework、Eassy、Assignment