mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 04:30:33 +00:00
Cleanup of Matlab/Octave code
This commit is contained in:
parent
a2e40eca95
commit
9458fe6e57
@ -1,37 +1,36 @@
|
||||
% /*!
|
||||
% * \file dll_pll_vml_plot_sample.m
|
||||
% * \brief Read GNSS-SDR Tracking dump binary file using the provided
|
||||
% function and plot some internal variables
|
||||
% * \author Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
% * \author Antonio Ramos, 2018. antonio.ramos(at)cttc.es
|
||||
% * -------------------------------------------------------------------------
|
||||
% *
|
||||
% * Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
% *
|
||||
% * GNSS-SDR is a software defined Global Navigation
|
||||
% * Satellite Systems receiver
|
||||
% *
|
||||
% * This file is part of GNSS-SDR.
|
||||
% *
|
||||
% * GNSS-SDR 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 3 of the License, or
|
||||
% * at your option) any later version.
|
||||
% *
|
||||
% * GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
% *
|
||||
% * -------------------------------------------------------------------------
|
||||
% */
|
||||
% Reads GNSS-SDR Tracking dump binary file using the provided
|
||||
% function and plots some internal variables
|
||||
% Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
% Antonio Ramos, 2018. antonio.ramos(at)cttc.es
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
|
||||
close all;
|
||||
clear all;
|
||||
|
||||
if ~exist('dll_pll_veml_read_tracking_dump.m','file')
|
||||
if ~exist('dll_pll_veml_read_tracking_dump.m', 'file')
|
||||
addpath('./libs')
|
||||
end
|
||||
|
||||
@ -50,34 +49,34 @@ end
|
||||
% GNSS-SDR format conversion to MATLAB GPS receiver
|
||||
|
||||
for N=1:1:channels
|
||||
trackResults(N).status = 'T'; %fake track
|
||||
trackResults(N).codeFreq = GNSS_tracking(N).code_freq_hz.';
|
||||
trackResults(N).carrFreq = GNSS_tracking(N).carrier_doppler_hz.';
|
||||
trackResults(N).dllDiscr = GNSS_tracking(N).code_error.';
|
||||
trackResults(N).dllDiscrFilt = GNSS_tracking(N).code_nco.';
|
||||
trackResults(N).pllDiscr = GNSS_tracking(N).carr_error.';
|
||||
trackResults(N).pllDiscrFilt = GNSS_tracking(N).carr_nco.';
|
||||
trackResults(N).status = 'T'; %fake track
|
||||
trackResults(N).codeFreq = GNSS_tracking(N).code_freq_hz.';
|
||||
trackResults(N).carrFreq = GNSS_tracking(N).carrier_doppler_hz.';
|
||||
trackResults(N).dllDiscr = GNSS_tracking(N).code_error.';
|
||||
trackResults(N).dllDiscrFilt = GNSS_tracking(N).code_nco.';
|
||||
trackResults(N).pllDiscr = GNSS_tracking(N).carr_error.';
|
||||
trackResults(N).pllDiscrFilt = GNSS_tracking(N).carr_nco.';
|
||||
|
||||
trackResults(N).I_P = GNSS_tracking(N).P.';
|
||||
trackResults(N).Q_P = zeros(1,length(GNSS_tracking(N).P));
|
||||
trackResults(N).I_P = GNSS_tracking(N).P.';
|
||||
trackResults(N).Q_P = zeros(1,length(GNSS_tracking(N).P));
|
||||
|
||||
trackResults(N).I_VE = GNSS_tracking(N).VE.';
|
||||
trackResults(N).I_E = GNSS_tracking(N).E.';
|
||||
trackResults(N).I_L = GNSS_tracking(N).L.';
|
||||
trackResults(N).I_VL = GNSS_tracking(N).VL.';
|
||||
trackResults(N).Q_VE = zeros(1,length(GNSS_tracking(N).VE));
|
||||
trackResults(N).Q_E = zeros(1,length(GNSS_tracking(N).E));
|
||||
trackResults(N).Q_L = zeros(1,length(GNSS_tracking(N).L));
|
||||
trackResults(N).Q_VL = zeros(1,length(GNSS_tracking(N).VL));
|
||||
trackResults(N).data_I = GNSS_tracking(N).prompt_I.';
|
||||
trackResults(N).data_Q = GNSS_tracking(N).prompt_Q.';
|
||||
trackResults(N).PRN = GNSS_tracking(N).PRN.';
|
||||
trackResults(N).CNo = GNSS_tracking(N).CN0_SNV_dB_Hz.';
|
||||
trackResults(N).I_VE = GNSS_tracking(N).VE.';
|
||||
trackResults(N).I_E = GNSS_tracking(N).E.';
|
||||
trackResults(N).I_L = GNSS_tracking(N).L.';
|
||||
trackResults(N).I_VL = GNSS_tracking(N).VL.';
|
||||
trackResults(N).Q_VE = zeros(1,length(GNSS_tracking(N).VE));
|
||||
trackResults(N).Q_E = zeros(1,length(GNSS_tracking(N).E));
|
||||
trackResults(N).Q_L = zeros(1,length(GNSS_tracking(N).L));
|
||||
trackResults(N).Q_VL = zeros(1,length(GNSS_tracking(N).VL));
|
||||
trackResults(N).data_I = GNSS_tracking(N).prompt_I.';
|
||||
trackResults(N).data_Q = GNSS_tracking(N).prompt_Q.';
|
||||
trackResults(N).PRN = GNSS_tracking(N).PRN.';
|
||||
trackResults(N).CNo = GNSS_tracking(N).CN0_SNV_dB_Hz.';
|
||||
|
||||
% Use original MATLAB tracking plot function
|
||||
settings.numberOfChannels = channels;
|
||||
settings.msToProcess = length(GNSS_tracking(N).E)*coherent_integration_time_ms;
|
||||
plotVEMLTracking(N,trackResults,settings)
|
||||
% Use original MATLAB tracking plot function
|
||||
settings.numberOfChannels = channels;
|
||||
settings.msToProcess = length(GNSS_tracking(N).E) * coherent_integration_time_ms;
|
||||
plotVEMLTracking(N, trackResults, settings)
|
||||
end
|
||||
|
||||
|
||||
|
@ -1,36 +1,35 @@
|
||||
% /*!
|
||||
% * \file galileo_l1_ca_dll_pll_vml_plot_sample.m
|
||||
% * \brief Read GNSS-SDR Tracking dump binary file using the provided
|
||||
% function and plot some internal variables
|
||||
% * \author Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
% * -------------------------------------------------------------------------
|
||||
% *
|
||||
% * Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
||||
% *
|
||||
% * GNSS-SDR is a software defined Global Navigation
|
||||
% * Satellite Systems receiver
|
||||
% *
|
||||
% * This file is part of GNSS-SDR.
|
||||
% *
|
||||
% * GNSS-SDR 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 3 of the License, or
|
||||
% * at your option) any later version.
|
||||
% *
|
||||
% * GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
% *
|
||||
% * -------------------------------------------------------------------------
|
||||
% */
|
||||
% Reads GNSS-SDR Tracking dump binary file using the provided
|
||||
% function and plots some internal variables
|
||||
% Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
|
||||
close all;
|
||||
clear all;
|
||||
|
||||
if ~exist('galileo_e1_dll_pll_veml_read_tracking_dump.m','file')
|
||||
if ~exist('dll_pll_veml_read_tracking_dump.m', 'file')
|
||||
addpath('./libs')
|
||||
end
|
||||
|
||||
@ -42,38 +41,38 @@ path = '/Users/carlesfernandez/git/cttc/build/'; %% CHANGE THIS PATH
|
||||
|
||||
for N=1:1:channels
|
||||
tracking_log_path = [path 'track_ch' num2str(N+first_channel-1) '.dat']; %% CHANGE track_ch BY YOUR dump_filename
|
||||
GNSS_tracking(N)= galileo_e1_dll_pll_veml_read_tracking_dump(tracking_log_path);
|
||||
GNSS_tracking(N) = dll_pll_veml_read_tracking_dump(tracking_log_path);
|
||||
end
|
||||
|
||||
% GNSS-SDR format conversion to MATLAB GPS receiver
|
||||
|
||||
for N=1:1:channels
|
||||
trackResults(N).status = 'T'; %fake track
|
||||
trackResults(N).codeFreq = GNSS_tracking(N).code_freq_hz.';
|
||||
trackResults(N).carrFreq = GNSS_tracking(N).carrier_doppler_hz.';
|
||||
trackResults(N).dllDiscr = GNSS_tracking(N).code_error.';
|
||||
trackResults(N).dllDiscrFilt = GNSS_tracking(N).code_nco.';
|
||||
trackResults(N).pllDiscr = GNSS_tracking(N).carr_error.';
|
||||
trackResults(N).pllDiscrFilt = GNSS_tracking(N).carr_nco.';
|
||||
trackResults(N).status = 'T'; %fake track
|
||||
trackResults(N).codeFreq = GNSS_tracking(N).code_freq_hz.';
|
||||
trackResults(N).carrFreq = GNSS_tracking(N).carrier_doppler_hz.';
|
||||
trackResults(N).dllDiscr = GNSS_tracking(N).code_error.';
|
||||
trackResults(N).dllDiscrFilt = GNSS_tracking(N).code_nco.';
|
||||
trackResults(N).pllDiscr = GNSS_tracking(N).carr_error.';
|
||||
trackResults(N).pllDiscrFilt = GNSS_tracking(N).carr_nco.';
|
||||
|
||||
trackResults(N).I_P = GNSS_tracking(N).prompt_I.';
|
||||
trackResults(N).Q_P = GNSS_tracking(N).prompt_Q.';
|
||||
trackResults(N).I_P = GNSS_tracking(N).prompt_I.';
|
||||
trackResults(N).Q_P = GNSS_tracking(N).prompt_Q.';
|
||||
|
||||
trackResults(N).I_VE = GNSS_tracking(N).VE.';
|
||||
trackResults(N).I_E = GNSS_tracking(N).E.';
|
||||
trackResults(N).I_L = GNSS_tracking(N).L.';
|
||||
trackResults(N).I_VL = GNSS_tracking(N).VL.';
|
||||
trackResults(N).Q_VE = zeros(1,length(GNSS_tracking(N).VE));
|
||||
trackResults(N).Q_E = zeros(1,length(GNSS_tracking(N).E));
|
||||
trackResults(N).Q_L = zeros(1,length(GNSS_tracking(N).L));
|
||||
trackResults(N).Q_VL = zeros(1,length(GNSS_tracking(N).VL));
|
||||
trackResults(N).PRN = GNSS_tracking(N).PRN.';
|
||||
trackResults(N).CNo = GNSS_tracking(N).CN0_SNV_dB_Hz.';
|
||||
trackResults(N).I_VE = GNSS_tracking(N).VE.';
|
||||
trackResults(N).I_E = GNSS_tracking(N).E.';
|
||||
trackResults(N).I_L = GNSS_tracking(N).L.';
|
||||
trackResults(N).I_VL = GNSS_tracking(N).VL.';
|
||||
trackResults(N).Q_VE = zeros(1,length(GNSS_tracking(N).VE));
|
||||
trackResults(N).Q_E = zeros(1,length(GNSS_tracking(N).E));
|
||||
trackResults(N).Q_L = zeros(1,length(GNSS_tracking(N).L));
|
||||
trackResults(N).Q_VL = zeros(1,length(GNSS_tracking(N).VL));
|
||||
trackResults(N).PRN = GNSS_tracking(N).PRN.';
|
||||
trackResults(N).CNo = GNSS_tracking(N).CN0_SNV_dB_Hz.';
|
||||
|
||||
% Use original MATLAB tracking plot function
|
||||
settings.numberOfChannels = channels;
|
||||
settings.msToProcess = length(GNSS_tracking(N).E)*4;
|
||||
plotVEMLTracking(N,trackResults,settings)
|
||||
% Use original MATLAB tracking plot function
|
||||
settings.numberOfChannels = channels;
|
||||
settings.msToProcess = length(GNSS_tracking(N).E)*4;
|
||||
plotVEMLTracking(N, trackResults, settings)
|
||||
end
|
||||
|
||||
|
||||
|
@ -1,33 +1,31 @@
|
||||
% /*!
|
||||
% * \file galileo_e5a_dll_pll_plot_sample.m
|
||||
% * \brief Read GNSS-SDR Tracking dump binary file using the provided
|
||||
% function and plot some internal variables
|
||||
% * \author Javier Arribas, Marc Sales 2014. jarribas(at)cttc.es
|
||||
% marcsales92@gmail.com
|
||||
% * -------------------------------------------------------------------------
|
||||
% *
|
||||
% * Copyright (C) 2010-2014 (see AUTHORS file for a list of contributors)
|
||||
% *
|
||||
% * GNSS-SDR is a software defined Global Navigation
|
||||
% * Satellite Systems receiver
|
||||
% *
|
||||
% * This file is part of GNSS-SDR.
|
||||
% *
|
||||
% * GNSS-SDR 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 3 of the License, or
|
||||
% * at your option) any later version.
|
||||
% *
|
||||
% * GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
% *
|
||||
% * -------------------------------------------------------------------------
|
||||
% */
|
||||
% Reads GNSS-SDR Tracking dump binary file using the provided
|
||||
% function and plots some internal variables
|
||||
% Javier Arribas, Marc Sales 2014. jarribas(at)cttc.es, marcsales92@gmail.com
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
|
||||
close all;
|
||||
clear all;
|
||||
|
||||
@ -44,54 +42,54 @@ path = '/Users/carlesfernandez/git/cttc/build/'; %% CHANGE THIS PATH
|
||||
|
||||
for N=1:1:channels
|
||||
tracking_log_path = [path 'tracking_ch_' num2str(N+first_channel-1) '.dat']; %% CHANGE tracking_ch_ BY YOUR dump_filename
|
||||
GNSS_tracking(N)= gps_l1_ca_dll_pll_read_tracking_dump(tracking_log_path);
|
||||
GNSS_tracking(N) = gps_l1_ca_dll_pll_read_tracking_dump(tracking_log_path);
|
||||
end
|
||||
|
||||
% GNSS-SDR format conversion to MATLAB GPS receiver
|
||||
|
||||
for N=1:1:channels
|
||||
trackResults(N).status = 'T'; %fake track
|
||||
trackResults(N).codeFreq = GNSS_tracking(N).code_freq_hz.';
|
||||
trackResults(N).carrFreq = GNSS_tracking(N).carrier_doppler_hz.';
|
||||
trackResults(N).dllDiscr = GNSS_tracking(N).code_error.';
|
||||
trackResults(N).dllDiscrFilt = GNSS_tracking(N).code_nco.';
|
||||
trackResults(N).pllDiscr = GNSS_tracking(N).carr_error.';
|
||||
trackResults(N).pllDiscrFilt = GNSS_tracking(N).carr_nco.';
|
||||
trackResults(N).status = 'T'; %fake track
|
||||
trackResults(N).codeFreq = GNSS_tracking(N).code_freq_hz.';
|
||||
trackResults(N).carrFreq = GNSS_tracking(N).carrier_doppler_hz.';
|
||||
trackResults(N).dllDiscr = GNSS_tracking(N).code_error.';
|
||||
trackResults(N).dllDiscrFilt = GNSS_tracking(N).code_nco.';
|
||||
trackResults(N).pllDiscr = GNSS_tracking(N).carr_error.';
|
||||
trackResults(N).pllDiscrFilt = GNSS_tracking(N).carr_nco.';
|
||||
|
||||
trackResults(N).I_PN = GNSS_tracking(N).prompt_I.';
|
||||
trackResults(N).Q_PN = GNSS_tracking(N).prompt_Q.';
|
||||
trackResults(N).Q_P = zeros(1,length(GNSS_tracking(N).P));
|
||||
trackResults(N).I_P = GNSS_tracking(N).P.';
|
||||
trackResults(N).I_PN = GNSS_tracking(N).prompt_I.';
|
||||
trackResults(N).Q_PN = GNSS_tracking(N).prompt_Q.';
|
||||
trackResults(N).Q_P = zeros(1,length(GNSS_tracking(N).P));
|
||||
trackResults(N).I_P = GNSS_tracking(N).P.';
|
||||
|
||||
trackResults(N).I_E = GNSS_tracking(N).E.';
|
||||
trackResults(N).I_L = GNSS_tracking(N).L.';
|
||||
trackResults(N).Q_E = zeros(1,length(GNSS_tracking(N).E));
|
||||
trackResults(N).Q_L = zeros(1,length(GNSS_tracking(N).E));
|
||||
trackResults(N).PRN = GNSS_tracking(N).PRN.';
|
||||
trackResults(N).I_E = GNSS_tracking(N).E.';
|
||||
trackResults(N).I_L = GNSS_tracking(N).L.';
|
||||
trackResults(N).Q_E = zeros(1,length(GNSS_tracking(N).E));
|
||||
trackResults(N).Q_L = zeros(1,length(GNSS_tracking(N).E));
|
||||
trackResults(N).PRN = GNSS_tracking(N).PRN.';
|
||||
|
||||
% Use original MATLAB tracking plot function
|
||||
settings.numberOfChannels = channels;
|
||||
settings.msToProcess = length(GNSS_tracking(N).E);
|
||||
plotTrackingE5a(N,trackResults,settings)
|
||||
% Use original MATLAB tracking plot function
|
||||
settings.numberOfChannels = channels;
|
||||
settings.msToProcess = length(GNSS_tracking(N).E);
|
||||
plotTrackingE5a(N, trackResults, settings)
|
||||
end
|
||||
|
||||
for N=1:1:channels
|
||||
% figure;
|
||||
% plot([GNSS_tracking(N).E,GNSS_tracking(N).P,GNSS_tracking(N).L],'-*');
|
||||
% title(['Early, Prompt, and Late correlator absolute value output for channel ' num2str(N)']);
|
||||
% figure;
|
||||
% plot(GNSS_tracking(N).prompt_I,GNSS_tracking(N).prompt_Q,'+');
|
||||
% title(['Navigation constellation plot for channel ' num2str(N)]);
|
||||
% figure;
|
||||
%
|
||||
% plot(GNSS_tracking(N).prompt_Q,'r');
|
||||
% hold on;
|
||||
% plot(GNSS_tracking(N).prompt_I);
|
||||
% title(['Navigation symbols I(red) Q(blue) for channel ' num2str(N)]);
|
||||
%
|
||||
figure;
|
||||
t=0:length(GNSS_tracking(N).carrier_doppler_hz)-1;
|
||||
t=t/1000;
|
||||
plot(t,GNSS_tracking(N).carrier_doppler_hz/1000);
|
||||
xlabel('Time(s)');ylabel('Doppler(KHz)');title(['Doppler frequency channel ' num2str(N)]);
|
||||
% figure;
|
||||
% plot([GNSS_tracking(N).E, GNSS_tracking(N).P, GNSS_tracking(N).L],'-*');
|
||||
% title(['Early, Prompt, and Late correlator absolute value output for channel ' num2str(N)']);
|
||||
% figure;
|
||||
% plot(GNSS_tracking(N).prompt_I, GNSS_tracking(N).prompt_Q, '+');
|
||||
% title(['Navigation constellation plot for channel ' num2str(N)]);
|
||||
% figure;
|
||||
%
|
||||
% plot(GNSS_tracking(N).prompt_Q,'r');
|
||||
% hold on;
|
||||
% plot(GNSS_tracking(N).prompt_I);
|
||||
% title(['Navigation symbols I(red) Q(blue) for channel ' num2str(N)]);
|
||||
%
|
||||
figure;
|
||||
t = 0:length(GNSS_tracking(N).carrier_doppler_hz)-1;
|
||||
t = t/1000;
|
||||
plot(t, GNSS_tracking(N).carrier_doppler_hz / 1000);
|
||||
xlabel('Time(s)'); ylabel('Doppler(KHz)'); title(['Doppler frequency channel ' num2str(N)]);
|
||||
end
|
@ -1,36 +1,35 @@
|
||||
% /*!
|
||||
% * \file glonass_ca_dll_pll_plot_sample.m
|
||||
% * \brief Read GNSS-SDR Tracking dump binary file using the provided
|
||||
% function and plot some internal variables
|
||||
% * \author Damian Miralles, 2017. dmiralles2009(at)gmail.com
|
||||
% * -------------------------------------------------------------------------
|
||||
% *
|
||||
% * Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
||||
% *
|
||||
% * GNSS-SDR is a software defined Global Navigation
|
||||
% * Satellite Systems receiver
|
||||
% *
|
||||
% * This file is part of GNSS-SDR.
|
||||
% *
|
||||
% * GNSS-SDR 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 3 of the License, or
|
||||
% * at your option) any later version.
|
||||
% *
|
||||
% * GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
% *
|
||||
% * -------------------------------------------------------------------------
|
||||
% */
|
||||
% Reads GNSS-SDR Tracking dump binary file using the provided
|
||||
% function and plots some internal variables
|
||||
% Damian Miralles, 2017. dmiralles2009(at)gmail.com
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
|
||||
close all;
|
||||
clear all;
|
||||
|
||||
if ~exist('glonass_ca_dll_pll_read_tracking_dump.m','file')
|
||||
if ~exist('dll_pll_veml_read_tracking_dump.m', 'file')
|
||||
addpath('./libs')
|
||||
end
|
||||
|
||||
@ -43,32 +42,32 @@ path = '/archive/'; %% CHANGE THIS PATH
|
||||
|
||||
for N=1:1:channels
|
||||
tracking_log_path = [path 'glo_tracking_ch_' num2str(N+first_channel-1) '.dat']; %% CHANGE epl_tracking_ch_ BY YOUR dump_filename
|
||||
GNSS_tracking(N)= glonass_ca_dll_pll_read_tracking_dump(tracking_log_path);
|
||||
GNSS_tracking(N) = dll_pll_veml_read_tracking_dump(tracking_log_path);
|
||||
end
|
||||
|
||||
% GNSS-SDR format conversion to MATLAB GPS receiver
|
||||
|
||||
for N=1:1:channels
|
||||
trackResults(N).status = 'T'; %fake track
|
||||
trackResults(N).codeFreq = GNSS_tracking(N).code_freq_hz.';
|
||||
trackResults(N).carrFreq = GNSS_tracking(N).carrier_freq_hz.';
|
||||
trackResults(N).dllDiscr = GNSS_tracking(N).code_error.';
|
||||
trackResults(N).dllDiscrFilt = GNSS_tracking(N).code_nco.';
|
||||
trackResults(N).pllDiscr = GNSS_tracking(N).carr_error.';
|
||||
trackResults(N).pllDiscrFilt = GNSS_tracking(N).carr_nco.';
|
||||
trackResults(N).status = 'T'; %fake track
|
||||
trackResults(N).codeFreq = GNSS_tracking(N).code_freq_hz.';
|
||||
trackResults(N).carrFreq = GNSS_tracking(N).carrier_freq_hz.';
|
||||
trackResults(N).dllDiscr = GNSS_tracking(N).code_error.';
|
||||
trackResults(N).dllDiscrFilt = GNSS_tracking(N).code_nco.';
|
||||
trackResults(N).pllDiscr = GNSS_tracking(N).carr_error.';
|
||||
trackResults(N).pllDiscrFilt = GNSS_tracking(N).carr_nco.';
|
||||
|
||||
trackResults(N).I_P = GNSS_tracking(N).prompt_I.';
|
||||
trackResults(N).Q_P = GNSS_tracking(N).prompt_Q.';
|
||||
trackResults(N).I_P = GNSS_tracking(N).prompt_I.';
|
||||
trackResults(N).Q_P = GNSS_tracking(N).prompt_Q.';
|
||||
|
||||
trackResults(N).I_E = GNSS_tracking(N).E.';
|
||||
trackResults(N).I_L = GNSS_tracking(N).L.';
|
||||
trackResults(N).Q_E = zeros(1,length(GNSS_tracking(N).E));
|
||||
trackResults(N).Q_L = zeros(1,length(GNSS_tracking(N).E));
|
||||
trackResults(N).CNo = GNSS_tracking(N).CN0_SNV_dB_Hz.';
|
||||
trackResults(N).PRN = ones(1,length(GNSS_tracking(N).E));
|
||||
trackResults(N).I_E = GNSS_tracking(N).E.';
|
||||
trackResults(N).I_L = GNSS_tracking(N).L.';
|
||||
trackResults(N).Q_E = zeros(1,length(GNSS_tracking(N).E));
|
||||
trackResults(N).Q_L = zeros(1,length(GNSS_tracking(N).E));
|
||||
trackResults(N).CNo = GNSS_tracking(N).CN0_SNV_dB_Hz.';
|
||||
trackResults(N).PRN = ones(1,length(GNSS_tracking(N).E));
|
||||
|
||||
% Use original MATLAB tracking plot function
|
||||
settings.numberOfChannels = channels;
|
||||
settings.msToProcess = length(GNSS_tracking(N).E);
|
||||
plotTracking(N,trackResults,settings);
|
||||
% Use original MATLAB tracking plot function
|
||||
settings.numberOfChannels = channels;
|
||||
settings.msToProcess = length(GNSS_tracking(N).E);
|
||||
plotTracking(N, trackResults, settings)
|
||||
end
|
||||
|
@ -1,36 +1,35 @@
|
||||
% /*!
|
||||
% * \file gps_l1_ca_dll_pll_plot_sample.m
|
||||
% * \brief Read GNSS-SDR Tracking dump binary file using the provided
|
||||
% function and plot some internal variables
|
||||
% * \author Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
% * -------------------------------------------------------------------------
|
||||
% *
|
||||
% * Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
||||
% *
|
||||
% * GNSS-SDR is a software defined Global Navigation
|
||||
% * Satellite Systems receiver
|
||||
% *
|
||||
% * This file is part of GNSS-SDR.
|
||||
% *
|
||||
% * GNSS-SDR 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 3 of the License, or
|
||||
% * at your option) any later version.
|
||||
% *
|
||||
% * GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
% *
|
||||
% * -------------------------------------------------------------------------
|
||||
% */
|
||||
% Reads GNSS-SDR Tracking dump binary file using the provided
|
||||
% function and plots some internal variables
|
||||
% Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
|
||||
close all;
|
||||
clear all;
|
||||
|
||||
if ~exist('gps_l1_ca_dll_pll_read_tracking_dump.m','file')
|
||||
if ~exist('dll_pll_veml_read_tracking_dump.m', 'file')
|
||||
addpath('./libs')
|
||||
end
|
||||
|
||||
@ -43,34 +42,34 @@ path = '/archive/'; %% CHANGE THIS PATH
|
||||
|
||||
for N=1:1:channels
|
||||
tracking_log_path = [path 'glo_tracking_ch_' num2str(N+first_channel-1) '.dat']; %% CHANGE epl_tracking_ch_ BY YOUR dump_filename
|
||||
GNSS_tracking(N)= gps_l1_ca_dll_pll_read_tracking_dump(tracking_log_path);
|
||||
GNSS_tracking(N) = dll_pll_veml_read_tracking_dump(tracking_log_path);
|
||||
end
|
||||
|
||||
% GNSS-SDR format conversion to MATLAB GPS receiver
|
||||
|
||||
for N=1:1:channels
|
||||
trackResults(N).status = 'T'; %fake track
|
||||
trackResults(N).codeFreq = GNSS_tracking(N).code_freq_hz.';
|
||||
trackResults(N).carrFreq = GNSS_tracking(N).carrier_doppler_hz.';
|
||||
trackResults(N).dllDiscr = GNSS_tracking(N).code_error.';
|
||||
trackResults(N).dllDiscrFilt = GNSS_tracking(N).code_nco.';
|
||||
trackResults(N).pllDiscr = GNSS_tracking(N).carr_error.';
|
||||
trackResults(N).pllDiscrFilt = GNSS_tracking(N).carr_nco.';
|
||||
trackResults(N).status = 'T'; %fake track
|
||||
trackResults(N).codeFreq = GNSS_tracking(N).code_freq_hz.';
|
||||
trackResults(N).carrFreq = GNSS_tracking(N).carrier_doppler_hz.';
|
||||
trackResults(N).dllDiscr = GNSS_tracking(N).code_error.';
|
||||
trackResults(N).dllDiscrFilt = GNSS_tracking(N).code_nco.';
|
||||
trackResults(N).pllDiscr = GNSS_tracking(N).carr_error.';
|
||||
trackResults(N).pllDiscrFilt = GNSS_tracking(N).carr_nco.';
|
||||
|
||||
trackResults(N).I_P = GNSS_tracking(N).prompt_I.';
|
||||
trackResults(N).Q_P = GNSS_tracking(N).prompt_Q.';
|
||||
trackResults(N).I_P = GNSS_tracking(N).prompt_I.';
|
||||
trackResults(N).Q_P = GNSS_tracking(N).prompt_Q.';
|
||||
|
||||
trackResults(N).I_E = GNSS_tracking(N).E.';
|
||||
trackResults(N).I_L = GNSS_tracking(N).L.';
|
||||
trackResults(N).Q_E = zeros(1,length(GNSS_tracking(N).E));
|
||||
trackResults(N).Q_L = zeros(1,length(GNSS_tracking(N).E));
|
||||
trackResults(N).PRN = ones(1,length(GNSS_tracking(N).E));
|
||||
trackResults(N).CNo = GNSS_tracking(N).CN0_SNV_dB_Hz.';
|
||||
trackResults(N).I_E = GNSS_tracking(N).E.';
|
||||
trackResults(N).I_L = GNSS_tracking(N).L.';
|
||||
trackResults(N).Q_E = zeros(1,length(GNSS_tracking(N).E));
|
||||
trackResults(N).Q_L = zeros(1,length(GNSS_tracking(N).E));
|
||||
trackResults(N).PRN = ones(1,length(GNSS_tracking(N).E));
|
||||
trackResults(N).CNo = GNSS_tracking(N).CN0_SNV_dB_Hz.';
|
||||
|
||||
% Use original MATLAB tracking plot function
|
||||
settings.numberOfChannels = channels;
|
||||
settings.msToProcess = length(GNSS_tracking(N).E);
|
||||
plotTracking(N,trackResults,settings)
|
||||
% Use original MATLAB tracking plot function
|
||||
settings.numberOfChannels = channels;
|
||||
settings.msToProcess = length(GNSS_tracking(N).E);
|
||||
plotTracking(N, trackResults, settings)
|
||||
end
|
||||
|
||||
|
||||
|
@ -1,32 +1,30 @@
|
||||
% /*!
|
||||
% * \file gps_l1_ca_pvt_plot_sample.m
|
||||
% * \brief Read GNSS-SDR PVT dump binary file using the provided
|
||||
% function and plot some internal variables
|
||||
% * \author Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
% * -------------------------------------------------------------------------
|
||||
% *
|
||||
% * Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
||||
% *
|
||||
% * GNSS-SDR is a software defined Global Navigation
|
||||
% * Satellite Systems receiver
|
||||
% *
|
||||
% * This file is part of GNSS-SDR.
|
||||
% *
|
||||
% * GNSS-SDR 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 3 of the License, or
|
||||
% * at your option) any later version.
|
||||
% *
|
||||
% * GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
% *
|
||||
% * -------------------------------------------------------------------------
|
||||
% */
|
||||
% Readx GNSS-SDR PVT dump binary file using the provided
|
||||
% function and plotx some internal variables
|
||||
% Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
|
||||
close all;
|
||||
clear all;
|
||||
@ -65,15 +63,15 @@ h=35;
|
||||
%=== Convert to UTM coordinate system =============================
|
||||
utmZone = findUtmZone(lat_deg, long_deg);
|
||||
|
||||
[settings.truePosition.E, ...
|
||||
settings.truePosition.N, ...
|
||||
settings.truePosition.U] = cart2utm(X, Y, Z, utmZone);
|
||||
[settings.truePosition.E, ...
|
||||
settings.truePosition.N, ...
|
||||
settings.truePosition.U] = cart2utm(X, Y, Z, utmZone);
|
||||
|
||||
|
||||
for k=1:1:length(navSolutions.X)
|
||||
[navSolutions.E(k), ...
|
||||
navSolutions.N(k), ...
|
||||
navSolutions.U(k)]=cart2utm(navSolutions.X(k), navSolutions.Y(k), navSolutions.Z(k), utmZone);
|
||||
navSolutions.N(k), ...
|
||||
navSolutions.U(k)]=cart2utm(navSolutions.X(k), navSolutions.Y(k), navSolutions.Z(k), utmZone);
|
||||
end
|
||||
|
||||
plot_skyplot=0;
|
||||
|
@ -1,4 +1,28 @@
|
||||
% Read PVG raw dump
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
|
||||
%clear all;
|
||||
|
||||
|
@ -1,32 +1,31 @@
|
||||
% /*!
|
||||
% * \file gps_l1_ca_dll_fll_pll_plot_sample.m
|
||||
% * \brief Read GNSS-SDR Tracking dump binary file using the provided
|
||||
% function and plot some internal variables
|
||||
% * \author Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
% * -------------------------------------------------------------------------
|
||||
% *
|
||||
% * Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
||||
% *
|
||||
% * GNSS-SDR is a software defined Global Navigation
|
||||
% * Satellite Systems receiver
|
||||
% *
|
||||
% * This file is part of GNSS-SDR.
|
||||
% *
|
||||
% * GNSS-SDR 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 3 of the License, or
|
||||
% * at your option) any later version.
|
||||
% *
|
||||
% * GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
% *
|
||||
% * -------------------------------------------------------------------------
|
||||
% */
|
||||
% Reads GNSS-SDR Tracking dump binary file using the provided
|
||||
% function and plots some internal variables
|
||||
% Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
|
||||
%close all;
|
||||
%clear all;
|
||||
samplingFreq = 64e6/16; %[Hz]
|
||||
|
@ -1,3 +1,28 @@
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
|
||||
%help script to compare GNSS-SDR Preambles starts
|
||||
channel=3;
|
||||
% From GNSS_SDR telemetry decoder
|
||||
|
@ -1,3 +1,28 @@
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
|
||||
% compare pseudoranges
|
||||
|
||||
close all;
|
||||
|
@ -1,3 +1,28 @@
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
|
||||
% Read observables dump
|
||||
|
||||
%clear all;
|
||||
|
@ -1,130 +1,128 @@
|
||||
% /*!
|
||||
% * \file dll_pll_veml_read_tracking_dump.m
|
||||
% * \brief Read GNSS-SDR Tracking dump binary file into MATLAB.
|
||||
% * \author Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
||||
% * -------------------------------------------------------------------------
|
||||
% *
|
||||
% * Copyright (C) 2010-2012 (see AUTHORS file for a list of contributors)
|
||||
% *
|
||||
% * GNSS-SDR is a software defined Global Navigation
|
||||
% * Satellite Systems receiver
|
||||
% *
|
||||
% * This file is part of GNSS-SDR.
|
||||
% *
|
||||
% * GNSS-SDR 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 3 of the License, or
|
||||
% * at your option) any later version.
|
||||
% *
|
||||
% * GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
% *
|
||||
% * -------------------------------------------------------------------------
|
||||
% */
|
||||
% Usage: dll_pll_veml_read_tracking_dump (filename, [count])
|
||||
%
|
||||
% Opens GNSS-SDR tracking binary log file .dat and returns the contents
|
||||
|
||||
% Read GNSS-SDR Tracking dump binary file into MATLAB.
|
||||
% Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
|
||||
function [GNSS_tracking] = dll_pll_veml_read_tracking_dump (filename, count)
|
||||
%% usage: dll_pll_veml_read_tracking_dump (filename, [count])
|
||||
%%
|
||||
%% open GNSS-SDR tracking binary log file .dat and return the contents
|
||||
%%
|
||||
|
||||
m = nargchk (1,2,nargin);
|
||||
m = nargchk (1,2,nargin);
|
||||
|
||||
num_float_vars = 17;
|
||||
num_unsigned_long_int_vars = 1;
|
||||
num_double_vars = 1;
|
||||
num_unsigned_int_vars = 1;
|
||||
num_float_vars = 17;
|
||||
num_unsigned_long_int_vars = 1;
|
||||
num_double_vars = 1;
|
||||
num_unsigned_int_vars = 1;
|
||||
|
||||
if(~isempty(strfind(computer('arch'), '64')))
|
||||
% 64-bit computer
|
||||
double_size_bytes = 8;
|
||||
unsigned_long_int_size_bytes = 8;
|
||||
float_size_bytes = 4;
|
||||
unsigned_int_size_bytes = 4;
|
||||
else
|
||||
double_size_bytes = 8;
|
||||
unsigned_long_int_size_bytes = 4;
|
||||
float_size_bytes = 4;
|
||||
unsigned_int_size_bytes = 4;
|
||||
end
|
||||
if(~isempty(strfind(computer('arch'), '64')))
|
||||
% 64-bit computer
|
||||
double_size_bytes = 8;
|
||||
unsigned_long_int_size_bytes = 8;
|
||||
float_size_bytes = 4;
|
||||
unsigned_int_size_bytes = 4;
|
||||
else
|
||||
double_size_bytes = 8;
|
||||
unsigned_long_int_size_bytes = 4;
|
||||
float_size_bytes = 4;
|
||||
unsigned_int_size_bytes = 4;
|
||||
end
|
||||
|
||||
skip_bytes_each_read = float_size_bytes * num_float_vars + unsigned_long_int_size_bytes * num_unsigned_long_int_vars + ...
|
||||
double_size_bytes * num_double_vars + num_unsigned_int_vars*unsigned_int_size_bytes;
|
||||
skip_bytes_each_read = float_size_bytes * num_float_vars + unsigned_long_int_size_bytes * num_unsigned_long_int_vars + ...
|
||||
double_size_bytes * num_double_vars + num_unsigned_int_vars*unsigned_int_size_bytes;
|
||||
|
||||
bytes_shift = 0;
|
||||
bytes_shift = 0;
|
||||
|
||||
if (m)
|
||||
if (m)
|
||||
usage (m);
|
||||
end
|
||||
end
|
||||
|
||||
if (nargin < 2)
|
||||
if (nargin < 2)
|
||||
count = Inf;
|
||||
end
|
||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
||||
f = fopen (filename, 'rb');
|
||||
if (f < 0)
|
||||
else
|
||||
end
|
||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
||||
f = fopen (filename, 'rb');
|
||||
if (f < 0)
|
||||
else
|
||||
v1 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v2 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v3 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v4 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v5 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v6 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v7 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v8 = fread (f, count, 'long', skip_bytes_each_read - unsigned_long_int_size_bytes);
|
||||
bytes_shift = bytes_shift + unsigned_long_int_size_bytes;
|
||||
bytes_shift = bytes_shift + unsigned_long_int_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v9 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v10 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v11 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v12 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v13 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v14 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v15 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v16 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v17 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v18 = fread (f, count, 'float', skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next double
|
||||
v19 = fread (f, count, 'double', skip_bytes_each_read - double_size_bytes);
|
||||
bytes_shift = bytes_shift + double_size_bytes;
|
||||
bytes_shift = bytes_shift + double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next unsigned int
|
||||
v20 = fread (f, count, 'uint', skip_bytes_each_read - unsigned_int_size_bytes);
|
||||
fclose (f);
|
||||
@ -149,5 +147,5 @@ function [GNSS_tracking] = dll_pll_veml_read_tracking_dump (filename, count)
|
||||
GNSS_tracking.var1 = v18;
|
||||
GNSS_tracking.var2 = v19;
|
||||
GNSS_tracking.PRN = v20;
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1,153 +0,0 @@
|
||||
% /*!
|
||||
% * \file galileo_e1_dll_pll_veml_read_tracking_dump.m
|
||||
% * \brief Read GNSS-SDR Tracking dump binary file into MATLAB.
|
||||
% * \author Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
||||
% * -------------------------------------------------------------------------
|
||||
% *
|
||||
% * Copyright (C) 2010-2012 (see AUTHORS file for a list of contributors)
|
||||
% *
|
||||
% * GNSS-SDR is a software defined Global Navigation
|
||||
% * Satellite Systems receiver
|
||||
% *
|
||||
% * This file is part of GNSS-SDR.
|
||||
% *
|
||||
% * GNSS-SDR 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 3 of the License, or
|
||||
% * at your option) any later version.
|
||||
% *
|
||||
% * GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
% *
|
||||
% * -------------------------------------------------------------------------
|
||||
% */
|
||||
|
||||
function [GNSS_tracking] = galileo_e1_dll_pll_veml_read_tracking_dump (filename, count)
|
||||
%% usage: galileo_e1_dll_pll_veml_read_tracking_dump (filename, [count])
|
||||
%%
|
||||
%% open GNSS-SDR tracking binary log file .dat and return the contents
|
||||
%%
|
||||
|
||||
m = nargchk (1,2,nargin);
|
||||
|
||||
num_float_vars = 17;
|
||||
num_unsigned_long_int_vars = 1;
|
||||
num_double_vars = 1;
|
||||
num_unsigned_int_vars = 1;
|
||||
|
||||
if(~isempty(strfind(computer('arch'), '64')))
|
||||
% 64-bit computer
|
||||
double_size_bytes = 8;
|
||||
unsigned_long_int_size_bytes = 8;
|
||||
float_size_bytes = 4;
|
||||
unsigned_int_size_bytes = 4;
|
||||
else
|
||||
double_size_bytes = 8;
|
||||
unsigned_long_int_size_bytes = 4;
|
||||
float_size_bytes = 4;
|
||||
unsigned_int_size_bytes = 4;
|
||||
end
|
||||
|
||||
skip_bytes_each_read = float_size_bytes * num_float_vars + unsigned_long_int_size_bytes * num_unsigned_long_int_vars + ...
|
||||
double_size_bytes * num_double_vars + num_unsigned_int_vars*unsigned_int_size_bytes;
|
||||
|
||||
bytes_shift = 0;
|
||||
|
||||
if (m)
|
||||
usage (m);
|
||||
end
|
||||
|
||||
if (nargin < 2)
|
||||
count = Inf;
|
||||
end
|
||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
||||
f = fopen (filename, 'rb');
|
||||
if (f < 0)
|
||||
else
|
||||
v1 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v2 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v3 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v4 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v5 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v6 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v7 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v8 = fread (f, count, 'long', skip_bytes_each_read - unsigned_long_int_size_bytes);
|
||||
bytes_shift = bytes_shift + unsigned_long_int_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v9 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v10 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v11 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v12 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v13 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v14 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v15 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v16 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v17 = fread (f, count, 'float', skip_bytes_each_read - float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next float
|
||||
v18 = fread (f, count, 'float', skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift = bytes_shift + float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next double
|
||||
v19 = fread (f, count, 'double', skip_bytes_each_read - double_size_bytes);
|
||||
bytes_shift = bytes_shift + double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next unsigned int
|
||||
v20 = fread (f, count, 'uint', skip_bytes_each_read - unsigned_int_size_bytes);
|
||||
fclose (f);
|
||||
|
||||
GNSS_tracking.VE = v1;
|
||||
GNSS_tracking.E = v2;
|
||||
GNSS_tracking.P = v3;
|
||||
GNSS_tracking.L = v4;
|
||||
GNSS_tracking.VL = v5;
|
||||
GNSS_tracking.prompt_I = v6;
|
||||
GNSS_tracking.prompt_Q = v7;
|
||||
GNSS_tracking.PRN_start_sample = v8;
|
||||
GNSS_tracking.acc_carrier_phase_rad = v9;
|
||||
GNSS_tracking.carrier_doppler_hz = v10;
|
||||
GNSS_tracking.code_freq_hz = v11;
|
||||
GNSS_tracking.carr_error = v12;
|
||||
GNSS_tracking.carr_nco = v13;
|
||||
GNSS_tracking.code_error = v14;
|
||||
GNSS_tracking.code_nco = v15;
|
||||
GNSS_tracking.CN0_SNV_dB_Hz = v16;
|
||||
GNSS_tracking.carrier_lock_test = v17;
|
||||
GNSS_tracking.var1 = v18;
|
||||
GNSS_tracking.var2 = v19;
|
||||
GNSS_tracking.PRN = v20;
|
||||
end
|
||||
|
@ -1,191 +0,0 @@
|
||||
% /*!
|
||||
% * \file glonass_ca_dll_pll_read_tracking_dump.m
|
||||
% * \brief Read GNSS-SDR Tracking dump binary file into MATLAB.
|
||||
% * \author Damian Miralles, 2017. dmiralles2009(at)gmail.com
|
||||
% * -------------------------------------------------------------------------
|
||||
% *
|
||||
% * Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
||||
% *
|
||||
% * GNSS-SDR is a software defined Global Navigation
|
||||
% * Satellite Systems receiver
|
||||
% *
|
||||
% * This file is part of GNSS-SDR.
|
||||
% *
|
||||
% * GNSS-SDR 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 3 of the License, or
|
||||
% * at your option) any later version.
|
||||
% *
|
||||
% * GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
% *
|
||||
% * -------------------------------------------------------------------------
|
||||
% */
|
||||
function [GNSS_tracking] = glonass_ca_dll_pll_read_tracking_dump (filename, count)
|
||||
|
||||
%% usage: gps_l1_ca_dll_pll_read_tracking_dump_64bits (filename, [count])
|
||||
%%
|
||||
%% open GNSS-SDR tracking binary log file .dat and return the contents
|
||||
%%
|
||||
|
||||
narginchk (1,2);
|
||||
num_float_vars=5;
|
||||
num_unsigned_long_int_vars=1;
|
||||
num_double_vars=11;
|
||||
num_unsigned_int_vars=1;
|
||||
double_size_bytes=8;
|
||||
unsigned_long_int_size_bytes=8;
|
||||
float_size_bytes=4;
|
||||
long_int_size_bytes=4;
|
||||
|
||||
skip_bytes_each_read=float_size_bytes*num_float_vars+unsigned_long_int_size_bytes*num_unsigned_long_int_vars+double_size_bytes*num_double_vars+long_int_size_bytes*num_unsigned_int_vars;
|
||||
bytes_shift=0;
|
||||
|
||||
if (nargin < 2)
|
||||
%count = Inf;
|
||||
file_stats = dir(filename);
|
||||
%round num bytes to read to integer number of samples (to protect the script from binary
|
||||
%dump end file transitory)
|
||||
count = (file_stats.bytes - mod(file_stats.bytes,skip_bytes_each_read))/skip_bytes_each_read;
|
||||
end
|
||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
||||
f = fopen (filename, 'rb');
|
||||
if (f < 0)
|
||||
else
|
||||
v1 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v2 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v3 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v4 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v5 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved unsigned_long_int
|
||||
v6 = fread (f, count, 'uint64',skip_bytes_each_read-unsigned_long_int_size_bytes);
|
||||
bytes_shift=bytes_shift+unsigned_long_int_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
||||
v7 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
||||
v8 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
||||
v9 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
||||
v10 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
||||
v11 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
||||
v12 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
||||
v13 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
||||
v14 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
||||
v15 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
||||
v16 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
||||
v17 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
||||
v18 = fread (f, count, 'uint32',skip_bytes_each_read-double_size_bytes);
|
||||
fclose (f);
|
||||
|
||||
%%%%%%%% output vars %%%%%%%%
|
||||
|
||||
% // EPR
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&tmp_E), sizeof(float));
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&tmp_P), sizeof(float));
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&tmp_L), sizeof(float));
|
||||
% // PROMPT I and Q (to analyze navigation symbols)
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&prompt_I), sizeof(float));
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&prompt_Q), sizeof(float));
|
||||
% // PRN start sample stamp
|
||||
% //tmp_float=(float)d_sample_counter;
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&d_sample_counter), sizeof(unsigned long int));
|
||||
% // accumulated carrier phase
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&d_acc_carrier_phase_rad), sizeof(double));
|
||||
%
|
||||
% // carrier and code frequency
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&d_carrier_doppler_hz), sizeof(double));
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&d_code_freq_chips), sizeof(double));
|
||||
%
|
||||
% //PLL commands
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&carr_phase_error_secs_Ti), sizeof(double));
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&d_carrier_doppler_hz), sizeof(double));
|
||||
%
|
||||
% //DLL commands
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&code_error_chips_Ti), sizeof(double));
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&code_error_filt_chips), sizeof(double));
|
||||
%
|
||||
% // CN0 and carrier lock test
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&d_CN0_SNV_dB_Hz), sizeof(double));
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&d_carrier_lock_test), sizeof(double));
|
||||
%
|
||||
% // AUX vars (for debug purposes)
|
||||
% tmp_double = d_rem_code_phase_samples;
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double));
|
||||
% tmp_double = static_cast<double>(d_sample_counter + d_current_prn_length_samples);
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double));
|
||||
% // PRN
|
||||
% unsigned int prn_ = d_acquisition_gnss_synchro->PRN;
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&prn_), sizeof(unsigned int));
|
||||
E=v1;
|
||||
P=v2;
|
||||
L=v3;
|
||||
prompt_I=v4;
|
||||
prompt_Q=v5;
|
||||
PRN_start_sample=v6;
|
||||
acc_carrier_phase_rad=v7;
|
||||
carrier_freq_hz=v8;
|
||||
code_freq_hz=v9;
|
||||
carr_error=v10;
|
||||
carr_nco=v11;
|
||||
code_error=v12;
|
||||
code_nco=v13;
|
||||
CN0_SNV_dB_Hz=v14;
|
||||
carrier_lock_test=v15;
|
||||
var1=v16;
|
||||
var2=v17;
|
||||
PRN=v18;
|
||||
|
||||
GNSS_tracking.E=E;
|
||||
GNSS_tracking.P=P;
|
||||
GNSS_tracking.L=L;
|
||||
GNSS_tracking.prompt_I=prompt_I;
|
||||
GNSS_tracking.prompt_Q=prompt_Q;
|
||||
GNSS_tracking.PRN_start_sample=PRN_start_sample;
|
||||
GNSS_tracking.acc_carrier_phase_rad=acc_carrier_phase_rad;
|
||||
GNSS_tracking.carrier_freq_hz=carrier_freq_hz;
|
||||
GNSS_tracking.code_freq_hz=code_freq_hz;
|
||||
GNSS_tracking.carr_error=carr_error;
|
||||
GNSS_tracking.carr_nco=carr_nco;
|
||||
GNSS_tracking.code_error=code_error;
|
||||
GNSS_tracking.code_nco=code_nco;
|
||||
GNSS_tracking.CN0_SNV_dB_Hz=CN0_SNV_dB_Hz;
|
||||
GNSS_tracking.carrier_lock_test=carrier_lock_test;
|
||||
GNSS_tracking.d_rem_code_phase_samples=var1;
|
||||
GNSS_tracking.var2=var2;
|
||||
GNSS_tracking.PRN=PRN;
|
||||
end
|
||||
|
@ -1,178 +0,0 @@
|
||||
% /*!
|
||||
% * \file gps_l1_ca_dll_fll_pll_read_tracking_dump.m
|
||||
% * \brief Read GNSS-SDR Tracking dump binary file into MATLAB.
|
||||
% * \author Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
% * -------------------------------------------------------------------------
|
||||
% *
|
||||
% * Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
||||
% *
|
||||
% * GNSS-SDR is a software defined Global Navigation
|
||||
% * Satellite Systems receiver
|
||||
% *
|
||||
% * This file is part of GNSS-SDR.
|
||||
% *
|
||||
% * GNSS-SDR 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 3 of the License, or
|
||||
% * at your option) any later version.
|
||||
% *
|
||||
% * GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
% *
|
||||
% * -------------------------------------------------------------------------
|
||||
% */
|
||||
function [GNSS_tracking] = gps_l1_ca_dll_fll_pll_read_tracking_dump (filename, samplingFreq, count)
|
||||
|
||||
%% usage: gps_l1_ca_dll_fll_pll_read_tracking_dump (filename, [count])
|
||||
%%
|
||||
%% open GNSS-SDR tracking binary log file .dat and return the contents
|
||||
%%
|
||||
|
||||
m = nargchk (1,3,nargin);
|
||||
num_float_vars=16;
|
||||
num_double_vars=1;
|
||||
double_size_bytes=8;
|
||||
float_size_bytes=4;
|
||||
skip_bytes_each_read=float_size_bytes*num_float_vars+double_size_bytes*num_double_vars;
|
||||
bytes_shift=0;
|
||||
if (m)
|
||||
usage (m);
|
||||
end
|
||||
|
||||
if (nargin < 3)
|
||||
count = Inf;
|
||||
end
|
||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
||||
f = fopen (filename, 'rb');
|
||||
if (f < 0)
|
||||
else
|
||||
v1 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v2 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v3 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v4 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v5 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v6 = fread (f, count, 'uint32',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v7 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v8 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v9 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v10 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v11 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v12 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v13 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v14 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v15 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v16 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v17 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
fclose (f);
|
||||
|
||||
%%%%%%%% output vars %%%%%%%%
|
||||
|
||||
% // EPR
|
||||
% d_dump_file.write((char*)&tmp_E, sizeof(float));
|
||||
% d_dump_file.write((char*)&tmp_P, sizeof(float));
|
||||
% d_dump_file.write((char*)&tmp_L, sizeof(float));
|
||||
% // PROMPT I and Q (to analyze navigation symbols)
|
||||
% d_dump_file.write((char*)&prompt_I, sizeof(float));
|
||||
% d_dump_file.write((char*)&prompt_Q, sizeof(float));
|
||||
% // PRN start sample stamp
|
||||
% //tmp_float=(float)d_sample_counter;
|
||||
% d_dump_file.write((char*)&d_sample_counter, sizeof(unsigned long int));
|
||||
% // accumulated carrier phase
|
||||
% d_dump_file.write((char*)&d_acc_carrier_phase_rad, sizeof(float));
|
||||
%
|
||||
% // carrier and code frequency
|
||||
% d_dump_file.write((char*)&d_carrier_doppler_hz, sizeof(float));
|
||||
% d_dump_file.write((char*)&d_code_freq_hz, sizeof(float));
|
||||
%
|
||||
% //PLL commands
|
||||
% d_dump_file.write((char*)&PLL_discriminator_hz, sizeof(float));
|
||||
% d_dump_file.write((char*)&carr_nco_hz, sizeof(float));
|
||||
%
|
||||
% //DLL commands
|
||||
% d_dump_file.write((char*)&code_error_chips, sizeof(float));
|
||||
% d_dump_file.write((char*)&d_code_phase_samples, sizeof(float));
|
||||
%
|
||||
% // CN0 and carrier lock test
|
||||
% d_dump_file.write((char*)&d_CN0_SNV_dB_Hz, sizeof(float));
|
||||
% d_dump_file.write((char*)&d_carrier_lock_test, sizeof(float));
|
||||
%
|
||||
% // AUX vars (for debug purposes)
|
||||
% tmp_float=0;
|
||||
% d_dump_file.write((char*)&tmp_float, sizeof(float));
|
||||
% d_dump_file.write((char*)&d_sample_counter_seconds, sizeof(double));
|
||||
|
||||
E=v1;
|
||||
P=v2;
|
||||
L=v3;
|
||||
prompt_I=v4;
|
||||
prompt_Q=v5;
|
||||
PRN_start_sample=v6;
|
||||
acc_carrier_phase_rad=v7;
|
||||
carrier_doppler_hz=v8;
|
||||
code_freq_hz=v9;
|
||||
PLL_discriminator_hz=v10;
|
||||
carr_nco_hz=v11;
|
||||
code_error_chips=v12;
|
||||
code_phase_samples=v13;
|
||||
CN0_SNV_dB_Hz=v14;
|
||||
carrier_lock_test=v15;
|
||||
var1=v16;
|
||||
var2=v17;
|
||||
|
||||
GNSS_tracking.E=E;
|
||||
GNSS_tracking.P=P;
|
||||
GNSS_tracking.L=L;
|
||||
GNSS_tracking.prompt_I=prompt_I;
|
||||
GNSS_tracking.prompt_Q=prompt_Q;
|
||||
GNSS_tracking.PRN_start_sample=PRN_start_sample;
|
||||
GNSS_tracking.acc_carrier_phase_rad=acc_carrier_phase_rad;
|
||||
GNSS_tracking.carrier_doppler_hz=carrier_doppler_hz;
|
||||
GNSS_tracking.code_freq_hz=code_freq_hz;
|
||||
GNSS_tracking.PLL_discriminator_hz=PLL_discriminator_hz;
|
||||
GNSS_tracking.carr_nco=carr_nco_hz;
|
||||
GNSS_tracking.code_error_chips=code_error_chips;
|
||||
GNSS_tracking.code_phase_samples=code_phase_samples;
|
||||
GNSS_tracking.CN0_SNV_dB_Hz=CN0_SNV_dB_Hz;
|
||||
GNSS_tracking.carrier_lock_test=carrier_lock_test;
|
||||
GNSS_tracking.var1=var1;
|
||||
GNSS_tracking.var2=var2;
|
||||
GNSS_tracking.prn_delay_ms=1000*(GNSS_tracking.var2+GNSS_tracking.var1)./samplingFreq;
|
||||
end
|
||||
|
@ -1,158 +1,156 @@
|
||||
% /*!
|
||||
% * \file gps_l1_ca_dll_pll_read_tracking_dump.m
|
||||
% * \brief Read GNSS-SDR Tracking dump binary file into MATLAB.
|
||||
% * \author Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
% * -------------------------------------------------------------------------
|
||||
% *
|
||||
% * Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
||||
% *
|
||||
% * GNSS-SDR is a software defined Global Navigation
|
||||
% * Satellite Systems receiver
|
||||
% *
|
||||
% * This file is part of GNSS-SDR.
|
||||
% *
|
||||
% * GNSS-SDR 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 3 of the License, or
|
||||
% * at your option) any later version.
|
||||
% *
|
||||
% * GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
% *
|
||||
% * -------------------------------------------------------------------------
|
||||
% */
|
||||
% Usage: gps_l1_ca_dll_pll_read_tracking_dump_64bits (filename, [count])
|
||||
%
|
||||
% Opens GNSS-SDR tracking binary log file .dat and returns the contents
|
||||
|
||||
% Read GNSS-SDR Tracking dump binary file into MATLAB.
|
||||
% Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
|
||||
function [GNSS_tracking] = gps_l1_ca_dll_pll_read_tracking_dump (filename, count)
|
||||
|
||||
%% usage: gps_l1_ca_dll_pll_read_tracking_dump_64bits (filename, [count])
|
||||
%%
|
||||
%% open GNSS-SDR tracking binary log file .dat and return the contents
|
||||
%%
|
||||
m = nargchk (1,2,nargin);
|
||||
num_float_vars=5;
|
||||
num_unsigned_long_int_vars=1;
|
||||
num_double_vars=11;
|
||||
num_unsigned_int_vars=1;
|
||||
double_size_bytes=8;
|
||||
unsigned_long_int_size_bytes=8;
|
||||
float_size_bytes=4;
|
||||
long_int_size_bytes=4;
|
||||
|
||||
m = nargchk (1,2,nargin);
|
||||
num_float_vars=5;
|
||||
num_unsigned_long_int_vars=1;
|
||||
num_double_vars=11;
|
||||
num_unsigned_int_vars=1;
|
||||
double_size_bytes=8;
|
||||
unsigned_long_int_size_bytes=8;
|
||||
float_size_bytes=4;
|
||||
long_int_size_bytes=4;
|
||||
|
||||
skip_bytes_each_read=float_size_bytes*num_float_vars+unsigned_long_int_size_bytes*num_unsigned_long_int_vars+double_size_bytes*num_double_vars+long_int_size_bytes*num_unsigned_int_vars;
|
||||
bytes_shift=0;
|
||||
if (m)
|
||||
skip_bytes_each_read=float_size_bytes*num_float_vars+unsigned_long_int_size_bytes*num_unsigned_long_int_vars+double_size_bytes*num_double_vars+long_int_size_bytes*num_unsigned_int_vars;
|
||||
bytes_shift=0;
|
||||
if (m)
|
||||
usage (m);
|
||||
end
|
||||
end
|
||||
|
||||
if (nargin < 2)
|
||||
if (nargin < 2)
|
||||
%count = Inf;
|
||||
file_stats = dir(filename);
|
||||
%round num bytes to read to integer number of samples (to protect the script from binary
|
||||
%dump end file transitory)
|
||||
count = (file_stats.bytes - mod(file_stats.bytes,skip_bytes_each_read))/skip_bytes_each_read;
|
||||
end
|
||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
||||
f = fopen (filename, 'rb');
|
||||
if (f < 0)
|
||||
else
|
||||
end
|
||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
||||
f = fopen (filename, 'rb');
|
||||
if (f < 0)
|
||||
else
|
||||
v1 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v2 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v3 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v4 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved float
|
||||
v5 = fread (f, count, 'float',skip_bytes_each_read-float_size_bytes);
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
bytes_shift=bytes_shift+float_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved unsigned_long_int
|
||||
v6 = fread (f, count, 'uint64',skip_bytes_each_read-unsigned_long_int_size_bytes);
|
||||
bytes_shift=bytes_shift+unsigned_long_int_size_bytes;
|
||||
bytes_shift=bytes_shift+unsigned_long_int_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
||||
v7 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
||||
v8 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
||||
v9 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
||||
v10 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
||||
v11 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
||||
v12 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
||||
v13 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
||||
v14 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
||||
v15 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
||||
v16 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
||||
v17 = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved double
|
||||
v18 = fread (f, count, 'uint32',skip_bytes_each_read-double_size_bytes);
|
||||
fclose (f);
|
||||
|
||||
%%%%%%%% output vars %%%%%%%%
|
||||
|
||||
% // EPR
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&tmp_E), sizeof(float));
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&tmp_P), sizeof(float));
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&tmp_L), sizeof(float));
|
||||
% // PROMPT I and Q (to analyze navigation symbols)
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&prompt_I), sizeof(float));
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&prompt_Q), sizeof(float));
|
||||
% // PRN start sample stamp
|
||||
% //tmp_float=(float)d_sample_counter;
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&d_sample_counter), sizeof(unsigned long int));
|
||||
% // accumulated carrier phase
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&d_acc_carrier_phase_rad), sizeof(double));
|
||||
%
|
||||
% // carrier and code frequency
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&d_carrier_doppler_hz), sizeof(double));
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&d_code_freq_chips), sizeof(double));
|
||||
%
|
||||
% //PLL commands
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&carr_phase_error_secs_Ti), sizeof(double));
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&d_carrier_doppler_hz), sizeof(double));
|
||||
%
|
||||
% //DLL commands
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&code_error_chips_Ti), sizeof(double));
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&code_error_filt_chips), sizeof(double));
|
||||
%
|
||||
% // CN0 and carrier lock test
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&d_CN0_SNV_dB_Hz), sizeof(double));
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&d_carrier_lock_test), sizeof(double));
|
||||
%
|
||||
% // AUX vars (for debug purposes)
|
||||
% tmp_double = d_rem_code_phase_samples;
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double));
|
||||
% tmp_double = static_cast<double>(d_sample_counter + d_current_prn_length_samples);
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double));
|
||||
% // PRN
|
||||
% unsigned int prn_ = d_acquisition_gnss_synchro->PRN;
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&prn_), sizeof(unsigned int));
|
||||
% // EPR
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&tmp_E), sizeof(float));
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&tmp_P), sizeof(float));
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&tmp_L), sizeof(float));
|
||||
% // PROMPT I and Q (to analyze navigation symbols)
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&prompt_I), sizeof(float));
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&prompt_Q), sizeof(float));
|
||||
% // PRN start sample stamp
|
||||
% //tmp_float=(float)d_sample_counter;
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&d_sample_counter), sizeof(unsigned long int));
|
||||
% // accumulated carrier phase
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&d_acc_carrier_phase_rad), sizeof(double));
|
||||
%
|
||||
% // carrier and code frequency
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&d_carrier_doppler_hz), sizeof(double));
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&d_code_freq_chips), sizeof(double));
|
||||
%
|
||||
% //PLL commands
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&carr_phase_error_secs_Ti), sizeof(double));
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&d_carrier_doppler_hz), sizeof(double));
|
||||
%
|
||||
% //DLL commands
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&code_error_chips_Ti), sizeof(double));
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&code_error_filt_chips), sizeof(double));
|
||||
%
|
||||
% // CN0 and carrier lock test
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&d_CN0_SNV_dB_Hz), sizeof(double));
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&d_carrier_lock_test), sizeof(double));
|
||||
%
|
||||
% // AUX vars (for debug purposes)
|
||||
% tmp_double = d_rem_code_phase_samples;
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double));
|
||||
% tmp_double = static_cast<double>(d_sample_counter + d_current_prn_length_samples);
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&tmp_double), sizeof(double));
|
||||
% // PRN
|
||||
% unsigned int prn_ = d_acquisition_gnss_synchro->PRN;
|
||||
% d_dump_file.write(reinterpret_cast<char*>(&prn_), sizeof(unsigned int));
|
||||
E=v1;
|
||||
P=v2;
|
||||
L=v3;
|
||||
@ -190,5 +188,5 @@ function [GNSS_tracking] = gps_l1_ca_dll_pll_read_tracking_dump (filename, count
|
||||
GNSS_tracking.d_rem_code_phase_samples=var1;
|
||||
GNSS_tracking.var2=var2;
|
||||
GNSS_tracking.PRN=PRN;
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1,38 +1,39 @@
|
||||
% /*!
|
||||
% * \file gps_l1_ca_pvt_read_pvt_dump.m
|
||||
% * \brief Read GNSS-SDR PVT lib dump binary file into MATLAB. The resulting
|
||||
%
|
||||
% \file gps_l1_ca_pvt_read_pvt_dump.m
|
||||
% \brief Read GNSS-SDR PVT lib dump binary file into MATLAB. The resulting
|
||||
% structure is compatible with the K.Borre MATLAB-based receiver.
|
||||
% * \author Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
% * -------------------------------------------------------------------------
|
||||
% *
|
||||
% * Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
||||
% *
|
||||
% * GNSS-SDR is a software defined Global Navigation
|
||||
% * Satellite Systems receiver
|
||||
% *
|
||||
% * This file is part of GNSS-SDR.
|
||||
% *
|
||||
% * GNSS-SDR 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 3 of the License, or
|
||||
% * at your option) any later version.
|
||||
% *
|
||||
% * GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
% *
|
||||
% * -------------------------------------------------------------------------
|
||||
% */
|
||||
% \author Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
|
||||
function [navSolutions] = gps_l1_ca_pvt_read_pvt_dump (filename, count)
|
||||
|
||||
%% usage: gps_l1_ca_pvt_read_pvt_dump (filename, [count])
|
||||
%%
|
||||
%% open GNSS-SDR PVT binary log file .dat and return the contents
|
||||
%%
|
||||
%% usage: gps_l1_ca_pvt_read_pvt_dump (filename, [count])
|
||||
%%
|
||||
%% open GNSS-SDR PVT binary log file .dat and return the contents
|
||||
%%
|
||||
%
|
||||
% // PVT GPS time
|
||||
% tmp_double=GPS_current_time;
|
||||
@ -59,56 +60,55 @@ function [navSolutions] = gps_l1_ca_pvt_read_pvt_dump (filename, count)
|
||||
% tmp_double=d_height_m;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
|
||||
m = nargchk (1,2,nargin);
|
||||
num_double_vars=8;
|
||||
double_size_bytes=8;
|
||||
skip_bytes_each_read=double_size_bytes*num_double_vars;
|
||||
bytes_shift=0;
|
||||
if (m)
|
||||
m = nargchk (1,2,nargin);
|
||||
num_double_vars=8;
|
||||
double_size_bytes=8;
|
||||
skip_bytes_each_read=double_size_bytes*num_double_vars;
|
||||
bytes_shift=0;
|
||||
if (m)
|
||||
usage (m);
|
||||
end
|
||||
end
|
||||
|
||||
if (nargin < 3)
|
||||
if (nargin < 3)
|
||||
count = Inf;
|
||||
end
|
||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
||||
f = fopen (filename, 'rb');
|
||||
if (f < 0)
|
||||
else
|
||||
GPS_current_time = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
ECEF_X = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
ECEF_Y = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
ECEF_Z = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
Clock_Offset = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
Lat = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
Long = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
Height = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
fclose (f);
|
||||
end
|
||||
|
||||
navSolutions.X=ECEF_X.';
|
||||
navSolutions.Y=ECEF_Y.';
|
||||
navSolutions.Z=ECEF_Z.';
|
||||
navSolutions.dt=Clock_Offset.';
|
||||
navSolutions.latitude=Lat.';
|
||||
navSolutions.longitude=Long.';
|
||||
navSolutions.height=Height.';
|
||||
navSolutions.TransmitTime=GPS_current_time.';
|
||||
end
|
||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
||||
f = fopen (filename, 'rb');
|
||||
if (f < 0)
|
||||
else
|
||||
GPS_current_time = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
ECEF_X = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
ECEF_Y = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
ECEF_Z = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
Clock_Offset = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
Lat = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
Long = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
Height = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
fclose (f);
|
||||
end
|
||||
|
||||
navSolutions.X=ECEF_X.';
|
||||
navSolutions.Y=ECEF_Y.';
|
||||
navSolutions.Z=ECEF_Z.';
|
||||
navSolutions.dt=Clock_Offset.';
|
||||
navSolutions.latitude=Lat.';
|
||||
navSolutions.longitude=Long.';
|
||||
navSolutions.height=Height.';
|
||||
navSolutions.TransmitTime=GPS_current_time.';
|
||||
|
@ -1,27 +1,52 @@
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Javier Arribas 2011
|
||||
|
||||
function [pvt_raw] = gps_l1_ca_read_pvt_raw_dump (channels, filename, count)
|
||||
|
||||
%% usage: read_tracking_dat (filename, [count])
|
||||
%%
|
||||
%% open GNSS-SDR pvt binary log file .dat and return the contents
|
||||
%%
|
||||
%% usage: read_tracking_dat (filename, [count])
|
||||
%%
|
||||
%% open GNSS-SDR pvt binary log file .dat and return the contents
|
||||
%%
|
||||
|
||||
m = nargchk (1,2,nargin);
|
||||
num_double_vars=3;
|
||||
double_size_bytes=8;
|
||||
skip_bytes_each_read=double_size_bytes*num_double_vars*channels;
|
||||
bytes_shift=0;
|
||||
if (m)
|
||||
m = nargchk (1,2,nargin);
|
||||
num_double_vars=3;
|
||||
double_size_bytes=8;
|
||||
skip_bytes_each_read=double_size_bytes*num_double_vars*channels;
|
||||
bytes_shift=0;
|
||||
if (m)
|
||||
usage (m);
|
||||
end
|
||||
end
|
||||
|
||||
if (nargin < 3)
|
||||
if (nargin < 3)
|
||||
count = Inf;
|
||||
end
|
||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
||||
f = fopen (filename, 'rb');
|
||||
if (f < 0)
|
||||
else
|
||||
end
|
||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
||||
f = fopen (filename, 'rb');
|
||||
if (f < 0)
|
||||
else
|
||||
for N=1:1:channels
|
||||
pvt_raw.Pseudorange_m(N,:) = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
@ -37,13 +62,13 @@ function [pvt_raw] = gps_l1_ca_read_pvt_raw_dump (channels, filename, count)
|
||||
fclose (f);
|
||||
|
||||
%%%%%%%% output vars %%%%%%%%
|
||||
% for (unsigned int i=0; i<d_nchannels ; i++)
|
||||
% {
|
||||
% tmp_double = in[i][0].Pseudorange_m;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% tmp_double = in[i][0].Pseudorange_symbol_shift;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% d_dump_file.write((char*)&d_tx_time, sizeof(double));
|
||||
% }
|
||||
end
|
||||
% for (unsigned int i=0; i<d_nchannels ; i++)
|
||||
% {
|
||||
% tmp_double = in[i][0].Pseudorange_m;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% tmp_double = in[i][0].Pseudorange_symbol_shift;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% d_dump_file.write((char*)&d_tx_time, sizeof(double));
|
||||
% }
|
||||
end
|
||||
|
||||
|
@ -1,48 +1,73 @@
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Javier Arribas 2011
|
||||
|
||||
function [telemetry] = gps_l1_ca_read_telemetry_dump (filename, count)
|
||||
|
||||
%% usage: read_tracking_dat (filename, [count])
|
||||
%%
|
||||
%% open GNSS-SDR tracking binary log file .dat and return the contents
|
||||
%%
|
||||
%% usage: read_tracking_dat (filename, [count])
|
||||
%%
|
||||
%% open GNSS-SDR tracking binary log file .dat and return the contents
|
||||
%%
|
||||
|
||||
m = nargchk (1,2,nargin);
|
||||
num_double_vars=3;
|
||||
double_size_bytes=8;
|
||||
skip_bytes_each_read=double_size_bytes*num_double_vars;
|
||||
bytes_shift=0;
|
||||
if (m)
|
||||
m = nargchk (1,2,nargin);
|
||||
num_double_vars=3;
|
||||
double_size_bytes=8;
|
||||
skip_bytes_each_read=double_size_bytes*num_double_vars;
|
||||
bytes_shift=0;
|
||||
if (m)
|
||||
usage (m);
|
||||
end
|
||||
end
|
||||
|
||||
if (nargin < 3)
|
||||
if (nargin < 3)
|
||||
count = Inf;
|
||||
end
|
||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
||||
f = fopen (filename, 'rb');
|
||||
if (f < 0)
|
||||
else
|
||||
telemetry.preamble_delay_ms = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
telemetry.prn_delay_ms = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
telemetry.Preamble_symbol_counter = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
end
|
||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
||||
f = fopen (filename, 'rb');
|
||||
if (f < 0)
|
||||
else
|
||||
telemetry.preamble_delay_ms = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
telemetry.prn_delay_ms = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
telemetry.Preamble_symbol_counter = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
fseek(f,bytes_shift,'bof'); % move to next interleaved
|
||||
|
||||
fclose (f);
|
||||
|
||||
%%%%%%%% output vars %%%%%%%%
|
||||
% {
|
||||
% double tmp_double;
|
||||
% tmp_double = current_synchro_data.Preamble_delay_ms;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% tmp_double = current_synchro_data.Prn_delay_ms;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% tmp_double = current_synchro_data.Preamble_symbol_counter;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% }
|
||||
end
|
||||
% {
|
||||
% double tmp_double;
|
||||
% tmp_double = current_synchro_data.Preamble_delay_ms;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% tmp_double = current_synchro_data.Prn_delay_ms;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% tmp_double = current_synchro_data.Preamble_symbol_counter;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% }
|
||||
end
|
||||
|
||||
|
@ -1,42 +1,8 @@
|
||||
% /*!
|
||||
% * \file plotNavigation.m
|
||||
% * \brief
|
||||
% Functions plots variations of coordinates over time and a 3D position
|
||||
% plot. It plots receiver coordinates in UTM system or coordinate offsets if
|
||||
% the true UTM receiver coordinates are provided.
|
||||
% * \author Darius Plausinaitis
|
||||
% * Modified by Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
% * -------------------------------------------------------------------------
|
||||
% *
|
||||
% * Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
||||
% *
|
||||
% * GNSS-SDR is a software defined Global Navigation
|
||||
% * Satellite Systems receiver
|
||||
% *
|
||||
% * This file is part of GNSS-SDR.
|
||||
% *
|
||||
% * GNSS-SDR 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 3 of the License, or
|
||||
% * at your option) any later version.
|
||||
% *
|
||||
% * GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
% *
|
||||
% * -------------------------------------------------------------------------
|
||||
% */
|
||||
|
||||
function plotNavigation(navSolutions, settings,plot_skyplot)
|
||||
%Functions plots variations of coordinates over time and a 3D position
|
||||
%plot. It plots receiver coordinates in UTM system or coordinate offsets if
|
||||
%the true UTM receiver coordinates are provided.
|
||||
% Function plots variations of coordinates over time and a 3D position
|
||||
% plot. It plots receiver coordinates in UTM system or coordinate offsets if
|
||||
% the true UTM receiver coordinates are provided.
|
||||
%
|
||||
%plotNavigation(navSolutions, settings)
|
||||
% plotNavigation(navSolutions, settings)
|
||||
%
|
||||
% Inputs:
|
||||
% navSolutions - Results from navigation solution function. It
|
||||
@ -47,13 +13,43 @@ function plotNavigation(navSolutions, settings,plot_skyplot)
|
||||
% plot_skyplot - If ==1 then use satellite coordinates to plot the
|
||||
% the satellite positions
|
||||
|
||||
% Darius Plausinaitis
|
||||
% Modified by Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
|
||||
function plotNavigation(navSolutions, settings,plot_skyplot)
|
||||
|
||||
|
||||
%% Plot results in the necessary data exists ==============================
|
||||
if (~isempty(navSolutions))
|
||||
|
||||
%% If reference position is not provided, then set reference position
|
||||
%% to the average postion
|
||||
if isnan(settings.truePosition.E) || isnan(settings.truePosition.N) ...
|
||||
|| isnan(settings.truePosition.U)
|
||||
|| isnan(settings.truePosition.U)
|
||||
|
||||
%=== Compute mean values ==========================================
|
||||
% Remove NaN-s or the output of the function MEAN will be NaN.
|
||||
@ -67,26 +63,26 @@ if (~isempty(navSolutions))
|
||||
meanLatitude = dms2mat(deg2dms(...
|
||||
mean(navSolutions.latitude(~isnan(navSolutions.latitude)))), -5);
|
||||
|
||||
LatLong_str=[num2str(meanLatitude(1)), 'º', ...
|
||||
num2str(meanLatitude(2)), '''', ...
|
||||
num2str(meanLatitude(3)), '''''', ...
|
||||
',', ...
|
||||
num2str(meanLongitude(1)), 'º', ...
|
||||
num2str(meanLongitude(2)), '''', ...
|
||||
num2str(meanLongitude(3)), '''''']
|
||||
LatLong_str=[num2str(meanLatitude(1)), '??', ...
|
||||
num2str(meanLatitude(2)), '''', ...
|
||||
num2str(meanLatitude(3)), '''''', ...
|
||||
',', ...
|
||||
num2str(meanLongitude(1)), '??', ...
|
||||
num2str(meanLongitude(2)), '''', ...
|
||||
num2str(meanLongitude(3)), '''''']
|
||||
|
||||
|
||||
|
||||
refPointLgText = ['Mean Position\newline Lat: ', ...
|
||||
num2str(meanLatitude(1)), '{\circ}', ...
|
||||
num2str(meanLatitude(2)), '{\prime}', ...
|
||||
num2str(meanLatitude(3)), '{\prime}{\prime}', ...
|
||||
'\newline Lng: ', ...
|
||||
num2str(meanLongitude(1)), '{\circ}', ...
|
||||
num2str(meanLongitude(2)), '{\prime}', ...
|
||||
num2str(meanLongitude(3)), '{\prime}{\prime}', ...
|
||||
'\newline Hgt: ', ...
|
||||
num2str(mean(navSolutions.height(~isnan(navSolutions.height))), '%+6.1f')];
|
||||
num2str(meanLatitude(1)), '{\circ}', ...
|
||||
num2str(meanLatitude(2)), '{\prime}', ...
|
||||
num2str(meanLatitude(3)), '{\prime}{\prime}', ...
|
||||
'\newline Lng: ', ...
|
||||
num2str(meanLongitude(1)), '{\circ}', ...
|
||||
num2str(meanLongitude(2)), '{\prime}', ...
|
||||
num2str(meanLongitude(3)), '{\prime}{\prime}', ...
|
||||
'\newline Hgt: ', ...
|
||||
num2str(mean(navSolutions.height(~isnan(navSolutions.height))), '%+6.1f')];
|
||||
|
||||
else
|
||||
% compute the mean error for static receiver
|
||||
@ -118,25 +114,25 @@ if (~isempty(navSolutions))
|
||||
handles(3, 1) = subplot(4, 2, [5, 7]);
|
||||
handles(3, 2) = subplot(4, 2, [6, 8]);
|
||||
|
||||
%% Plot all figures =======================================================
|
||||
%% Plot all figures =======================================================
|
||||
|
||||
%--- Coordinate differences in UTM system -----------------------------
|
||||
plot(handles(1, 1), [(navSolutions.E - refCoord.E)', ...
|
||||
(navSolutions.N - refCoord.N)',...
|
||||
(navSolutions.U - refCoord.U)']);
|
||||
(navSolutions.N - refCoord.N)',...
|
||||
(navSolutions.U - refCoord.U)']);
|
||||
|
||||
title (handles(1, 1), 'Coordinates variations in UTM system');
|
||||
legend(handles(1, 1), 'E', 'N', 'U');
|
||||
xlabel(handles(1, 1), ['Measurement period: ', ...
|
||||
num2str(settings.navSolPeriod), 'ms']);
|
||||
num2str(settings.navSolPeriod), 'ms']);
|
||||
ylabel(handles(1, 1), 'Variations (m)');
|
||||
grid (handles(1, 1));
|
||||
axis (handles(1, 1), 'tight');
|
||||
|
||||
%--- Position plot in UTM system --------------------------------------
|
||||
plot3 (handles(3, 1), navSolutions.E - refCoord.E, ...
|
||||
navSolutions.N - refCoord.N, ...
|
||||
navSolutions.U - refCoord.U, '+');
|
||||
navSolutions.N - refCoord.N, ...
|
||||
navSolutions.U - refCoord.U, '+');
|
||||
hold (handles(3, 1), 'on');
|
||||
|
||||
%Plot the reference point
|
||||
@ -157,12 +153,12 @@ if (~isempty(navSolutions))
|
||||
if (plot_skyplot==1)
|
||||
%--- Satellite sky plot -----------------------------------------------
|
||||
skyPlot(handles(3, 2), ...
|
||||
navSolutions.channel.az, ...
|
||||
navSolutions.channel.el, ...
|
||||
navSolutions.channel.PRN(:, 1));
|
||||
navSolutions.channel.az, ...
|
||||
navSolutions.channel.el, ...
|
||||
navSolutions.channel.PRN(:, 1));
|
||||
|
||||
title (handles(3, 2), ['Sky plot (mean PDOP: ', ...
|
||||
num2str(mean(navSolutions.DOP(2,:))), ')']);
|
||||
num2str(mean(navSolutions.DOP(2,:))), ')']);
|
||||
end
|
||||
|
||||
else
|
||||
|
@ -1,7 +1,7 @@
|
||||
function plotTracking(channelList, trackResults, settings)
|
||||
%This function plots the tracking results for the given channel list.
|
||||
% This function plots the tracking results for the given channel list.
|
||||
%
|
||||
%plotTracking(channelList, trackResults, settings)
|
||||
% plotTracking(channelList, trackResults, settings)
|
||||
%
|
||||
% Inputs:
|
||||
% channelList - list of channels to be plotted.
|
||||
@ -30,8 +30,6 @@ function plotTracking(channelList, trackResults, settings)
|
||||
%USA.
|
||||
%--------------------------------------------------------------------------
|
||||
|
||||
%CVS record:
|
||||
%$Id: plotTracking.m,v 1.5.2.23 2006/08/14 14:45:14 dpl Exp $
|
||||
|
||||
% Protection - if the list contains incorrect channel numbers
|
||||
channelList = intersect(channelList, 1:settings.numberOfChannels);
|
||||
@ -39,7 +37,7 @@ channelList = intersect(channelList, 1:settings.numberOfChannels);
|
||||
%=== For all listed channels ==============================================
|
||||
for channelNr = channelList
|
||||
|
||||
%% Select (or create) and clear the figure ================================
|
||||
%% Select (or create) and clear the figure ================================
|
||||
% The number 200 is added just for more convenient handling of the open
|
||||
% figure windows, when many figures are closed and reopened.
|
||||
% Figures drawn or opened by the user, will not be "overwritten" by
|
||||
@ -48,142 +46,142 @@ for channelNr = channelList
|
||||
figure(channelNr +200);
|
||||
clf(channelNr +200);
|
||||
set(channelNr +200, 'Name', ['Channel ', num2str(channelNr), ...
|
||||
' (PRN ', ...
|
||||
num2str(trackResults(channelNr).PRN(end-1)), ...
|
||||
') results']);
|
||||
' (PRN ', ...
|
||||
num2str(trackResults(channelNr).PRN(end-1)), ...
|
||||
') results']);
|
||||
|
||||
%% Draw axes ==============================================================
|
||||
% Row 1
|
||||
handles(1, 1) = subplot(4, 3, 1);
|
||||
handles(1, 2) = subplot(4, 3, [2 3]);
|
||||
% Row 2
|
||||
handles(2, 1) = subplot(4, 3, 4);
|
||||
handles(2, 2) = subplot(4, 3, [5 6]);
|
||||
% Row 3
|
||||
handles(3, 1) = subplot(4, 3, 7);
|
||||
handles(3, 2) = subplot(4, 3, 8);
|
||||
handles(3, 3) = subplot(4, 3, 9);
|
||||
% Row 4
|
||||
handles(4, 1) = subplot(4, 3, 10);
|
||||
handles(4, 2) = subplot(4, 3, 11);
|
||||
handles(4, 3) = subplot(4, 3, 12);
|
||||
%% Draw axes ==============================================================
|
||||
% Row 1
|
||||
handles(1, 1) = subplot(4, 3, 1);
|
||||
handles(1, 2) = subplot(4, 3, [2 3]);
|
||||
% Row 2
|
||||
handles(2, 1) = subplot(4, 3, 4);
|
||||
handles(2, 2) = subplot(4, 3, [5 6]);
|
||||
% Row 3
|
||||
handles(3, 1) = subplot(4, 3, 7);
|
||||
handles(3, 2) = subplot(4, 3, 8);
|
||||
handles(3, 3) = subplot(4, 3, 9);
|
||||
% Row 4
|
||||
handles(4, 1) = subplot(4, 3, 10);
|
||||
handles(4, 2) = subplot(4, 3, 11);
|
||||
handles(4, 3) = subplot(4, 3, 12);
|
||||
|
||||
|
||||
%% Plot all figures =======================================================
|
||||
%% Plot all figures =======================================================
|
||||
|
||||
timeAxisInSeconds = (1:settings.msToProcess)/1000;
|
||||
timeAxisInSeconds = (1:settings.msToProcess)/1000;
|
||||
|
||||
%----- Discrete-Time Scatter Plot ---------------------------------
|
||||
plot(handles(1, 1), trackResults(channelNr).I_P,...
|
||||
trackResults(channelNr).Q_P, ...
|
||||
'.');
|
||||
%----- Discrete-Time Scatter Plot ---------------------------------
|
||||
plot(handles(1, 1), trackResults(channelNr).I_P,...
|
||||
trackResults(channelNr).Q_P, ...
|
||||
'.');
|
||||
|
||||
grid (handles(1, 1));
|
||||
axis (handles(1, 1), 'equal');
|
||||
title (handles(1, 1), 'Discrete-Time Scatter Plot');
|
||||
xlabel(handles(1, 1), 'I prompt');
|
||||
ylabel(handles(1, 1), 'Q prompt');
|
||||
grid (handles(1, 1));
|
||||
axis (handles(1, 1), 'equal');
|
||||
title (handles(1, 1), 'Discrete-Time Scatter Plot');
|
||||
xlabel(handles(1, 1), 'I prompt');
|
||||
ylabel(handles(1, 1), 'Q prompt');
|
||||
|
||||
%----- Nav bits ---------------------------------------------------
|
||||
plot (handles(1, 2), timeAxisInSeconds, ...
|
||||
trackResults(channelNr).I_P);
|
||||
%----- Nav bits ---------------------------------------------------
|
||||
plot (handles(1, 2), timeAxisInSeconds, ...
|
||||
trackResults(channelNr).I_P);
|
||||
|
||||
grid (handles(1, 2));
|
||||
title (handles(1, 2), 'Bits of the navigation message');
|
||||
xlabel(handles(1, 2), 'Time (s)');
|
||||
axis (handles(1, 2), 'tight');
|
||||
grid (handles(1, 2));
|
||||
title (handles(1, 2), 'Bits of the navigation message');
|
||||
xlabel(handles(1, 2), 'Time (s)');
|
||||
axis (handles(1, 2), 'tight');
|
||||
|
||||
%----- PLL discriminator unfiltered--------------------------------
|
||||
plot (handles(2, 1), timeAxisInSeconds, ...
|
||||
trackResults(channelNr).pllDiscr, 'r');
|
||||
%----- PLL discriminator unfiltered--------------------------------
|
||||
plot (handles(2, 1), timeAxisInSeconds, ...
|
||||
trackResults(channelNr).pllDiscr, 'r');
|
||||
|
||||
grid (handles(2, 1));
|
||||
axis (handles(2, 1), 'tight');
|
||||
xlabel(handles(2, 1), 'Time (s)');
|
||||
ylabel(handles(2, 1), 'Amplitude');
|
||||
title (handles(2, 1), 'Raw PLL discriminator');
|
||||
grid (handles(2, 1));
|
||||
axis (handles(2, 1), 'tight');
|
||||
xlabel(handles(2, 1), 'Time (s)');
|
||||
ylabel(handles(2, 1), 'Amplitude');
|
||||
title (handles(2, 1), 'Raw PLL discriminator');
|
||||
|
||||
%----- Correlation ------------------------------------------------
|
||||
plot(handles(2, 2), timeAxisInSeconds, ...
|
||||
[sqrt(trackResults(channelNr).I_E.^2 + ...
|
||||
trackResults(channelNr).Q_E.^2)', ...
|
||||
sqrt(trackResults(channelNr).I_P.^2 + ...
|
||||
trackResults(channelNr).Q_P.^2)', ...
|
||||
sqrt(trackResults(channelNr).I_L.^2 + ...
|
||||
trackResults(channelNr).Q_L.^2)'], ...
|
||||
'-*');
|
||||
%----- Correlation ------------------------------------------------
|
||||
plot(handles(2, 2), timeAxisInSeconds, ...
|
||||
[sqrt(trackResults(channelNr).I_E.^2 + ...
|
||||
trackResults(channelNr).Q_E.^2)', ...
|
||||
sqrt(trackResults(channelNr).I_P.^2 + ...
|
||||
trackResults(channelNr).Q_P.^2)', ...
|
||||
sqrt(trackResults(channelNr).I_L.^2 + ...
|
||||
trackResults(channelNr).Q_L.^2)'], ...
|
||||
'-*');
|
||||
|
||||
grid (handles(2, 2));
|
||||
title (handles(2, 2), 'Correlation results');
|
||||
xlabel(handles(2, 2), 'Time (s)');
|
||||
axis (handles(2, 2), 'tight');
|
||||
grid (handles(2, 2));
|
||||
title (handles(2, 2), 'Correlation results');
|
||||
xlabel(handles(2, 2), 'Time (s)');
|
||||
axis (handles(2, 2), 'tight');
|
||||
|
||||
hLegend = legend(handles(2, 2), '$\sqrt{I_{E}^2 + Q_{E}^2}$', ...
|
||||
'$\sqrt{I_{P}^2 + Q_{P}^2}$', ...
|
||||
'$\sqrt{I_{L}^2 + Q_{L}^2}$');
|
||||
hLegend = legend(handles(2, 2), '$\sqrt{I_{E}^2 + Q_{E}^2}$', ...
|
||||
'$\sqrt{I_{P}^2 + Q_{P}^2}$', ...
|
||||
'$\sqrt{I_{L}^2 + Q_{L}^2}$');
|
||||
|
||||
%set interpreter from tex to latex. This will draw \sqrt correctly
|
||||
set(hLegend, 'Interpreter', 'Latex');
|
||||
%set interpreter from tex to latex. This will draw \sqrt correctly
|
||||
set(hLegend, 'Interpreter', 'Latex');
|
||||
|
||||
%----- PLL discriminator filtered----------------------------------
|
||||
plot (handles(3, 1), timeAxisInSeconds, ...
|
||||
trackResults(channelNr).pllDiscrFilt(1:settings.msToProcess), 'b');
|
||||
%----- PLL discriminator filtered----------------------------------
|
||||
plot (handles(3, 1), timeAxisInSeconds, ...
|
||||
trackResults(channelNr).pllDiscrFilt(1:settings.msToProcess), 'b');
|
||||
|
||||
grid (handles(3, 1));
|
||||
axis (handles(3, 1), 'tight');
|
||||
xlabel(handles(3, 1), 'Time (s)');
|
||||
ylabel(handles(3, 1), 'Amplitude');
|
||||
title (handles(3, 1), 'Filtered PLL discriminator');
|
||||
grid (handles(3, 1));
|
||||
axis (handles(3, 1), 'tight');
|
||||
xlabel(handles(3, 1), 'Time (s)');
|
||||
ylabel(handles(3, 1), 'Amplitude');
|
||||
title (handles(3, 1), 'Filtered PLL discriminator');
|
||||
|
||||
%----- DLL discriminator unfiltered--------------------------------
|
||||
plot (handles(3, 2), timeAxisInSeconds, ...
|
||||
trackResults(channelNr).dllDiscr, 'r');
|
||||
%----- DLL discriminator unfiltered--------------------------------
|
||||
plot (handles(3, 2), timeAxisInSeconds, ...
|
||||
trackResults(channelNr).dllDiscr, 'r');
|
||||
|
||||
grid (handles(3, 2));
|
||||
axis (handles(3, 2), 'tight');
|
||||
xlabel(handles(3, 2), 'Time (s)');
|
||||
ylabel(handles(3, 2), 'Amplitude');
|
||||
title (handles(3, 2), 'Raw DLL discriminator');
|
||||
grid (handles(3, 2));
|
||||
axis (handles(3, 2), 'tight');
|
||||
xlabel(handles(3, 2), 'Time (s)');
|
||||
ylabel(handles(3, 2), 'Amplitude');
|
||||
title (handles(3, 2), 'Raw DLL discriminator');
|
||||
|
||||
%----- DLL discriminator filtered----------------------------------
|
||||
plot (handles(3, 3), timeAxisInSeconds, ...
|
||||
trackResults(channelNr).dllDiscrFilt, 'b');
|
||||
%----- DLL discriminator filtered----------------------------------
|
||||
plot (handles(3, 3), timeAxisInSeconds, ...
|
||||
trackResults(channelNr).dllDiscrFilt, 'b');
|
||||
|
||||
grid (handles(3, 3));
|
||||
axis (handles(3, 3), 'tight');
|
||||
xlabel(handles(3, 3), 'Time (s)');
|
||||
ylabel(handles(3, 3), 'Amplitude');
|
||||
title (handles(3, 3), 'Filtered DLL discriminator');
|
||||
grid (handles(3, 3));
|
||||
axis (handles(3, 3), 'tight');
|
||||
xlabel(handles(3, 3), 'Time (s)');
|
||||
ylabel(handles(3, 3), 'Amplitude');
|
||||
title (handles(3, 3), 'Filtered DLL discriminator');
|
||||
|
||||
%----- CNo for signal----------------------------------
|
||||
plot (handles(4, 1), timeAxisInSeconds, ...
|
||||
trackResults(channelNr).CNo(1:settings.msToProcess), 'b');
|
||||
%----- CNo for signal----------------------------------
|
||||
plot (handles(4, 1), timeAxisInSeconds, ...
|
||||
trackResults(channelNr).CNo(1:settings.msToProcess), 'b');
|
||||
|
||||
grid (handles(4, 1));
|
||||
axis (handles(4, 1), 'tight');
|
||||
xlabel(handles(4, 1), 'Time (s)');
|
||||
ylabel(handles(4, 1), 'CNo (dB-Hz)');
|
||||
title (handles(4, 1), 'Carrier to Noise Ratio');
|
||||
grid (handles(4, 1));
|
||||
axis (handles(4, 1), 'tight');
|
||||
xlabel(handles(4, 1), 'Time (s)');
|
||||
ylabel(handles(4, 1), 'CNo (dB-Hz)');
|
||||
title (handles(4, 1), 'Carrier to Noise Ratio');
|
||||
|
||||
%----- Carrier Frequency --------------------------------
|
||||
plot (handles(4, 2), timeAxisInSeconds(2:end), ...
|
||||
trackResults(channelNr).carrFreq(2:settings.msToProcess), 'Color',[0.42 0.25 0.39]);
|
||||
%----- Carrier Frequency --------------------------------
|
||||
plot (handles(4, 2), timeAxisInSeconds(2:end), ...
|
||||
trackResults(channelNr).carrFreq(2:settings.msToProcess), 'Color',[0.42 0.25 0.39]);
|
||||
|
||||
grid (handles(4, 2));
|
||||
axis (handles(4, 2));
|
||||
xlabel(handles(4, 2), 'Time (s)');
|
||||
ylabel(handles(4, 2), 'Freq (hz)');
|
||||
title (handles(4, 2), 'Carrier Freq');
|
||||
grid (handles(4, 2));
|
||||
axis (handles(4, 2));
|
||||
xlabel(handles(4, 2), 'Time (s)');
|
||||
ylabel(handles(4, 2), 'Freq (hz)');
|
||||
title (handles(4, 2), 'Carrier Freq');
|
||||
|
||||
%----- Code Frequency----------------------------------
|
||||
%--- Skip sample 0 to help with results display
|
||||
plot (handles(4, 3), timeAxisInSeconds(2:end), ...
|
||||
trackResults(channelNr).codeFreq(2:settings.msToProcess), 'Color',[0.2 0.3 0.49]);
|
||||
%----- Code Frequency----------------------------------
|
||||
%--- Skip sample 0 to help with results display
|
||||
plot (handles(4, 3), timeAxisInSeconds(2:end), ...
|
||||
trackResults(channelNr).codeFreq(2:settings.msToProcess), 'Color',[0.2 0.3 0.49]);
|
||||
|
||||
grid (handles(4, 3));
|
||||
axis (handles(4, 3), 'tight');
|
||||
xlabel(handles(4, 3), 'Time (s)');
|
||||
ylabel(handles(4, 3), 'Freq (Hz)');
|
||||
title (handles(4, 3), 'Code Freq');
|
||||
grid (handles(4, 3));
|
||||
axis (handles(4, 3), 'tight');
|
||||
xlabel(handles(4, 3), 'Time (s)');
|
||||
ylabel(handles(4, 3), 'Freq (Hz)');
|
||||
title (handles(4, 3), 'Code Freq');
|
||||
|
||||
end % for channelNr = channelList
|
||||
|
@ -1,7 +1,7 @@
|
||||
function plotVEMLTracking(channelList, trackResults, settings)
|
||||
%This function plots the tracking results for the given channel list.
|
||||
% This function plots the tracking results for the given channel list.
|
||||
%
|
||||
%plotTracking(channelList, trackResults, settings)
|
||||
% plotTracking(channelList, trackResults, settings)
|
||||
%
|
||||
% Inputs:
|
||||
% channelList - list of channels to be plotted.
|
||||
@ -30,16 +30,13 @@ function plotVEMLTracking(channelList, trackResults, settings)
|
||||
%USA.
|
||||
%--------------------------------------------------------------------------
|
||||
|
||||
%CVS record:
|
||||
%$Id: plotTracking.m,v 1.5.2.23 2006/08/14 14:45:14 dpl Exp $
|
||||
|
||||
% Protection - if the list contains incorrect channel numbers
|
||||
channelList = intersect(channelList, 1:settings.numberOfChannels);
|
||||
|
||||
%=== For all listed channels ==============================================
|
||||
for channelNr = channelList
|
||||
|
||||
%% Select (or create) and clear the figure ================================
|
||||
%% Select (or create) and clear the figure ================================
|
||||
% The number 200 is added just for more convenient handling of the open
|
||||
% figure windows, when many figures are closed and reopened.
|
||||
% Figures drawn or opened by the user, will not be "overwritten" by
|
||||
@ -48,118 +45,118 @@ for channelNr = channelList
|
||||
figure(channelNr +200);
|
||||
clf(channelNr +200);
|
||||
set(channelNr +200, 'Name', ['Channel ', num2str(channelNr), ...
|
||||
' (PRN ', ...
|
||||
num2str(trackResults(channelNr).PRN(end-1)), ...
|
||||
') results']);
|
||||
' (PRN ', ...
|
||||
num2str(trackResults(channelNr).PRN(end-1)), ...
|
||||
') results']);
|
||||
|
||||
%% Draw axes ==============================================================
|
||||
% Row 1
|
||||
handles(1, 1) = subplot(3, 3, 1);
|
||||
handles(1, 2) = subplot(3, 3, [2 3]);
|
||||
% Row 2
|
||||
handles(2, 1) = subplot(3, 3, 4);
|
||||
handles(2, 2) = subplot(3, 3, [5 6]);
|
||||
% Row 3
|
||||
handles(3, 1) = subplot(3, 3, 7);
|
||||
handles(3, 2) = subplot(3, 3, 8);
|
||||
handles(3, 3) = subplot(3, 3, 9);
|
||||
%% Draw axes ==============================================================
|
||||
% Row 1
|
||||
handles(1, 1) = subplot(3, 3, 1);
|
||||
handles(1, 2) = subplot(3, 3, [2 3]);
|
||||
% Row 2
|
||||
handles(2, 1) = subplot(3, 3, 4);
|
||||
handles(2, 2) = subplot(3, 3, [5 6]);
|
||||
% Row 3
|
||||
handles(3, 1) = subplot(3, 3, 7);
|
||||
handles(3, 2) = subplot(3, 3, 8);
|
||||
handles(3, 3) = subplot(3, 3, 9);
|
||||
|
||||
%% Plot all figures =======================================================
|
||||
%% Plot all figures =======================================================
|
||||
|
||||
timeAxisInSeconds = (1:4:settings.msToProcess)/1000;
|
||||
timeAxisInSeconds = (1:4:settings.msToProcess)/1000;
|
||||
|
||||
%----- Discrete-Time Scatter Plot ---------------------------------
|
||||
plot(handles(1, 1), trackResults(channelNr).data_I,...
|
||||
trackResults(channelNr).data_Q, ...
|
||||
'.');
|
||||
%----- Discrete-Time Scatter Plot ---------------------------------
|
||||
plot(handles(1, 1), trackResults(channelNr).data_I,...
|
||||
trackResults(channelNr).data_Q, ...
|
||||
'.');
|
||||
|
||||
grid (handles(1, 1));
|
||||
axis (handles(1, 1), 'equal');
|
||||
title (handles(1, 1), 'Discrete-Time Scatter Plot');
|
||||
xlabel(handles(1, 1), 'I prompt');
|
||||
ylabel(handles(1, 1), 'Q prompt');
|
||||
grid (handles(1, 1));
|
||||
axis (handles(1, 1), 'equal');
|
||||
title (handles(1, 1), 'Discrete-Time Scatter Plot');
|
||||
xlabel(handles(1, 1), 'I prompt');
|
||||
ylabel(handles(1, 1), 'Q prompt');
|
||||
|
||||
%----- Nav bits ---------------------------------------------------
|
||||
t = (1:length(trackResults(channelNr).data_I));
|
||||
plot (handles(1, 2), t, ...
|
||||
trackResults(channelNr).data_I);
|
||||
%----- Nav bits ---------------------------------------------------
|
||||
t = (1:length(trackResults(channelNr).data_I));
|
||||
plot (handles(1, 2), t, ...
|
||||
trackResults(channelNr).data_I);
|
||||
|
||||
grid (handles(1, 2));
|
||||
title (handles(1, 2), 'Bits of the navigation message');
|
||||
xlabel(handles(1, 2), 'Time (s)');
|
||||
axis (handles(1, 2), 'tight');
|
||||
grid (handles(1, 2));
|
||||
title (handles(1, 2), 'Bits of the navigation message');
|
||||
xlabel(handles(1, 2), 'Time (s)');
|
||||
axis (handles(1, 2), 'tight');
|
||||
|
||||
%----- PLL discriminator unfiltered--------------------------------
|
||||
t = (1:length(trackResults(channelNr).pllDiscr));
|
||||
plot (handles(2, 1), t, ...
|
||||
trackResults(channelNr).pllDiscr, 'r');
|
||||
%----- PLL discriminator unfiltered--------------------------------
|
||||
t = (1:length(trackResults(channelNr).pllDiscr));
|
||||
plot (handles(2, 1), t, ...
|
||||
trackResults(channelNr).pllDiscr, 'r');
|
||||
|
||||
grid (handles(2, 1));
|
||||
axis (handles(2, 1), 'tight');
|
||||
xlabel(handles(2, 1), 'Time (s)');
|
||||
ylabel(handles(2, 1), 'Amplitude');
|
||||
title (handles(2, 1), 'Raw PLL discriminator');
|
||||
grid (handles(2, 1));
|
||||
axis (handles(2, 1), 'tight');
|
||||
xlabel(handles(2, 1), 'Time (s)');
|
||||
ylabel(handles(2, 1), 'Amplitude');
|
||||
title (handles(2, 1), 'Raw PLL discriminator');
|
||||
|
||||
%----- Correlation ------------------------------------------------
|
||||
t = (1:length(trackResults(channelNr).I_VE));
|
||||
plot(handles(2, 2), t, ...
|
||||
[sqrt(trackResults(channelNr).I_VE.^2 + ...
|
||||
trackResults(channelNr).Q_VE.^2)', ...
|
||||
sqrt(trackResults(channelNr).I_E.^2 + ...
|
||||
trackResults(channelNr).Q_E.^2)', ...
|
||||
sqrt(trackResults(channelNr).I_P.^2 + ...
|
||||
trackResults(channelNr).Q_P.^2)', ...
|
||||
sqrt(trackResults(channelNr).I_L.^2 + ...
|
||||
trackResults(channelNr).Q_L.^2)', ...
|
||||
sqrt(trackResults(channelNr).I_VL.^2 + ...
|
||||
trackResults(channelNr).Q_VL.^2)'], ...
|
||||
'-*');
|
||||
%----- Correlation ------------------------------------------------
|
||||
t = (1:length(trackResults(channelNr).I_VE));
|
||||
plot(handles(2, 2), t, ...
|
||||
[sqrt(trackResults(channelNr).I_VE.^2 + ...
|
||||
trackResults(channelNr).Q_VE.^2)', ...
|
||||
sqrt(trackResults(channelNr).I_E.^2 + ...
|
||||
trackResults(channelNr).Q_E.^2)', ...
|
||||
sqrt(trackResults(channelNr).I_P.^2 + ...
|
||||
trackResults(channelNr).Q_P.^2)', ...
|
||||
sqrt(trackResults(channelNr).I_L.^2 + ...
|
||||
trackResults(channelNr).Q_L.^2)', ...
|
||||
sqrt(trackResults(channelNr).I_VL.^2 + ...
|
||||
trackResults(channelNr).Q_VL.^2)'], ...
|
||||
'-*');
|
||||
|
||||
grid (handles(2, 2));
|
||||
title (handles(2, 2), 'Correlation results');
|
||||
xlabel(handles(2, 2), 'Time (s)');
|
||||
axis (handles(2, 2), 'tight');
|
||||
grid (handles(2, 2));
|
||||
title (handles(2, 2), 'Correlation results');
|
||||
xlabel(handles(2, 2), 'Time (s)');
|
||||
axis (handles(2, 2), 'tight');
|
||||
|
||||
hLegend = legend(handles(2, 2), '$\sqrt{I_{VE}^2 + Q_{VE}^2}$', ...
|
||||
'$\sqrt{I_{E}^2 + Q_{E}^2}$', ...
|
||||
'$\sqrt{I_{P}^2 + Q_{P}^2}$', ...
|
||||
'$\sqrt{I_{L}^2 + Q_{L}^2}$', ...
|
||||
'$\sqrt{I_{VL}^2 + Q_{VL}^2}$');
|
||||
hLegend = legend(handles(2, 2), '$\sqrt{I_{VE}^2 + Q_{VE}^2}$', ...
|
||||
'$\sqrt{I_{E}^2 + Q_{E}^2}$', ...
|
||||
'$\sqrt{I_{P}^2 + Q_{P}^2}$', ...
|
||||
'$\sqrt{I_{L}^2 + Q_{L}^2}$', ...
|
||||
'$\sqrt{I_{VL}^2 + Q_{VL}^2}$');
|
||||
|
||||
%set interpreter from tex to latex. This will draw \sqrt correctly
|
||||
set(hLegend, 'Interpreter', 'Latex');
|
||||
%set interpreter from tex to latex. This will draw \sqrt correctly
|
||||
set(hLegend, 'Interpreter', 'Latex');
|
||||
|
||||
%----- PLL discriminator filtered----------------------------------
|
||||
t = (1:length(trackResults(channelNr).pllDiscrFilt));
|
||||
plot (handles(3, 1), t, ...
|
||||
trackResults(channelNr).pllDiscrFilt, 'b');
|
||||
%----- PLL discriminator filtered----------------------------------
|
||||
t = (1:length(trackResults(channelNr).pllDiscrFilt));
|
||||
plot (handles(3, 1), t, ...
|
||||
trackResults(channelNr).pllDiscrFilt, 'b');
|
||||
|
||||
grid (handles(3, 1));
|
||||
axis (handles(3, 1), 'tight');
|
||||
xlabel(handles(3, 1), 'Time (s)');
|
||||
ylabel(handles(3, 1), 'Amplitude');
|
||||
title (handles(3, 1), 'Filtered PLL discriminator');
|
||||
grid (handles(3, 1));
|
||||
axis (handles(3, 1), 'tight');
|
||||
xlabel(handles(3, 1), 'Time (s)');
|
||||
ylabel(handles(3, 1), 'Amplitude');
|
||||
title (handles(3, 1), 'Filtered PLL discriminator');
|
||||
|
||||
%----- DLL discriminator unfiltered--------------------------------
|
||||
t = (1:length(trackResults(channelNr).dllDiscr));
|
||||
plot (handles(3, 2), t, ...
|
||||
trackResults(channelNr).dllDiscr, 'r');
|
||||
%----- DLL discriminator unfiltered--------------------------------
|
||||
t = (1:length(trackResults(channelNr).dllDiscr));
|
||||
plot (handles(3, 2), t, ...
|
||||
trackResults(channelNr).dllDiscr, 'r');
|
||||
|
||||
grid (handles(3, 2));
|
||||
axis (handles(3, 2), 'tight');
|
||||
xlabel(handles(3, 2), 'Time (s)');
|
||||
ylabel(handles(3, 2), 'Amplitude');
|
||||
title (handles(3, 2), 'Raw DLL discriminator');
|
||||
grid (handles(3, 2));
|
||||
axis (handles(3, 2), 'tight');
|
||||
xlabel(handles(3, 2), 'Time (s)');
|
||||
ylabel(handles(3, 2), 'Amplitude');
|
||||
title (handles(3, 2), 'Raw DLL discriminator');
|
||||
|
||||
%----- DLL discriminator filtered----------------------------------
|
||||
t = (1:length(trackResults(channelNr).dllDiscrFilt));
|
||||
plot (handles(3, 3), t, ...
|
||||
trackResults(channelNr).dllDiscrFilt, 'b');
|
||||
%----- DLL discriminator filtered----------------------------------
|
||||
t = (1:length(trackResults(channelNr).dllDiscrFilt));
|
||||
plot (handles(3, 3), t, ...
|
||||
trackResults(channelNr).dllDiscrFilt, 'b');
|
||||
|
||||
grid (handles(3, 3));
|
||||
axis (handles(3, 3), 'tight');
|
||||
xlabel(handles(3, 3), 'Time (s)');
|
||||
ylabel(handles(3, 3), 'Amplitude');
|
||||
title (handles(3, 3), 'Filtered DLL discriminator');
|
||||
grid (handles(3, 3));
|
||||
axis (handles(3, 3), 'tight');
|
||||
xlabel(handles(3, 3), 'Time (s)');
|
||||
ylabel(handles(3, 3), 'Amplitude');
|
||||
title (handles(3, 3), 'Filtered DLL discriminator');
|
||||
|
||||
end % for channelNr = channelList
|
||||
|
@ -1,50 +1,54 @@
|
||||
% Usage: read_complex_binary (filename, [count], [start_sample])
|
||||
%
|
||||
% Copyright 2001 Free Software Foundation, Inc.
|
||||
% Opens filename and returns the contents as a column vector,
|
||||
% treating them as 32 bit complex numbers
|
||||
%
|
||||
% This file is part of GNU Radio
|
||||
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% GNU Radio is free software; you can redistribute it and/or modify
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3, or (at your option)
|
||||
% any later version.
|
||||
% the Free Software Foundation, either version 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNU Radio is distributed in the hope that it will be useful,
|
||||
% GNSS-SDR 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 GNU Radio; see the file COPYING. If not, write to
|
||||
% the Free Software Foundation, Inc., 51 Franklin Street,
|
||||
% Boston, MA 02110-1301, USA.
|
||||
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
|
||||
function v = read_complex_binary (filename, count, start_sample)
|
||||
|
||||
%% usage: read_complex_binary (filename, [count], [start_sample])
|
||||
%%
|
||||
%% open filename and return the contents as a column vector,
|
||||
%% treating them as 32 bit complex numbers
|
||||
%%
|
||||
|
||||
m = nargchk (1,2,nargin);
|
||||
if (m)
|
||||
m = nargchk (1,2,nargin);
|
||||
if (m)
|
||||
%usage (m);
|
||||
end
|
||||
end
|
||||
|
||||
if (nargin < 2)
|
||||
if (nargin < 2)
|
||||
count = Inf;
|
||||
start_sample=0;
|
||||
end
|
||||
end
|
||||
|
||||
if (nargin < 3)
|
||||
if (nargin < 3)
|
||||
start_sample=0;
|
||||
end
|
||||
end
|
||||
|
||||
f = fopen (filename, 'rb');
|
||||
if (f < 0)
|
||||
f = fopen (filename, 'rb');
|
||||
if (f < 0)
|
||||
v = 0;
|
||||
else
|
||||
else
|
||||
if (start_sample>0)
|
||||
bytes_per_sample=4;
|
||||
fseek(f,start_sample*bytes_per_sample,'bof');
|
||||
@ -54,4 +58,4 @@ function v = read_complex_binary (filename, count, start_sample)
|
||||
v = t(1,:) + t(2,:)*i;
|
||||
[r, c] = size (v);
|
||||
v = reshape (v, c, r);
|
||||
end
|
||||
end
|
||||
|
@ -1,48 +1,52 @@
|
||||
% Usage: read_complex_binary (filename, [count])
|
||||
%
|
||||
% Copyright 2001 Free Software Foundation, Inc.
|
||||
% Opens filename and returns the contents as a column vector,
|
||||
% treating them as 32 bit complex numbers
|
||||
%
|
||||
% This file is part of GNU Radio
|
||||
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% GNU Radio is free software; you can redistribute it and/or modify
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3, or (at your option)
|
||||
% any later version.
|
||||
% the Free Software Foundation, either version 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNU Radio is distributed in the hope that it will be useful,
|
||||
% GNSS-SDR 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 GNU Radio; see the file COPYING. If not, write to
|
||||
% the Free Software Foundation, Inc., 51 Franklin Street,
|
||||
% Boston, MA 02110-1301, USA.
|
||||
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
|
||||
function v = read_complex_char_binary (filename, count)
|
||||
|
||||
%% usage: read_complex_binary (filename, [count])
|
||||
%%
|
||||
%% open filename and return the contents as a column vector,
|
||||
%% treating them as 32 bit complex numbers
|
||||
%%
|
||||
|
||||
m = nargchk (1,2,nargin);
|
||||
if (m)
|
||||
m = nargchk (1,2,nargin);
|
||||
if (m)
|
||||
usage (m);
|
||||
end
|
||||
end
|
||||
|
||||
if (nargin < 2)
|
||||
if (nargin < 2)
|
||||
count = Inf;
|
||||
end
|
||||
end
|
||||
|
||||
f = fopen (filename, 'rb');
|
||||
if (f < 0)
|
||||
f = fopen (filename, 'rb');
|
||||
if (f < 0)
|
||||
v = 0;
|
||||
else
|
||||
else
|
||||
t = fread (f, [2, count], 'int8');
|
||||
fclose (f);
|
||||
v = t(1,:) + t(2,:)*i;
|
||||
[r, c] = size (v);
|
||||
v = reshape (v, c, r);
|
||||
end
|
||||
end
|
||||
|
@ -1,48 +1,52 @@
|
||||
% Usage: read_complex_binary (filename, [count])
|
||||
%
|
||||
% Copyright 2001 Free Software Foundation, Inc.
|
||||
% Opens filename and returns the contents as a column vector,
|
||||
% treating them as 32 bit complex numbers
|
||||
%
|
||||
% This file is part of GNU Radio
|
||||
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% GNU Radio is free software; you can redistribute it and/or modify
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3, or (at your option)
|
||||
% any later version.
|
||||
% the Free Software Foundation, either version 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNU Radio is distributed in the hope that it will be useful,
|
||||
% GNSS-SDR 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 GNU Radio; see the file COPYING. If not, write to
|
||||
% the Free Software Foundation, Inc., 51 Franklin Street,
|
||||
% Boston, MA 02110-1301, USA.
|
||||
% along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
|
||||
function v = read_complex_short_binary (filename, count)
|
||||
|
||||
%% usage: read_complex_binary (filename, [count])
|
||||
%%
|
||||
%% open filename and return the contents as a column vector,
|
||||
%% treating them as 32 bit complex numbers
|
||||
%%
|
||||
|
||||
m = nargchk (1,2,nargin);
|
||||
if (m)
|
||||
m = nargchk (1,2,nargin);
|
||||
if (m)
|
||||
usage (m);
|
||||
end
|
||||
end
|
||||
|
||||
if (nargin < 2)
|
||||
if (nargin < 2)
|
||||
count = Inf;
|
||||
end
|
||||
end
|
||||
|
||||
f = fopen (filename, 'rb');
|
||||
if (f < 0)
|
||||
f = fopen (filename, 'rb');
|
||||
if (f < 0)
|
||||
v = 0;
|
||||
else
|
||||
else
|
||||
t = fread (f, [2, count], 'short');
|
||||
fclose (f);
|
||||
v = t(1,:) + t(2,:)*i;
|
||||
[r, c] = size (v);
|
||||
v = reshape (v, c, r);
|
||||
end
|
||||
end
|
||||
|
@ -1,27 +1,52 @@
|
||||
% Usage: read_tracking_dat (filename, [count])
|
||||
%
|
||||
% Opens GNSS-SDR tracking binary log file .dat and returns the contents
|
||||
%
|
||||
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Javier Arribas 2011
|
||||
|
||||
function [observables] = read_hybrid_observables_dump (channels, filename, count)
|
||||
|
||||
%% usage: read_tracking_dat (filename, [count])
|
||||
%%
|
||||
%% open GNSS-SDR tracking binary log file .dat and return the contents
|
||||
%%
|
||||
|
||||
m = nargchk (1,2,nargin);
|
||||
num_double_vars=7;
|
||||
double_size_bytes=8;
|
||||
skip_bytes_each_read=double_size_bytes*num_double_vars*channels;
|
||||
bytes_shift=0;
|
||||
if (m)
|
||||
m = nargchk (1,2,nargin);
|
||||
num_double_vars=7;
|
||||
double_size_bytes=8;
|
||||
skip_bytes_each_read=double_size_bytes*num_double_vars*channels;
|
||||
bytes_shift=0;
|
||||
if (m)
|
||||
usage (m);
|
||||
end
|
||||
end
|
||||
|
||||
if (nargin < 3)
|
||||
if (nargin < 3)
|
||||
count = Inf;
|
||||
end
|
||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
||||
f = fopen (filename, 'rb');
|
||||
if (f < 0)
|
||||
else
|
||||
end
|
||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
||||
f = fopen (filename, 'rb');
|
||||
if (f < 0)
|
||||
else
|
||||
for N=1:1:channels
|
||||
observables.RX_time(N,:) = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
@ -49,23 +74,23 @@ function [observables] = read_hybrid_observables_dump (channels, filename, count
|
||||
fclose (f);
|
||||
|
||||
%%%%%%%% output vars %%%%%%%%
|
||||
% double tmp_double;
|
||||
% for (unsigned int i = 0; i < d_nchannels; i++)
|
||||
% {
|
||||
% tmp_double = current_gnss_synchro[i].RX_time;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% tmp_double = current_gnss_synchro[i].TOW_at_current_symbol_s;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% tmp_double = current_gnss_synchro[i].Carrier_Doppler_hz;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% tmp_double = current_gnss_synchro[i].Carrier_phase_rads/GPS_TWO_PI;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% tmp_double = current_gnss_synchro[i].Pseudorange_m;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% tmp_double = current_gnss_synchro[i].PRN;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% tmp_double = current_gnss_synchro[i].Flag_valid_pseudorange;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% }
|
||||
end
|
||||
% double tmp_double;
|
||||
% for (unsigned int i = 0; i < d_nchannels; i++)
|
||||
% {
|
||||
% tmp_double = current_gnss_synchro[i].RX_time;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% tmp_double = current_gnss_synchro[i].TOW_at_current_symbol_s;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% tmp_double = current_gnss_synchro[i].Carrier_Doppler_hz;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% tmp_double = current_gnss_synchro[i].Carrier_phase_rads/GPS_TWO_PI;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% tmp_double = current_gnss_synchro[i].Pseudorange_m;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% tmp_double = current_gnss_synchro[i].PRN;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% tmp_double = current_gnss_synchro[i].Flag_valid_pseudorange;
|
||||
% d_dump_file.write((char*)&tmp_double, sizeof(double));
|
||||
% }
|
||||
end
|
||||
|
||||
|
@ -1,29 +1,54 @@
|
||||
% Usage: read_true_sim_observables_dump (filename, [count])
|
||||
%
|
||||
% Opens gnss-sdr-sim observables dump and reads all chennels
|
||||
%
|
||||
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Javier Arribas 2011
|
||||
|
||||
function [observables] = read_true_sim_observables_dump (filename, count)
|
||||
|
||||
%% usage: read_true_sim_observables_dump (filename, [count])
|
||||
%%
|
||||
%% open gnss-sdr-sim observables dump and read all chennels
|
||||
%%
|
||||
m = nargchk (1,2,nargin);
|
||||
channels=12; %Simulator always use 12 channels
|
||||
num_double_vars=7;
|
||||
double_size_bytes=8;
|
||||
skip_bytes_each_read=double_size_bytes*num_double_vars*channels;
|
||||
bytes_shift=0;
|
||||
|
||||
m = nargchk (1,2,nargin);
|
||||
channels=12; %Simulator always use 12 channels
|
||||
num_double_vars=7;
|
||||
double_size_bytes=8;
|
||||
skip_bytes_each_read=double_size_bytes*num_double_vars*channels;
|
||||
bytes_shift=0;
|
||||
|
||||
if (m)
|
||||
if (m)
|
||||
usage (m);
|
||||
end
|
||||
end
|
||||
|
||||
if (nargin < 2)
|
||||
if (nargin < 2)
|
||||
count = Inf;
|
||||
end
|
||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
||||
f = fopen (filename, 'rb');
|
||||
if (f < 0)
|
||||
else
|
||||
end
|
||||
%loops_counter = fread (f, count, 'uint32',4*12);
|
||||
f = fopen (filename, 'rb');
|
||||
if (f < 0)
|
||||
else
|
||||
for N=1:1:channels
|
||||
observables.RX_time(N,:) = fread (f, count, 'float64',skip_bytes_each_read-double_size_bytes);
|
||||
bytes_shift=bytes_shift+double_size_bytes;
|
||||
@ -50,16 +75,16 @@ function [observables] = read_true_sim_observables_dump (filename, count)
|
||||
|
||||
fclose (f);
|
||||
|
||||
% %%%%%%%% output vars %%%%%%%%
|
||||
% for(int i=0;i<12;i++)
|
||||
% {
|
||||
% d_dump_file.read((char *) &gps_time_sec[i], sizeof(double));
|
||||
% d_dump_file.read((char *) &doppler_l1_hz, sizeof(double));
|
||||
% d_dump_file.read((char *) &acc_carrier_phase_l1_cycles[i], sizeof(double));
|
||||
% d_dump_file.read((char *) &dist_m[i], sizeof(double));
|
||||
% d_dump_file.read((char *) &true_dist_m[i], sizeof(double));
|
||||
% d_dump_file.read((char *) &carrier_phase_l1_cycles[i], sizeof(double));
|
||||
% d_dump_file.read((char *) &prn[i], sizeof(double));
|
||||
% }
|
||||
end
|
||||
% %%%%%%%% output vars %%%%%%%%
|
||||
% for(int i=0;i<12;i++)
|
||||
% {
|
||||
% d_dump_file.read((char *) &gps_time_sec[i], sizeof(double));
|
||||
% d_dump_file.read((char *) &doppler_l1_hz, sizeof(double));
|
||||
% d_dump_file.read((char *) &acc_carrier_phase_l1_cycles[i], sizeof(double));
|
||||
% d_dump_file.read((char *) &dist_m[i], sizeof(double));
|
||||
% d_dump_file.read((char *) &true_dist_m[i], sizeof(double));
|
||||
% d_dump_file.read((char *) &carrier_phase_l1_cycles[i], sizeof(double));
|
||||
% d_dump_file.read((char *) &prn[i], sizeof(double));
|
||||
% }
|
||||
end
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
function plotTracking(channelList, trackResults, settings)
|
||||
%This function plots the tracking results for the given channel list.
|
||||
% This function plots the tracking results for the given channel list.
|
||||
%
|
||||
%plotTracking(channelList, trackResults, settings)
|
||||
% plotTracking(channelList, trackResults, settings)
|
||||
%
|
||||
% Inputs:
|
||||
% channelList - list of channels to be plotted.
|
||||
@ -14,32 +14,29 @@ function plotTracking(channelList, trackResults, settings)
|
||||
% 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 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.
|
||||
% 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.
|
||||
% 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: plotTracking.m,v 1.5.2.23 2006/08/14 14:45:14 dpl Exp $
|
||||
|
||||
% Protection - if the list contains incorrect channel numbers
|
||||
channelList = intersect(channelList, 1:settings.numberOfChannels);
|
||||
|
||||
%=== For all listed channels ==============================================
|
||||
for channelNr = channelList
|
||||
|
||||
%% Select (or create) and clear the figure ================================
|
||||
%% Select (or create) and clear the figure ================================
|
||||
% The number 200 is added just for more convenient handling of the open
|
||||
% figure windows, when many figures are closed and reopened.
|
||||
% Figures drawn or opened by the user, will not be "overwritten" by
|
||||
@ -48,106 +45,106 @@ for channelNr = channelList
|
||||
figure(channelNr +200);
|
||||
clf(channelNr +200);
|
||||
set(channelNr +200, 'Name', ['Channel ', num2str(channelNr), ...
|
||||
' (PRN ', ...
|
||||
num2str(trackResults(channelNr).PRN), ...
|
||||
') results']);
|
||||
' (PRN ', ...
|
||||
num2str(trackResults(channelNr).PRN), ...
|
||||
') results']);
|
||||
|
||||
%% Draw axes ==============================================================
|
||||
% Row 1
|
||||
handles(1, 1) = subplot(3, 3, 1);
|
||||
handles(1, 2) = subplot(3, 3, [2 3]);
|
||||
% Row 2
|
||||
handles(2, 1) = subplot(3, 3, 4);
|
||||
handles(2, 2) = subplot(3, 3, [5 6]);
|
||||
% Row 3
|
||||
handles(3, 1) = subplot(3, 3, 7);
|
||||
handles(3, 2) = subplot(3, 3, 8);
|
||||
handles(3, 3) = subplot(3, 3, 9);
|
||||
%% Draw axes ==============================================================
|
||||
% Row 1
|
||||
handles(1, 1) = subplot(3, 3, 1);
|
||||
handles(1, 2) = subplot(3, 3, [2 3]);
|
||||
% Row 2
|
||||
handles(2, 1) = subplot(3, 3, 4);
|
||||
handles(2, 2) = subplot(3, 3, [5 6]);
|
||||
% Row 3
|
||||
handles(3, 1) = subplot(3, 3, 7);
|
||||
handles(3, 2) = subplot(3, 3, 8);
|
||||
handles(3, 3) = subplot(3, 3, 9);
|
||||
|
||||
%% Plot all figures =======================================================
|
||||
%% Plot all figures =======================================================
|
||||
|
||||
timeAxisInSeconds = (1:settings.msToProcess-1)/1000;
|
||||
timeAxisInSeconds = (1:settings.msToProcess-1)/1000;
|
||||
|
||||
%----- Discrete-Time Scatter Plot ---------------------------------
|
||||
plot(handles(1, 1), trackResults(channelNr).I_PN,...
|
||||
trackResults(channelNr).Q_PN, ...
|
||||
'.');
|
||||
%----- Discrete-Time Scatter Plot ---------------------------------
|
||||
plot(handles(1, 1), trackResults(channelNr).I_PN,...
|
||||
trackResults(channelNr).Q_PN, ...
|
||||
'.');
|
||||
|
||||
grid (handles(1, 1));
|
||||
axis (handles(1, 1), 'equal');
|
||||
title (handles(1, 1), 'Discrete-Time Scatter Plot');
|
||||
xlabel(handles(1, 1), 'I prompt');
|
||||
ylabel(handles(1, 1), 'Q prompt');
|
||||
grid (handles(1, 1));
|
||||
axis (handles(1, 1), 'equal');
|
||||
title (handles(1, 1), 'Discrete-Time Scatter Plot');
|
||||
xlabel(handles(1, 1), 'I prompt');
|
||||
ylabel(handles(1, 1), 'Q prompt');
|
||||
|
||||
%----- Nav bits ---------------------------------------------------
|
||||
plot (handles(1, 2), timeAxisInSeconds, ...
|
||||
trackResults(channelNr).I_PN(1:settings.msToProcess-1));
|
||||
%----- Nav bits ---------------------------------------------------
|
||||
plot (handles(1, 2), timeAxisInSeconds, ...
|
||||
trackResults(channelNr).I_PN(1:settings.msToProcess-1));
|
||||
|
||||
grid (handles(1, 2));
|
||||
title (handles(1, 2), 'Bits of the navigation message');
|
||||
xlabel(handles(1, 2), 'Time (s)');
|
||||
axis (handles(1, 2), 'tight');
|
||||
grid (handles(1, 2));
|
||||
title (handles(1, 2), 'Bits of the navigation message');
|
||||
xlabel(handles(1, 2), 'Time (s)');
|
||||
axis (handles(1, 2), 'tight');
|
||||
|
||||
%----- PLL discriminator unfiltered--------------------------------
|
||||
plot (handles(2, 1), timeAxisInSeconds, ...
|
||||
trackResults(channelNr).pllDiscr(1:settings.msToProcess-1), 'r');
|
||||
%----- PLL discriminator unfiltered--------------------------------
|
||||
plot (handles(2, 1), timeAxisInSeconds, ...
|
||||
trackResults(channelNr).pllDiscr(1:settings.msToProcess-1), 'r');
|
||||
|
||||
grid (handles(2, 1));
|
||||
axis (handles(2, 1), 'tight');
|
||||
xlabel(handles(2, 1), 'Time (s)');
|
||||
ylabel(handles(2, 1), 'Amplitude');
|
||||
title (handles(2, 1), 'Raw PLL discriminator');
|
||||
grid (handles(2, 1));
|
||||
axis (handles(2, 1), 'tight');
|
||||
xlabel(handles(2, 1), 'Time (s)');
|
||||
ylabel(handles(2, 1), 'Amplitude');
|
||||
title (handles(2, 1), 'Raw PLL discriminator');
|
||||
|
||||
%----- Correlation ------------------------------------------------
|
||||
plot(handles(2, 2), timeAxisInSeconds, ...
|
||||
[sqrt(trackResults(channelNr).I_E(1:settings.msToProcess-1).^2 + ...
|
||||
trackResults(channelNr).Q_E(1:settings.msToProcess-1).^2)', ...
|
||||
sqrt(trackResults(channelNr).I_P(1:settings.msToProcess-1).^2 + ...
|
||||
trackResults(channelNr).Q_P(1:settings.msToProcess-1).^2)', ...
|
||||
sqrt(trackResults(channelNr).I_L(1:settings.msToProcess-1).^2 + ...
|
||||
trackResults(channelNr).Q_L(1:settings.msToProcess-1).^2)'], ...
|
||||
'-*');
|
||||
%----- Correlation ------------------------------------------------
|
||||
plot(handles(2, 2), timeAxisInSeconds, ...
|
||||
[sqrt(trackResults(channelNr).I_E(1:settings.msToProcess-1).^2 + ...
|
||||
trackResults(channelNr).Q_E(1:settings.msToProcess-1).^2)', ...
|
||||
sqrt(trackResults(channelNr).I_P(1:settings.msToProcess-1).^2 + ...
|
||||
trackResults(channelNr).Q_P(1:settings.msToProcess-1).^2)', ...
|
||||
sqrt(trackResults(channelNr).I_L(1:settings.msToProcess-1).^2 + ...
|
||||
trackResults(channelNr).Q_L(1:settings.msToProcess-1).^2)'], ...
|
||||
'-*');
|
||||
|
||||
grid (handles(2, 2));
|
||||
title (handles(2, 2), 'Correlation results');
|
||||
xlabel(handles(2, 2), 'Time (s)');
|
||||
axis (handles(2, 2), 'tight');
|
||||
grid (handles(2, 2));
|
||||
title (handles(2, 2), 'Correlation results');
|
||||
xlabel(handles(2, 2), 'Time (s)');
|
||||
axis (handles(2, 2), 'tight');
|
||||
|
||||
hLegend = legend(handles(2, 2), '$\sqrt{I_{E}^2 + Q_{E}^2}$', ...
|
||||
'$\sqrt{I_{P}^2 + Q_{P}^2}$', ...
|
||||
'$\sqrt{I_{L}^2 + Q_{L}^2}$');
|
||||
hLegend = legend(handles(2, 2), '$\sqrt{I_{E}^2 + Q_{E}^2}$', ...
|
||||
'$\sqrt{I_{P}^2 + Q_{P}^2}$', ...
|
||||
'$\sqrt{I_{L}^2 + Q_{L}^2}$');
|
||||
|
||||
%set interpreter from tex to latex. This will draw \sqrt correctly
|
||||
set(hLegend, 'Interpreter', 'Latex');
|
||||
%set interpreter from tex to latex. This will draw \sqrt correctly
|
||||
set(hLegend, 'Interpreter', 'Latex');
|
||||
|
||||
%----- PLL discriminator filtered----------------------------------
|
||||
plot (handles(3, 1), timeAxisInSeconds, ...
|
||||
trackResults(channelNr).pllDiscrFilt(1:settings.msToProcess-1), 'b');
|
||||
%----- PLL discriminator filtered----------------------------------
|
||||
plot (handles(3, 1), timeAxisInSeconds, ...
|
||||
trackResults(channelNr).pllDiscrFilt(1:settings.msToProcess-1), 'b');
|
||||
|
||||
grid (handles(3, 1));
|
||||
axis (handles(3, 1), 'tight');
|
||||
xlabel(handles(3, 1), 'Time (s)');
|
||||
ylabel(handles(3, 1), 'Amplitude');
|
||||
title (handles(3, 1), 'Filtered PLL discriminator');
|
||||
grid (handles(3, 1));
|
||||
axis (handles(3, 1), 'tight');
|
||||
xlabel(handles(3, 1), 'Time (s)');
|
||||
ylabel(handles(3, 1), 'Amplitude');
|
||||
title (handles(3, 1), 'Filtered PLL discriminator');
|
||||
|
||||
%----- DLL discriminator unfiltered--------------------------------
|
||||
plot (handles(3, 2), timeAxisInSeconds, ...
|
||||
trackResults(channelNr).dllDiscr(1:settings.msToProcess-1), 'r');
|
||||
%----- DLL discriminator unfiltered--------------------------------
|
||||
plot (handles(3, 2), timeAxisInSeconds, ...
|
||||
trackResults(channelNr).dllDiscr(1:settings.msToProcess-1), 'r');
|
||||
|
||||
grid (handles(3, 2));
|
||||
axis (handles(3, 2), 'tight');
|
||||
xlabel(handles(3, 2), 'Time (s)');
|
||||
ylabel(handles(3, 2), 'Amplitude');
|
||||
title (handles(3, 2), 'Raw DLL discriminator');
|
||||
grid (handles(3, 2));
|
||||
axis (handles(3, 2), 'tight');
|
||||
xlabel(handles(3, 2), 'Time (s)');
|
||||
ylabel(handles(3, 2), 'Amplitude');
|
||||
title (handles(3, 2), 'Raw DLL discriminator');
|
||||
|
||||
%----- DLL discriminator filtered----------------------------------
|
||||
plot (handles(3, 3), timeAxisInSeconds, ...
|
||||
trackResults(channelNr).dllDiscrFilt(1:settings.msToProcess-1), 'b');
|
||||
%----- DLL discriminator filtered----------------------------------
|
||||
plot (handles(3, 3), timeAxisInSeconds, ...
|
||||
trackResults(channelNr).dllDiscrFilt(1:settings.msToProcess-1), 'b');
|
||||
|
||||
grid (handles(3, 3));
|
||||
axis (handles(3, 3), 'tight');
|
||||
xlabel(handles(3, 3), 'Time (s)');
|
||||
ylabel(handles(3, 3), 'Amplitude');
|
||||
title (handles(3, 3), 'Filtered DLL discriminator');
|
||||
grid (handles(3, 3));
|
||||
axis (handles(3, 3), 'tight');
|
||||
xlabel(handles(3, 3), 'Time (s)');
|
||||
ylabel(handles(3, 3), 'Amplitude');
|
||||
title (handles(3, 3), 'Filtered DLL discriminator');
|
||||
|
||||
end % for channelNr = channelList
|
||||
|
@ -1,36 +1,32 @@
|
||||
% /*!
|
||||
% * \file plot_acq_grid.m
|
||||
% * \brief Read GNSS-SDR Acquisition dump .mat file using the provided
|
||||
% function and plot acquisition grid of acquisition statistic of PRN sat
|
||||
% Reads GNSS-SDR Acquisition dump .mat file using the provided
|
||||
% function and plots acquisition grid of acquisition statistic of PRN sat
|
||||
% Antonio Ramos, 2017. antonio.ramos(at)cttc.es
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% * \author Antonio Ramos, 2017. antonio.ramos(at)cttc.es
|
||||
% * -------------------------------------------------------------------------
|
||||
% *
|
||||
% * Copyright (C) 2010-2017 (see AUTHORS file for a list of contributors)
|
||||
% *
|
||||
% * GNSS-SDR is a software defined Global Navigation
|
||||
% * Satellite Systems receiver
|
||||
% *
|
||||
% * This file is part of GNSS-SDR.
|
||||
% *
|
||||
% * GNSS-SDR 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 3 of the License, or
|
||||
% * at your option) any later version.
|
||||
% *
|
||||
% * GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
% *
|
||||
% * -------------------------------------------------------------------------
|
||||
% */
|
||||
|
||||
%%%%%%%%% ¡¡¡ CONFIGURE !!! %%%%%%%%%%%%%
|
||||
%%%%%%%%% ?????? CONFIGURE !!! %%%%%%%%%%%%%
|
||||
|
||||
path = '/archive/';
|
||||
file = 'acq';
|
||||
|
@ -1,37 +1,35 @@
|
||||
% /*!
|
||||
% * \file plot_acq_grid_gsoc.m
|
||||
% * \brief Read GNSS-SDR Acquisition dump binary file using the provided
|
||||
% function and plot acquisition grid of acquisition statistic of PRN sat
|
||||
% Reads GNSS-SDR Acquisition dump binary file using the provided
|
||||
% function and plots acquisition grid of acquisition statistic of PRN sat
|
||||
%
|
||||
% This function analyzes a experiment performed by Luis Esteve in the framework
|
||||
% of the Google Summer of Code (GSoC) 2012, with the collaboration of Javier Arribas
|
||||
% and Carles Fernández, related to the extension of GNSS-SDR to Galileo.
|
||||
% and Carles Fern??ndez, related to the extension of GNSS-SDR to Galileo.
|
||||
%
|
||||
% Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% * \author Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
||||
% * -------------------------------------------------------------------------
|
||||
% *
|
||||
% * Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
||||
% *
|
||||
% * GNSS-SDR is a software defined Global Navigation
|
||||
% * Satellite Systems receiver
|
||||
% *
|
||||
% * This file is part of GNSS-SDR.
|
||||
% *
|
||||
% * GNSS-SDR 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 3 of the License, or
|
||||
% * at your option) any later version.
|
||||
% *
|
||||
% * GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
% *
|
||||
% * -------------------------------------------------------------------------
|
||||
% */
|
||||
|
||||
function plot_acq_grid_gsoc(sat)
|
||||
|
||||
@ -61,7 +59,7 @@ for k=Doppler_min_Hz:Doppler_step_Hz:Doppler_max_Hz
|
||||
index=index+1;
|
||||
filename=['test_statistics_E_1C_sat_' num2str(sat) '_doppler_' num2str(k) '.dat'];
|
||||
acq_grid(index,:)=abs(read_complex_binary (filename));
|
||||
end
|
||||
end
|
||||
|
||||
maximum_correlation_peak = max(max(acq_grid))
|
||||
|
||||
|
@ -1,39 +1,38 @@
|
||||
% /*!
|
||||
% * \file plot_acq_grid_gsoc_e5.m
|
||||
% * \brief Read GNSS-SDR Acquisition dump binary file using the provided
|
||||
% function and plot acquisition grid of acquisition statistic of PRN sat.
|
||||
% CAF input must be 0 or 1 depending if the user desires to read the file
|
||||
% that resolves doppler ambiguity or not.
|
||||
% Reads GNSS-SDR Acquisition dump binary file using the provided
|
||||
% function and plot acquisition grid of acquisition statistic of PRN sat.
|
||||
% CAF input must be 0 or 1 depending if the user desires to read the file
|
||||
% that resolves doppler ambiguity or not.
|
||||
%
|
||||
% This function analyzes a experiment performed by Marc Sales in the framework
|
||||
% of the Google Summer of Code (GSoC) 2014, with the collaboration of Luis Esteve, Javier Arribas
|
||||
% and Carles Fernández, related to the extension of GNSS-SDR to Galileo.
|
||||
% This function analyzes a experiment performed by Marc Sales in the framework
|
||||
% of the Google Summer of Code (GSoC) 2014, with the collaboration of Luis Esteve, Javier Arribas
|
||||
% and Carles Fernandez, related to the extension of GNSS-SDR to Galileo.
|
||||
%
|
||||
% Marc Sales marcsales92(at)gmail.com,
|
||||
% Luis Esteve, 2014. luis(at)epsilon-formacion.com
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% * \author Marc Sales marcsales92(at)gmail.com, Luis Esteve, 2014. luis(at)epsilon-formacion.com
|
||||
% * -------------------------------------------------------------------------
|
||||
% *
|
||||
% * Copyright (C) 2010-2014 (see AUTHORS file for a list of contributors)
|
||||
% *
|
||||
% * GNSS-SDR is a software defined Global Navigation
|
||||
% * Satellite Systems receiver
|
||||
% *
|
||||
% * This file is part of GNSS-SDR.
|
||||
% *
|
||||
% * GNSS-SDR 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 3 of the License, or
|
||||
% * at your option) any later version.
|
||||
% *
|
||||
% * GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
% *
|
||||
% * -------------------------------------------------------------------------
|
||||
% */
|
||||
|
||||
function plot_acq_grid_gsoc_e5(sat,CAF)
|
||||
|
||||
|
@ -1,37 +1,34 @@
|
||||
% /*!
|
||||
% * \file plot_acq_grid_gsoc.m
|
||||
% * \brief Read GNSS-SDR Acquisition dump binary file using the provided
|
||||
% function and plot acquisition grid of acquisition statistic of PRN sat
|
||||
% Reads GNSS-SDR Acquisition dump binary file using the provided
|
||||
% function and plots acquisition grid of acquisition statistic of PRN sat
|
||||
%
|
||||
% This function analyzes a experiment performed by Luis Esteve in the framework
|
||||
% of the Google Summer of Code (GSoC) 2012, with the collaboration of Javier Arribas
|
||||
% and Carles Fernández, related to the extension of GNSS-SDR to Galileo.
|
||||
% and Carles Fernandez, related to the extension of GNSS-SDR to Galileo.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
%
|
||||
% GNSS-SDR is a software defined Global Navigation
|
||||
% Satellite Systems receiver
|
||||
%
|
||||
% This file is part of GNSS-SDR.
|
||||
%
|
||||
% GNSS-SDR 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 3 of the License, or
|
||||
% at your option) any later version.
|
||||
%
|
||||
% GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
%
|
||||
% * \author Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
||||
% * -------------------------------------------------------------------------
|
||||
% *
|
||||
% * Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
||||
% *
|
||||
% * GNSS-SDR is a software defined Global Navigation
|
||||
% * Satellite Systems receiver
|
||||
% *
|
||||
% * This file is part of GNSS-SDR.
|
||||
% *
|
||||
% * GNSS-SDR 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 3 of the License, or
|
||||
% * at your option) any later version.
|
||||
% *
|
||||
% * GNSS-SDR 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 GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
% *
|
||||
% * -------------------------------------------------------------------------
|
||||
% */
|
||||
|
||||
function plot_acq_grid_gsoc_glonass(sat)
|
||||
|
||||
@ -62,9 +59,9 @@ for k=Doppler_min_Hz:Doppler_step_Hz:Doppler_max_Hz
|
||||
index=index+1;
|
||||
filename=['acquisition_R_1G_sat_' num2str(sat) '_doppler_' num2str(k) '.dat'];
|
||||
acq_grid(index,:)=abs(read_complex_binary (filename));
|
||||
end
|
||||
end
|
||||
|
||||
acq_grid = acq_grid.^2;
|
||||
acq_grid = acq_grid.^2;
|
||||
|
||||
maximum_correlation_peak = max(max(acq_grid))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user