1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 12:40:35 +00:00

Improving tracking plot script

This commit is contained in:
Javier Arribas 2019-04-03 16:04:09 +02:00
parent 02db271011
commit 89c8f3eac9

View File

@ -63,7 +63,13 @@ for channelNr = channelList
%% Plot all figures ======================================================= %% Plot all figures =======================================================
timeAxisInSeconds = (1:4:settings.msToProcess)/1000; if isfield(trackResults(channelNr), 'prn_start_time_s')
timeAxis=trackResults(channelNr).prn_start_time_s;
time_label='RX Time (s)';
else
timeAxis = (1:length(trackResults(channelNr).PRN));
time_label='Epoch';
end
%----- Discrete-Time Scatter Plot --------------------------------- %----- Discrete-Time Scatter Plot ---------------------------------
plot(handles(1, 1), trackResults(channelNr).data_I,... plot(handles(1, 1), trackResults(channelNr).data_I,...
@ -77,29 +83,26 @@ for channelNr = channelList
ylabel(handles(1, 1), 'Q prompt'); ylabel(handles(1, 1), 'Q prompt');
%----- Nav bits --------------------------------------------------- %----- Nav bits ---------------------------------------------------
t = (1:length(trackResults(channelNr).data_I)); plot (handles(1, 2), timeAxis, ...
plot (handles(1, 2), t, ...
trackResults(channelNr).data_I); trackResults(channelNr).data_I);
grid (handles(1, 2)); grid (handles(1, 2));
title (handles(1, 2), 'Bits of the navigation message'); title (handles(1, 2), 'Bits of the navigation message');
xlabel(handles(1, 2), 'Time (s)'); xlabel(handles(1, 2), time_label);
axis (handles(1, 2), 'tight'); axis (handles(1, 2), 'tight');
%----- PLL discriminator unfiltered-------------------------------- %----- PLL discriminator unfiltered--------------------------------
t = (1:length(trackResults(channelNr).pllDiscr)); plot (handles(2, 1), timeAxis, ...
plot (handles(2, 1), t, ...
trackResults(channelNr).pllDiscr, 'r'); trackResults(channelNr).pllDiscr, 'r');
grid (handles(2, 1)); grid (handles(2, 1));
axis (handles(2, 1), 'tight'); axis (handles(2, 1), 'tight');
xlabel(handles(2, 1), 'Time (s)'); xlabel(handles(2, 1), time_label);
ylabel(handles(2, 1), 'Amplitude'); ylabel(handles(2, 1), 'Amplitude');
title (handles(2, 1), 'Raw PLL discriminator'); title (handles(2, 1), 'Raw PLL discriminator');
%----- Correlation ------------------------------------------------ %----- Correlation ------------------------------------------------
t = (1:length(trackResults(channelNr).I_VE)); plot(handles(2, 2), timeAxis, ...
plot(handles(2, 2), t, ...
[sqrt(trackResults(channelNr).I_VE.^2 + ... [sqrt(trackResults(channelNr).I_VE.^2 + ...
trackResults(channelNr).Q_VE.^2)', ... trackResults(channelNr).Q_VE.^2)', ...
sqrt(trackResults(channelNr).I_E.^2 + ... sqrt(trackResults(channelNr).I_E.^2 + ...
@ -114,7 +117,7 @@ for channelNr = channelList
grid (handles(2, 2)); grid (handles(2, 2));
title (handles(2, 2), 'Correlation results'); title (handles(2, 2), 'Correlation results');
xlabel(handles(2, 2), 'Time (s)'); xlabel(handles(2, 2), time_label);
axis (handles(2, 2), 'tight'); axis (handles(2, 2), 'tight');
hLegend = legend(handles(2, 2), '$\sqrt{I_{VE}^2 + Q_{VE}^2}$', ... hLegend = legend(handles(2, 2), '$\sqrt{I_{VE}^2 + Q_{VE}^2}$', ...
@ -127,35 +130,32 @@ for channelNr = channelList
set(hLegend, 'Interpreter', 'Latex'); set(hLegend, 'Interpreter', 'Latex');
%----- PLL discriminator filtered---------------------------------- %----- PLL discriminator filtered----------------------------------
t = (1:length(trackResults(channelNr).pllDiscrFilt)); plot (handles(3, 1), timeAxis, ...
plot (handles(3, 1), t, ...
trackResults(channelNr).pllDiscrFilt, 'b'); trackResults(channelNr).pllDiscrFilt, 'b');
grid (handles(3, 1)); grid (handles(3, 1));
axis (handles(3, 1), 'tight'); axis (handles(3, 1), 'tight');
xlabel(handles(3, 1), 'Time (s)'); xlabel(handles(3, 1), time_label);
ylabel(handles(3, 1), 'Amplitude'); ylabel(handles(3, 1), 'Amplitude');
title (handles(3, 1), 'Filtered PLL discriminator'); title (handles(3, 1), 'Filtered PLL discriminator');
%----- DLL discriminator unfiltered-------------------------------- %----- DLL discriminator unfiltered--------------------------------
t = (1:length(trackResults(channelNr).dllDiscr)); plot (handles(3, 2), timeAxis, ...
plot (handles(3, 2), t, ...
trackResults(channelNr).dllDiscr, 'r'); trackResults(channelNr).dllDiscr, 'r');
grid (handles(3, 2)); grid (handles(3, 2));
axis (handles(3, 2), 'tight'); axis (handles(3, 2), 'tight');
xlabel(handles(3, 2), 'Time (s)'); xlabel(handles(3, 2), time_label);
ylabel(handles(3, 2), 'Amplitude'); ylabel(handles(3, 2), 'Amplitude');
title (handles(3, 2), 'Raw DLL discriminator'); title (handles(3, 2), 'Raw DLL discriminator');
%----- DLL discriminator filtered---------------------------------- %----- DLL discriminator filtered----------------------------------
t = (1:length(trackResults(channelNr).dllDiscrFilt)); plot (handles(3, 3), timeAxis, ...
plot (handles(3, 3), t, ...
trackResults(channelNr).dllDiscrFilt, 'b'); trackResults(channelNr).dllDiscrFilt, 'b');
grid (handles(3, 3)); grid (handles(3, 3));
axis (handles(3, 3), 'tight'); axis (handles(3, 3), 'tight');
xlabel(handles(3, 3), 'Time (s)'); xlabel(handles(3, 3), time_label);
ylabel(handles(3, 3), 'Amplitude'); ylabel(handles(3, 3), 'Amplitude');
title (handles(3, 3), 'Filtered DLL discriminator'); title (handles(3, 3), 'Filtered DLL discriminator');