-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathinitSettings.m
158 lines (132 loc) · 6.09 KB
/
initSettings.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
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".
%
%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.31 2006/08/18 11:41:57 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
settings.msToProcess = 240000; %[ms]
% Number of channels to be used for signal processing
settings.numberOfChannels = 10;
% 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. For Real sample files it skips the number of bytes as indicated
% here. For I/Q files it skips twice the number of bytes as indicated here
% to consider both I and Q samples
settings.skipNumberOfSamples = 0*2.5e6;
%% 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 = ...
'C:\Sara\School\ASEN-6080StatOD2\Project1\inputs\2010Apr19_BoulderCanyonWest_bandpass2MHz.sim';
% Data type used to store one sample
settings.dataType = 'schar';
% File Types
%1 - 8 bit real samples S0,S1,S2,...
%2 - 8 bit I/Q samples I0,Q0,I1,Q1,I2,Q2,...
settings.fileType = 2;
% Intermediate, sampling and code frequencies
settings.IF = 0e6;%-1e6;%10; %[Hz]
settings.samplingFreq = 2.5e6;%5e6;%2.048e6; %[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
settings.skipAcquisition = 1;
% List of satellites to look for. Some satellites can be excluded to speed
% up acquisition
settings.acqSatelliteList = [1:32];%[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 = 1.75;
% No. of code periods for coherent integration (multiple of 2)
settings.acquisition.cohCodePeriods=2;%10;%
% No. of non-coherent summations
settings.acquisition.nonCohSums=4;
%% Tracking loops settings ================================================
settings.enableFastTracking = 0;
% 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 = 25; %[Hz]
settings.fllDampingRatio = 0.7;
settings.fllNoiseBandwidth = 10; %[Hz]
%% Navigation solution settings ===========================================
% Rate for calculating pseudorange and position
settings.navSolRate = 10; %[Hz]
% Elevation mask to exclude signals from satellites at low elevation
settings.elevationMask = 10; %[degrees 0 - 90]
% Enable/dissable use of tropospheric correction
settings.useTropCorr = 0; % 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 .
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; % The speed of light, [m/s]
settings.startOffset = 68.802; %[ms] Initial sign. travel time
%% CNo Settings============================================================
% Accumulation interval in Tracking (in Sec)
settings.CNo.accTime=0.001;
% Show C/No during Tracking;1-on;0-off;
settings.CNo.enableVSM=1;
% Accumulation interval for computing VSM C/No (in ms)
settings.CNo.VSMinterval=400;
% Accumulation interval for computing PRM C/No (in ms)
settings.CNo.PRM_K=200;
% No. of samples to calculate narrowband power;
% Possible Values for M=[1,2,4,5,10,20];
% K should be an integral multiple of M i.e. K=nM
settings.CNo.PRM_M=20;
% Accumulation interval for computing MOM C/No (in ms)
settings.CNo.MOMinterval=200;
% Enable/disable the C/No plots for all the channels
% 0 - Off ; 1 - On;
settings.CNo.Plot = 1;
%Enable vector tracking when 1, otherwise scalar tracking.
settings.VLLen = 1;