-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathinitSettings.m
116 lines (98 loc) · 4.75 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
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.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
settings.msToProcess = 37000; %[ms]
% Number of channels to be used for signal processing
settings.numberOfChannels = 8;
% 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 = ...
'..\GNSS_signal_records\GPSdata-DiscreteComponents-fs38_192-if9_55.bin';
% Data type used to store one sample
settings.dataType = 'int8';
% Intermediate, sampling and code frequencies
settings.IF = 9.548e6; %[Hz]
settings.samplingFreq = 38.192e6; %[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 = 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 = 25; %[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 .
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