初始捕获
程序来源于《软件定义的GPS和伽利略接收机》一书附赠的网上资源,github上可找。
原理部分大多参考《GPS原理与接收机设计》。这个是20年对照网上资料进行验证。最近复盘,因为不想占太多电脑资源,开始用matlab6.5,发现inf等不支持,稍作修改,直到发现xcorr也不支持,干脆使用matlab7.0。
搜索的几个设置参数:
对中心频率偏移+-10KHZ范围,步长500HZ,于是有41次扫描 。
码相位,1023个码,于是1023次。
卫星数量,32。
数据文件:fs38_192-if9_55.bin 美国科罗拉多大学 有符号字符型采样格式8位
采样频率:38.192M
中频:9.55M
数据文件:fs16_3676-if4_1304.bin 意大利 有符号字符型采样格式8位
采样频率:16.3676M
中频:4.1204M
Acquisition
一 载波剥离 peelcarrier
用本地载波的正弦余弦分量剥离第1ms和第2ms输入信号
二 粗捕,用相关峰判断卫星号 Findprn
第一个峰值比上第二个峰值,判断门限
三 精捕载波频率 findcarrFreq
Fft变换
需要子程序:makeCaTable 生成32个CA码 需要generateCAcode
绘图结果如下:
意大利
(. . 03 . . . . . . . . . . . 15 16 . 18 19 . . 22 . . . . . . . . . . )
美国科罗拉多大学
(. . 03 . . 06 . . 09 . . . . . 15 . . 18 . . 21 22 . . . 26 . . . . . . )
下面代码调用的是科罗拉多大学数据。结果存在prerunfs38.mat。
function acqResults = acquisition(longSignal, settings)
%Function performs cold start acquisition on the collected "data". It
%searches for GPS signals of all satellites, which are listed in field
%"acqSatelliteList" in the settings structure. Function saves code phase
%and frequency of the detected signals in the "acqResults" structure.
%
%acqResults = acquisition(longSignal, settings)
%
% Inputs:
% longSignal - 11 ms of raw signal from the front-end
% settings - Receiver settings. Provides information about
% sampling and intermediate frequencies and other
% parameters including the list of the satellites to
% be acquired.
% Out