1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-15 14:25:00 +00:00

MOD: update matlab files

This commit is contained in:
miguekf 2022-12-11 17:19:36 +01:00
parent 910bdde61a
commit d85b108ee5
2 changed files with 129 additions and 102 deletions

View File

@ -5,7 +5,9 @@ time_reference_spirent_obs=129780;%s
time_vtl_dump_file=linspace(38,157,length(vtlSolution.filt_dop_sat)); 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_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') Rx_Dopp_28=figure('Name','RX_Carrier_Doppler_hz');
subplot(2,2,1);
plot(RX_time(1,:)-time_reference_spirent_obs, Carrier_Doppler_hz(1,:)','s')
xlim([0,140]); xlim([0,140]);
ylim([-2340,-2220]); ylim([-2340,-2220]);
xlabel('') xlabel('')
@ -18,7 +20,8 @@ time_vtl_dump_file=linspace(38,157,length(vtlSolution.filt_dop_sat));
plot(time_vtl_dump_file,vtlSolution.filt_dop_sat(1,:),'o','DisplayName','filtered VTL') plot(time_vtl_dump_file,vtlSolution.filt_dop_sat(1,:),'o','DisplayName','filtered VTL')
hold off;grid minor hold off;grid minor
Rx_Dopp_4=figure('Name','RX_Carrier_Doppler_hz'); % Rx_Dopp_4=figure('Name','RX_Carrier_Doppler_hz');
subplot(2,2,2);
plot(RX_time(1,:)-time_reference_spirent_obs, Carrier_Doppler_hz(2,:)','s') plot(RX_time(1,:)-time_reference_spirent_obs, Carrier_Doppler_hz(2,:)','s')
xlim([0,140]); xlim([0,140]);
ylim([2540,2640]); ylim([2540,2640]);
@ -32,7 +35,9 @@ time_vtl_dump_file=linspace(38,157,length(vtlSolution.filt_dop_sat));
plot(time_vtl_dump_file,vtlSolution.filt_dop_sat(2,:),'o','DisplayName','filtered VTL') plot(time_vtl_dump_file,vtlSolution.filt_dop_sat(2,:),'o','DisplayName','filtered VTL')
hold off;grid minor 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') % Rx_Dopp_17=figure('Name','RX_Carrier_Doppler_hz');
subplot(2,2,3);
plot(RX_time(1,:)-time_reference_spirent_obs, Carrier_Doppler_hz(3,:)','s')
xlim([0,140]); xlim([0,140]);
ylim([-1800,-1730]); ylim([-1800,-1730]);
xlabel('') xlabel('')
@ -45,7 +50,9 @@ time_vtl_dump_file=linspace(38,157,length(vtlSolution.filt_dop_sat));
plot(time_vtl_dump_file,vtlSolution.filt_dop_sat(3,:),'o','DisplayName','filtered VTL') plot(time_vtl_dump_file,vtlSolution.filt_dop_sat(3,:),'o','DisplayName','filtered VTL')
hold off;grid minor 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') % Rx_Dopp_15=figure('Name','RX_Carrier_Doppler_hz');
subplot(2,2,4);
plot(RX_time(1,:)-time_reference_spirent_obs, Carrier_Doppler_hz(4,:)','s')
xlim([0,140]); xlim([0,140]);
ylim([-2680,-2620]); ylim([-2680,-2620]);
xlabel('') xlabel('')

View File

@ -46,7 +46,7 @@ end
% grid on % grid on
% hold on % hold on
% legend('PRN 28 GNSS-SDR','Location','eastoutside') % legend('PRN 28 GNSS-SDR','Location','eastoutside')
% plot(refSatData.GPS.SIM_time/1000, Pseudorange_m_sim(:,1)','.','DisplayName','reference') % plot(refSatData.GPS.SIM_time/1000, Pseudorange_m_sim(:,1)','.','DisplayName','SPIRENT reference')
% plot(navSolution.RX_time(1,:)-time_reference_spirent_obs, pr_m_filt(1,:),'o','DisplayName','filtered VTL') % plot(navSolution.RX_time(1,:)-time_reference_spirent_obs, pr_m_filt(1,:),'o','DisplayName','filtered VTL')
% hold off % hold off
% grid on % grid on
@ -58,13 +58,13 @@ plot(navSolution.RX_time-navSolution.RX_time(1),navSolution.vX,'.');
hold on;grid on hold on;grid on
plot(navSolution.RX_time-navSolution.RX_time(1),corr_kf_state(4,:),'.'); plot(navSolution.RX_time-navSolution.RX_time(1),corr_kf_state(4,:),'.');
plot(refSolution.SIM_time/1000-TTFF_sec,refSolution.vX... plot(refSolution.SIM_time/1000-TTFF_sec,refSolution.vX...
,'.','DisplayName','reference') ,'.','DisplayName','SPIRENT reference')
% plot(navSolution.RX_time-navSolution.RX_time(1),kf_xerr(4,:),'.'); % plot(navSolution.RX_time-navSolution.RX_time(1),kf_xerr(4,:),'.');
ylabel('vX (m/s)') ylabel('vX (m/s)')
xlabel('time U.A.') xlabel('time U.A.')
ylim([-5 5]) ylim([-5 5])
title('Subplot 1: vX ') title('Subplot 1: vX ')
legend ('raw navSolution','raw kf state','reference','Location','eastoutside') legend ('raw navSolution','raw kf state','SPIRENT reference','Location','eastoutside')
subplot(2,2,2); subplot(2,2,2);
plot(navSolution.RX_time-navSolution.RX_time(1),navSolution.vY,'.'); plot(navSolution.RX_time-navSolution.RX_time(1),navSolution.vY,'.');
@ -72,12 +72,12 @@ hold on;grid on
plot(navSolution.RX_time-navSolution.RX_time(1),corr_kf_state(5,:),'.'); plot(navSolution.RX_time-navSolution.RX_time(1),corr_kf_state(5,:),'.');
% plot(navSolution.RX_time-navSolution.RX_time(1),kf_xerr(5,:),'.'); % plot(navSolution.RX_time-navSolution.RX_time(1),kf_xerr(5,:),'.');
plot(refSolution.SIM_time/1000-TTFF_sec,refSolution.vY... plot(refSolution.SIM_time/1000-TTFF_sec,refSolution.vY...
,'.','DisplayName','reference') ,'.','DisplayName','SPIRENT reference')
ylabel('vY (m/s)') ylabel('vY (m/s)')
xlabel('time U.A.') xlabel('time U.A.')
ylim([-5 5]) ylim([-5 5])
title('Subplot 1: vY ') title('Subplot 1: vY ')
legend ('raw navSolution','raw kf state','reference','Location','eastoutside') legend ('raw navSolution','raw kf state','SPIRENT reference','Location','eastoutside')
subplot(2,2,3); subplot(2,2,3);
plot(navSolution.RX_time-navSolution.RX_time(1),navSolution.vZ,'.'); plot(navSolution.RX_time-navSolution.RX_time(1),navSolution.vZ,'.');
@ -85,12 +85,12 @@ hold on;grid on
plot(navSolution.RX_time-navSolution.RX_time(1),corr_kf_state(6,:),'.'); plot(navSolution.RX_time-navSolution.RX_time(1),corr_kf_state(6,:),'.');
% plot(navSolution.RX_time-navSolution.RX_time(1),kf_xerr(6,:),'.'); % plot(navSolution.RX_time-navSolution.RX_time(1),kf_xerr(6,:),'.');
plot(refSolution.SIM_time/1000-TTFF_sec,refSolution.vZ... plot(refSolution.SIM_time/1000-TTFF_sec,refSolution.vZ...
,'.','DisplayName','reference') ,'.','DisplayName','SPIRENT reference')
ylabel('vZ (m/s)') ylabel('vZ (m/s)')
xlabel('time U.A.') xlabel('time U.A.')
ylim([-5 5]) ylim([-5 5])
title('Subplot 1: vZ ') title('Subplot 1: vZ ')
legend ('raw navSolution','raw kf state','reference','Location','eastoutside') legend ('raw navSolution','raw kf state','SPIRENT reference','Location','eastoutside')
sgtitle('velocities') sgtitle('velocities')
@ -146,7 +146,9 @@ if(load_observables)
% hold off % hold off
% grid on % grid on
Rx_Dopp_28=figure('Name','RX_Carrier_Doppler_hz');plot(RX_time(1,:)-time_reference_spirent_obs, Carrier_Doppler_hz(1,:)','s') Rx_Dopp_28=figure('Name','RX_Carrier_Doppler_hz');
subplot(2,2,1)
plot(RX_time(1,:)-time_reference_spirent_obs, Carrier_Doppler_hz(1,:)','s')
xlim([0,140]); xlim([0,140]);
ylim([-2340,-2220]); ylim([-2340,-2220]);
xlabel('') xlabel('')
@ -155,11 +157,13 @@ if(load_observables)
grid on grid on
hold on hold on
legend('PRN 28 GNSS-SDR','Location','eastoutside') legend('PRN 28 GNSS-SDR','Location','eastoutside')
plot(refSatData.GPS.SIM_time/1000, Carrier_Doppler_hz_sim(:,1)','.','DisplayName','reference') plot(refSatData.GPS.SIM_time/1000, Carrier_Doppler_hz_sim(:,1)','.','DisplayName','SPIRENT reference')
plot(navSolution.RX_time(1,:)-time_reference_spirent_obs, sat_dopp_hz_filt(1,:),'o','DisplayName','filtered VTL') plot(navSolution.RX_time(1,:)-time_reference_spirent_obs, sat_dopp_hz_filt(1,:),'o','DisplayName','filtered VTL')
hold off;grid minor 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') % Rx_Dopp_4=figure('Name','RX_Carrier_Doppler_hz');
subplot(2,2,2)
plot(RX_time(1,:)-time_reference_spirent_obs, Carrier_Doppler_hz(2,:)','s')
xlim([0,140]); xlim([0,140]);
ylim([2540,2640]); ylim([2540,2640]);
xlabel('') xlabel('')
@ -168,11 +172,13 @@ if(load_observables)
grid on grid on
hold on hold on
legend('PRN 4 GNSS-SDR','Location','eastoutside') legend('PRN 4 GNSS-SDR','Location','eastoutside')
plot(refSatData.GPS.SIM_time/1000, Carrier_Doppler_hz_sim(:,2)','.','DisplayName','reference') plot(refSatData.GPS.SIM_time/1000, Carrier_Doppler_hz_sim(:,2)','.','DisplayName','SPIRENT reference')
plot(navSolution.RX_time(1,:)-time_reference_spirent_obs, sat_dopp_hz_filt(2,:),'o','DisplayName','filtered VTL') plot(navSolution.RX_time(1,:)-time_reference_spirent_obs, sat_dopp_hz_filt(2,:),'o','DisplayName','filtered VTL')
hold off;grid minor 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') % Rx_Dopp_17=figure('Name','RX_Carrier_Doppler_hz');
subplot(2,2,3)
plot(RX_time(1,:)-time_reference_spirent_obs, Carrier_Doppler_hz(3,:)','s')
xlim([0,140]); xlim([0,140]);
ylim([-1800,-1730]); ylim([-1800,-1730]);
xlabel('') xlabel('')
@ -181,11 +187,13 @@ if(load_observables)
grid on grid on
hold on hold on
legend('PRN 17 GNSS-SDR','Location','eastoutside') legend('PRN 17 GNSS-SDR','Location','eastoutside')
plot(refSatData.GPS.SIM_time/1000, Carrier_Doppler_hz_sim(:,3)','.','DisplayName','reference') plot(refSatData.GPS.SIM_time/1000, Carrier_Doppler_hz_sim(:,3)','.','DisplayName','SPIRENT reference')
plot(navSolution.RX_time(1,:)-time_reference_spirent_obs, sat_dopp_hz_filt(3,:),'o','DisplayName','filtered VTL') plot(navSolution.RX_time(1,:)-time_reference_spirent_obs, sat_dopp_hz_filt(3,:),'o','DisplayName','filtered VTL')
hold off;grid minor 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') % Rx_Dopp_15=figure('Name','RX_Carrier_Doppler_hz');
subplot(2,2,4)
plot(RX_time(1,:)-time_reference_spirent_obs, Carrier_Doppler_hz(4,:)','s')
xlim([0,140]); xlim([0,140]);
ylim([-2680,-2620]); ylim([-2680,-2620]);
xlabel('') xlabel('')
@ -194,54 +202,66 @@ if(load_observables)
grid on grid on
hold on hold on
legend('PRN 15 GNSS-SDR','Location','eastoutside') legend('PRN 15 GNSS-SDR','Location','eastoutside')
plot(refSatData.GPS.SIM_time/1000, Carrier_Doppler_hz_sim(:,4)','.','DisplayName','reference') plot(refSatData.GPS.SIM_time/1000, Carrier_Doppler_hz_sim(:,4)','.','DisplayName','SPIRENT reference')
plot(navSolution.RX_time(1,:)-time_reference_spirent_obs, sat_dopp_hz_filt(4,:),'o','DisplayName','filtered VTL') plot(navSolution.RX_time(1,:)-time_reference_spirent_obs, sat_dopp_hz_filt(4,:),'o','DisplayName','filtered VTL')
hold off;grid minor hold off;grid minor
end end
%% STATE PLOT %% STATE PLOT
VTL_STATE=figure('Name','VTL STATE'); VTL_STATE=figure('Name','VTL STATE');
subplot(2,2,1); subplot(2,2,1);
plot(navSolution.RX_time-navSolution.RX_time(1),corr_kf_state(1:3,:)'-corr_kf_state(1:3,3)','.'); plot(navSolution.RX_time-navSolution.RX_time(1),[navSolution.X-navSolution.X(1);...
navSolution.Y-navSolution.Y(1) ;navSolution.Z-navSolution.Z(1)],...
'b.','DisplayName','RTKLIB solution');
hold on;grid on hold on;grid on
plot(navSolution.RX_time-navSolution.RX_time(1),corr_kf_state(1:3,:)'-corr_kf_state(1:3,3)',...
'k.','DisplayName','filt VTL');
plot(refSolution.SIM_time/1000-TTFF_sec,[refSolution.X-refSolution.X(1)... plot(refSolution.SIM_time/1000-TTFF_sec,[refSolution.X-refSolution.X(1)...
refSolution.Y-refSolution.Y(1) refSolution.Z-refSolution.Z(1)],... refSolution.Y-refSolution.Y(1) refSolution.Z-refSolution.Z(1)],...
'.','DisplayName','reference'); 'r.','DisplayName','SPIRENT reference');
legend('Location','eastoutside');
ylim([-200,200]) ylim([-200,200])
xlim([0,120]) xlim([0,120])
ylabel('X Y Z (m)') ylabel('X Y Z (m)')
xlabel('time U.A.') xlabel('time [s]')
title('Subplot 1: POSITION ') title('Subplot 1: POSITION [m]')
subplot(2,2,2); subplot(2,2,2);
plot(navSolution.RX_time-navSolution.RX_time(1),corr_kf_state(4:6,:)','.'); plot(navSolution.RX_time-navSolution.RX_time(1),[navSolution.vX;...
navSolution.vY; navSolution.vZ],...
'b.','DisplayName','RTKLIB solution');
hold on;grid on hold on;grid on
plot(navSolution.RX_time-navSolution.RX_time(1),corr_kf_state(4:6,:)',...
'k.','DisplayName','filt VTL');
plot(refSolution.SIM_time/1000-TTFF_sec,[refSolution.vX... plot(refSolution.SIM_time/1000-TTFF_sec,[refSolution.vX...
refSolution.vY refSolution.vZ],... refSolution.vY refSolution.vZ],...
'.','DisplayName','reference'); 'r.','DisplayName','SPIRENT reference');
xlim([0,120]) xlim([0,120])
ylabel('vX vY vZ (m/s)') ylabel('vX vY vZ (m/s)')
xlabel('time U.A.') xlabel('time [s]')
title('Subplot 1: VELOCITIES ') title('Subplot 1: VELOCITIES [m/s]')
subplot(2,2,3); subplot(2,2,3);
plot(navSolution.RX_time-navSolution.RX_time(1),corr_kf_state(7,:),'.'); plot(navSolution.RX_time-navSolution.RX_time(1),clk_bias_s*SPEED_OF_LIGHT_M_S,...
ylim([3019190, 3019700]) 'b.','DisplayName','RTKLIB solution');
hold on;grid on hold on;grid on
plot(navSolution.RX_time-navSolution.RX_time(1),clk_bias_s*SPEED_OF_LIGHT_M_S,'.'); plot(navSolution.RX_time-navSolution.RX_time(1),corr_kf_state(7,:),...
'k.','DisplayName','filt VTL');
ylim([3019190, 3019700])
xlim([0,120]) xlim([0,120])
ylabel('clk bias (m)') ylabel('clk bias (m)')
xlabel('time U.A.') xlabel('time [s]')
title('Subplot 1: clk bias') title('Subplot 1: clk bias [m]')
legend('vtl','rtklib')
subplot(2,2,4); subplot(2,2,4);
plot(navSolution.RX_time-navSolution.RX_time(1),corr_kf_state(8,:),'.'); plot(navSolution.RX_time-navSolution.RX_time(1),clk_drift*SPEED_OF_LIGHT_M_S,...
'b.','DisplayName','RTKLIB solution');
hold on;grid on hold on;grid on
plot(navSolution.RX_time-navSolution.RX_time(1),clk_drift*SPEED_OF_LIGHT_M_S,'.'); plot(navSolution.RX_time-navSolution.RX_time(1),corr_kf_state(8,:),...
'k.','DisplayName','filt VTL');
xlim([0,120]) xlim([0,120])
ylabel('clk drift (m/s)') ylabel('clk drift (m/s)')
legend('vtl','rtklib') xlabel('time [s]')
xlabel('time U.A.') title('Subplot 1: clk drift [m/s]')
title('Subplot 1: clk drift ')
sgtitle('VTL STATE') sgtitle('VTL STATE')