1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-07-24 12:52:55 +00:00

MOD: matlab change carrier phase dump for doppler shift dump and add code phase dump

This commit is contained in:
miguekf 2022-12-30 18:47:49 +01:00
parent d8fc40e209
commit 4bdc6b7110
2 changed files with 27 additions and 10 deletions

View File

@ -11,15 +11,15 @@
% Auto-generated by MATLAB on 24-Nov-2022 17:34:27
function [trkSolution] = trk2struct(path_to_trk_csv)
%% Set up the Import Options and import the data
opts = delimitedTextImportOptions("NumVariables", 4);
opts = delimitedTextImportOptions("NumVariables", 5);
% Specify range and delimiter
opts.DataLines = [1, Inf];
opts.Delimiter = ",";
% Specify column names and types
opts.VariableNames = ["doppler_corr", "VarName2", "VarName3", "VarName4"];
opts.VariableTypes = ["char", "double", "double", "double"];
opts.VariableNames = ["doppler_corr", "VarName2", "VarName3", "VarName4","VarName5","VarName5"];
opts.VariableTypes = ["char", "double", "double", "double", "double", "double"];
% Specify file level properties
opts.ExtraColumnsRule = "ignore";
@ -52,5 +52,8 @@ trk_dopp=cell2mat(trk_dopp);
for i=1:length(trk_dopp)
trkSolution.dopp.real=[trk_dopp(:,1) trk_dopp(:,3)];
trkSolution.dopp.cmd=[trk_dopp(:,1) trk_dopp(:,2)];
trkSolution.doppShift.real=[trk_dopp(:,1) trk_dopp(:,4)];
trkSolution.tao.real=[trk_dopp(:,1) trk_dopp(:,5)];
end
end

View File

@ -86,11 +86,19 @@ if(load_tfk_cmd)
eval(['subplot(2,3,' num2str(chan+1) ');plot(Dopp_cmd_CH' num2str(chan) ')'])
end
figure;sgtitle('real phase')
figure;sgtitle('real doppler shift')
for chan=0:4
eval(['[indCH' num2str(chan) ',~]= find(trkSolution.phase.real==chan);'])
eval(['Phase_real_CH' num2str(chan) '=trkSolution.phase.real(indCH' num2str(chan) ',2);'])
eval(['subplot(2,3,' num2str(chan+1) ');plot(Phase_real_CH' num2str(chan) ')'])
eval(['[indCH' num2str(chan) ',~]= find(trkSolution.doppShift.real==chan);'])
eval(['doppShift_CH' num2str(chan) '=trkSolution.doppShift.real(indCH' num2str(chan) ',2);'])
eval(['subplot(2,3,' num2str(chan+1) ');plot(doppShift_CH' num2str(chan) ')'])
grid on
end
figure;sgtitle('real code phase')
for chan=0:4
eval(['[indCH' num2str(chan) ',~]= find(trkSolution.tao.real==chan);'])
eval(['tao_real_CH' num2str(chan) '=trkSolution.tao.real(indCH' num2str(chan) ',2);'])
eval(['subplot(2,3,' num2str(chan+1) ');plot(tao_real_CH' num2str(chan) ')'])
end
end
@ -127,14 +135,20 @@ legend('PRN 28','PRN 4','PRN 17','PRN 15','PRN 27','Location','eastoutside')
%%
figure;plot(navSolution.RX_time-navSolution.RX_time(1),kf_xerr(9,:)');title('kf 9 xerr');xlabel('t U.A');ylabel('kf 9 xerr');grid minor
% %%
%
% figure;sgtitle(' error in phase')
% for chan=0:4
% eval(['subplot(2,3,' num2str(chan+1) ');plot(err_carrier_phase_rads_filt(' num2str(chan+1) ',:))'])
% hold on; grid minor;
% end
%%
figure;sgtitle(' error in phase')
figure;sgtitle(' error in code phase')
for chan=0:4
eval(['subplot(2,3,' num2str(chan+1) ');plot(err_carrier_phase_rads_filt(' num2str(chan+1) ',:))'])
eval(['subplot(2,3,' num2str(chan+1) ');plot(err_code_phase_chips(' num2str(chan+1) ',:))'])
hold on; grid minor;
end
%%
% figure;sgtitle('real vs cmd phase')
% for chan=0:4