www.pudn.com > GNSS_SDR.zip > initSettings.m, change:2010-02-05,size:5970b


function settings = initSettings() 
%Functions initializes and saves settings. Settings can be edited inside of 
%the function, updated from the command line or updated using a dedicated 
%GUI - "setSettings".   
%初始化并保存设置。可以直接修改函数修改设置,或者使用GUI界面“setSetting” 
% 
%All settings are described inside function code. 
% 
%settings = initSettings() 
% 
%   Inputs: none 
% 
%   Outputs: 
%       settings     - Receiver settings (a structure).  
 
%-------------------------------------------------------------------------- 
%                           SoftGNSS v3.0 
%  
% Copyright (C) Darius Plausinaitis 
% Written by Darius Plausinaitis 
% 注释翻译:苗剑峰 
%-------------------------------------------------------------------------- 
%This program is free software; you can redistribute it and/or 
%modify it under the terms of the GNU General Public License 
%as published by the Free Software Foundation; either version 2 
%of the License, or (at your option) any later version. 
% 
%This program is distributed in the hope that it will be useful, 
%but WITHOUT ANY WARRANTY; without even the implied warranty of 
%MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
%GNU General Public License for more details. 
% 
%You should have received a copy of the GNU General Public License 
%along with this program; if not, write to the Free Software 
%Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
%USA. 
%程序为开源程序,请在开源协议规定范围内做改动 
%-------------------------------------------------------------------------- 
 
% CVS record: 
% $Id: initSettings.m,v 1.9.2.32 2007/01/29 10:22:23 dpl Exp $ 
 
%% Processing settings 过程设置 ============================================ 
% Number of milliseconds to be processed used 36000 + any transients (see 
% below - in Nav parameters) to ensure nav subframes are provided 
% 仿真时间设置,36000ms以上可以保证定位程序的正常运行 
settings.msToProcess        = 38000;        %[ms] 
 
% Number of channels to be used for signal processing 
% 跟踪通道数 
settings.numberOfChannels   = 20; 
 
 
% Move the starting point of processing. Can be used to start the signal 
% processing at any point in the data record (e.g. for long records). fseek 
% function is used to move the file read point, therefore advance is byte 
% based only.  
% 起始点设定,跳过文件起始字节数 
settings.skipNumberOfBytes     = 0; 
 
%% Raw signal file name and other parameter 中频数据文件名及中频参数========= 
% This is a "default" name of the data file (signal record) to be used in 
% the post-processing mode 
% 默认的文件名 
% settings.fileName           = 'G:\1435.bin'; 
% settings.fileName           = ... 
%    'E:\各类资料\GPS\中频采样\GPS中频数据\GPSdata-DiscreteComponents-fs38_192-if9_55.bin'; 
%settings.fileName           = ... 
%   'E:\各类资料\GPS\中频采样\GPS中频数据\2008-04-28_无遮蔽数据\gnss042201.dat'; 
% settings.fileName           = ... 
%    'E:\各类资料\GPS\中频采样\GPS中频数据\2009-07-23_仿真数据\gps090725.dat'; 
settings.fileName           = ... 
   'D:\各类资料\GPS\中频采样\GPS中频数据\2008-04-28_无遮蔽数据\gnss042201.dat'; 
 
% Data type used to store one sample 
% 每个采样点的数据类型 
settings.dataType           = 'int8'; 
 
% Intermediate, sampling and code frequencies 
% 中频频率、采样率以及码频率 
settings.IF                 = 4.1304e6;      %[Hz] 
settings.samplingFreq       = 16.3676e6;     %[Hz] 
settings.codeFreqBasis      = 1.023e6;      %[Hz] 
 
% Define number of chips in a code period 
% 码长 
settings.codeLength         = 1023; 
 
%% Acquisition settings 捕获设置 =========================================== 
% Skips acquisition in the script postProcessing.m if set to 1 
% 设为1时跳过捕获部分 
settings.skipAcquisition    = 0; 
% List of satellites to look for. Some satellites can be excluded to speed 
% up acquisition 
% 需要搜索的卫星列表 
settings.acqSatelliteList   = 1:32;         %[PRN numbers] 
% Band around IF to search for satellite signal. Depends on max Doppler 
% 中频搜索范围,由多普勒频移范围决定 
settings.acqSearchBand      = 14;           %[kHz] 
% Threshold for the signal presence decision rule 
% 捕获门限 
settings.acqThreshold       = 2.5; 
 
%% Tracking loops settings 跟踪环路设定 ==================================== 
% Code tracking loop parameters 
% 码环参数 
settings.dllDampingRatio         = 0.7; 
settings.dllNoiseBandwidth       = 2;       %[Hz] 
settings.dllCorrelatorSpacing    = 0.5;     %[chips] 
 
% Carrier tracking loop parameters 
% 载波环路参数 
settings.pllDampingRatio         = 0.7; 
settings.pllNoiseBandwidth       = 10;      %[Hz] 
 
%% Navigation solution settings 导航解算设置 =============================== 
 
% Period for calculating pseudoranges and position 
% 伪距以及定位结果输出周期 
settings.navSolPeriod       = 500;          %[ms] 
 
% Elevation mask to exclude signals from satellites at low elevation 
% 低仰角卫星排除门限 
settings.elevationMask      = 10;           %[degrees 0 - 90] 
% Enable/dissable use of tropospheric correction 
% 启用对流层校正 
settings.useTropCorr        = 1;            % 0 - Off 
                                            % 1 - On 
 
% True position of the antenna in UTM system (if known). Otherwise enter 
% all NaN's and mean position will be used as a reference . 
% 天线在用户坐标系下的真实位置,设为NAN则使用平均值为参考 
settings.truePosition.E     = nan; 
settings.truePosition.N     = nan; 
settings.truePosition.U     = nan; 
 
%% Plot settings 绘图设置 ================================================== 
% Enable/disable plotting of the tracking results for each channel 
% 是否绘出跟踪结果 
settings.plotTracking       = 1;            % 0 - Off 
                                            % 1 - On 
 
%% Constants 常量 ========================================================= 
settings.c                  = 299792458;    %[m/s] 光速 
settings.startOffset        = 68.802;       %[ms] 初始电波延时