diff --git a/src/utils/matlab/vtl/Vtl2struct.m b/src/utils/matlab/vtl/Vtl2struct.m index 91dac2a8a..d693f23a3 100644 --- a/src/utils/matlab/vtl/Vtl2struct.m +++ b/src/utils/matlab/vtl/Vtl2struct.m @@ -48,14 +48,18 @@ vtlSolution.rtklibpvt=[]; [indKF,~]= find(strcmp(dumpvtlfile, 'kf_state')); [indRTKlib,~]= find(strcmp(dumpvtlfile, 'rtklib_state')); [indkf_err,~]= find(strcmp(dumpvtlfile, 'kf_xerr')); +[ind_filt_dop_sat,~]= find(strcmp(dumpvtlfile, 'filt_dopp_sat')); + kfpvt=dumpvtlfile(indKF,:);kfpvt(:,1)=[]; rtklibpvt=dumpvtlfile(indRTKlib,:); rtklibpvt(:,1)=[]; kferr=dumpvtlfile(indkf_err,:); kferr(:,1)=[]; +filt_dop_sat=dumpvtlfile(ind_filt_dop_sat,:); filt_dop_sat(:,1)=[]; kfpvt=cell2mat(kfpvt); rtklibpvt=cell2mat(rtklibpvt); kferr=cell2mat(kferr); +filt_dop_sat=cell2mat(filt_dop_sat); vtlSolution.kfpvt.X=kfpvt(:,1); vtlSolution.kfpvt.Y=kfpvt(:,2); @@ -84,4 +88,10 @@ vtlSolution.kferr.vZ=kferr(:,6); vtlSolution.kferr.biasclock=kferr(:,7); vtlSolution.kferr.rateblock=kferr(:,8); +vtlSolution.filt_dop_sat(1,:)=filt_dop_sat(:,1); +vtlSolution.filt_dop_sat(2,:)=filt_dop_sat(:,2); +vtlSolution.filt_dop_sat(3,:)=filt_dop_sat(:,3); +vtlSolution.filt_dop_sat(4,:)=filt_dop_sat(:,4); +vtlSolution.filt_dop_sat(5,:)=filt_dop_sat(:,5); + end \ No newline at end of file diff --git a/src/utils/matlab/vtl/dopp_filtered_plotting.m b/src/utils/matlab/vtl/dopp_filtered_plotting.m new file mode 100644 index 000000000..31f75195e --- /dev/null +++ b/src/utils/matlab/vtl/dopp_filtered_plotting.m @@ -0,0 +1,59 @@ + + + +time_reference_spirent_obs=129780;%s +time_vtl_dump_file=linspace(38,157,length(vtlSolution.filt_dop_sat)); +% rx_PRN=[28 4 17 15 27 9]; % for SPF_LD_05. +%% + Rx_Dopp_28=figure('Name','RX_Carrier_Doppler_hz');plot(RX_time(1,:)-time_reference_spirent_obs, Carrier_Doppler_hz(1,:)','s') + xlim([0,140]); + ylim([-2340,-2220]); + xlabel('') + ylabel('Doppler (Hz)') + xlabel('time from simulation init (seconds)') + grid on + hold on + legend('PRN 28 GNSS-SDR','Location','eastoutside') + plot(refSatData.GPS.SIM_time/1000, Carrier_Doppler_hz_sim(:,1)','.','DisplayName','reference') + plot(time_vtl_dump_file,vtlSolution.filt_dop_sat(1,:),'o','DisplayName','filtered VTL') + hold off;grid minor + + Rx_Dopp_4=figure('Name','RX_Carrier_Doppler_hz'); + plot(RX_time(1,:)-time_reference_spirent_obs, Carrier_Doppler_hz(2,:)','s') + xlim([0,140]); + ylim([2540,2640]); + xlabel('') + ylabel('Doppler (Hz)') + xlabel('time from simulation init (seconds)') + grid on + hold on + legend('PRN 4 GNSS-SDR','Location','eastoutside') + plot(refSatData.GPS.SIM_time/1000, Carrier_Doppler_hz_sim(:,2)','.','DisplayName','reference') + plot(time_vtl_dump_file,vtlSolution.filt_dop_sat(2,:),'o','DisplayName','filtered VTL') + hold off;grid minor + + Rx_Dopp_17=figure('Name','RX_Carrier_Doppler_hz');plot(RX_time(1,:)-time_reference_spirent_obs, Carrier_Doppler_hz(3,:)','s') + xlim([0,140]); + ylim([-1800,-1730]); + xlabel('') + ylabel('Doppler (Hz)') + xlabel('time from simulation init (seconds)') + grid on + hold on + legend('PRN 17 GNSS-SDR','Location','eastoutside') + plot(refSatData.GPS.SIM_time/1000, Carrier_Doppler_hz_sim(:,3)','.','DisplayName','reference') + plot(time_vtl_dump_file,vtlSolution.filt_dop_sat(3,:),'o','DisplayName','filtered VTL') + hold off;grid minor + + Rx_Dopp_15=figure('Name','RX_Carrier_Doppler_hz');plot(RX_time(1,:)-time_reference_spirent_obs, Carrier_Doppler_hz(4,:)','s') + xlim([0,140]); + ylim([-2680,-2620]); + xlabel('') + ylabel('Doppler (Hz)') + xlabel('time from simulation init (seconds)') + grid on + hold on + legend('PRN 15 GNSS-SDR','Location','eastoutside') + plot(refSatData.GPS.SIM_time/1000, Carrier_Doppler_hz_sim(:,4)','.','DisplayName','reference') + plot(time_vtl_dump_file,vtlSolution.filt_dop_sat(4,:),'o','DisplayName','filtered VTL') + hold off;grid minor