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

📄 lpf.m

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

function [extract,out] = gps_lpf(in)%, ExtrtPara)
% in: the input data
% ExtrtPara: extract parameter
% out: the the data after filtering out
% extract: extracting from the out by factor 4

N=length(in);
out=zeros(1,N);
extract=zeros(1,floor(N/4));

lpf_Max_indata = max(abs(in))       % Note: the indata absolute value should be less than 64

lpf_b = [1, 0, -4, 0, 16, 26, 16, 0, -4, 0, 1];
out = filter(lpf_b,1,in);

lpf_Max_outdata = max(abs(out))     % Note: the outdata absolute value should be less than 4096

for i=1:floor(N/4)
    extract(i)=out(i*4);    
end

% for i=1:1:9
%    if (in(i)>63) 
%        in(i)=63;
%    elseif (in(i)<-63) 
%        in(i)=-63;
%    end    
% end

% for i=11:N
% 
%    if (in(i)>63) in(i)=63;
%    elseif (in(i)<-63) in(i)=-63;
%    end
%     
%     out(i)=in(i) + in(i-10) - 4*(in(i-2)+in(i-8)) + 16*(in(i-4)+in(i-6)) + 26*in(i-5);
%     
%    if (out(i)>4095) 
%        out(i)=4095;
%    elseif (out(i)<-4095) 
%        out(i)=-4095;
%    end   
% end
% 
% for i=1:floor(N/4)
%     extract(i)=out(i*4);    
% end
% 
% % fid=fopen('LPFData.bin','w');
% % fprintf(fid,'d',extract);

⌨️ 快捷键说明

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