diff --git a/src/utils/matlab/vtl/trk2struct.m b/src/utils/matlab/vtl/trk2struct.m index b0532148f..efee9865b 100644 --- a/src/utils/matlab/vtl/trk2struct.m +++ b/src/utils/matlab/vtl/trk2struct.m @@ -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 \ No newline at end of file diff --git a/src/utils/matlab/vtl/vtl_prototype_clk_d_drift.m b/src/utils/matlab/vtl/vtl_prototype_clk_d_drift.m index b6e106f01..e42484acb 100644 --- a/src/utils/matlab/vtl/vtl_prototype_clk_d_drift.m +++ b/src/utils/matlab/vtl/vtl_prototype_clk_d_drift.m @@ -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