-
Notifications
You must be signed in to change notification settings - Fork 46
/
init.m
executable file
·77 lines (67 loc) · 3.16 KB
/
init.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
%--------------------------------------------------------------------------
% SoftGNSS v3.0
%
% Copyright (C) Darius Plausinaitis and Dennis M. Akos
% Written by Darius Plausinaitis and Dennis M. Akos
%--------------------------------------------------------------------------
%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.
%--------------------------------------------------------------------------
%
%Script initializes settings and environment of the software receiver.
%Then the processing is started.
%--------------------------------------------------------------------------
% CVS record:
% $Id: init.m,v 1.14.2.21 2006/08/22 13:46:00 dpl Exp $
%% Clean up the environment first =========================================
clear; close all; clc;
format ('compact');
format ('long', 'g');
%--- Include folders with functions ---------------------------------------
addpath include % The software receiver functions
addpath geoFunctions % Position calculation related functions
%% Print startup ==========================================================
fprintf(['\n',...
'Welcome to: softGNSS\n\n', ...
'An open source GNSS SDR software project initiated by:\n\n', ...
' Danish GPS Center/Aalborg University\n\n', ...
'The code was improved by GNSS Laboratory/University of Colorado.\n\n',...
'The software receiver softGNSS comes with ABSOLUTELY NO WARRANTY;\n',...
'for details please read license details in the file license.txt. This\n',...
'is free software, and you are welcome to redistribute it under\n',...
'the terms described in the license.\n\n']);
fprintf(' -------------------------------\n\n');
%% Initialize constants, settings =========================================
settings = initSettings();
%% Generate plot of raw data and ask if ready to start processing =========
try
fprintf('Probing data (%s)...\n', settings.fileName)
probeData(settings);
catch
% There was an error, print it and exit
errStruct = lasterror;
disp(errStruct.message);
disp(' (run setSettings or change settings in "initSettings.m" to reconfigure)')
return;
end
disp(' Raw IF data plotted ')
disp(' (run setSettings or change settings in "initSettings.m" to reconfigure)')
disp(' ');
gnssStart = input('Enter "1" to initiate GNSS processing or "0" to exit : ');
if (gnssStart == 1)
disp(' ');
%start things rolling...
postProcessing
end