⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 localcarriercodegen.m

📁 Galileo BOC 码产生捕获相关仿真结果
💻 M
字号:

function [LocalCarrierCode,LastChipPhase,LastCarrierPhase]=LocalCarrierCodeGen(svnum,length,fc,Chipphase,Carrierphase)

% svnum: the PRN number;
% length: the number of points that will be generated,reference fs as the
%           sample frq;
% fc; the carrier's center frq;
% Chipphase: the c/a code's beginning phase, united by half of the chip;
% Carrierphase: the carrier's beginning phase, united by 2*pi;

fs=4.8e+6;
Rc=1.023e+6;
Amplitue=2; 
ChipsPerCycle=1023;

GoldCode=CACodeGen(svnum);

code_index=mod(floor([0:length-1]*Rc/fs+Chipphase),ChipsPerCycle)+1;
localcode=GoldCode(code_index);
LastChipPhase=mod( floor( length * Rc / fs + Chipphase ),ChipsPerCycle);

carrier_index=mod( Carrierphase + [0:length-1]*fc/fs, 1 );
LastCarrierPhase=mod( Carrierphase + length*fc/fs,1 );
localcarrier= Amplitue * cos(2*pi* carrier_index );

LocalCarrierCode = localcode .* localcarrier;
partition = linspace(-Amplitue, +Amplitue, 6 );
codebook=[-3:3];
[index,LocalCarrierCode] = quantiz(LocalCarrierCode,partition,codebook);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -