From 1b0a3f6b378acac06810392550abd9ad459cea98 Mon Sep 17 00:00:00 2001 From: miguekf Date: Tue, 3 Jan 2023 13:40:58 +0100 Subject: [PATCH] ADD: matlab skyplot implemented --- .../vtl/pvt_raw_plotting_SPIRENT_GnssSDR.m | 32 +++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/src/utils/matlab/vtl/pvt_raw_plotting_SPIRENT_GnssSDR.m b/src/utils/matlab/vtl/pvt_raw_plotting_SPIRENT_GnssSDR.m index cf743c75a..dc933909b 100644 --- a/src/utils/matlab/vtl/pvt_raw_plotting_SPIRENT_GnssSDR.m +++ b/src/utils/matlab/vtl/pvt_raw_plotting_SPIRENT_GnssSDR.m @@ -30,7 +30,7 @@ channels=6; TTFF_sec=41.48; %% ============================ PARSER TO STRUCT ============================ -plot_skyplot=0; % not yet implemented +plot_skyplot=1; plot_reference=1; load_observables=1; advance_vtl_data_available=1; @@ -371,4 +371,32 @@ if(load_observables) grid on end %% -dopp_filtered_plotting \ No newline at end of file +dopp_filtered_plotting +%% +labels = ["G1", "G22", "E17", "E11"]; %inizialitation neccesary +if(plot_skyplot) + + for i=1:length(refSatData.GPS.SIM_time) + for j=1:length(refSatData.GPS.series(i).Sat_PRN) + + labels{i,j} = ['G' num2str(refSatData.GPS.series(i).Sat_PRN(j))]; + + if(refSatData.GPS.series(i).azimuth(j)<0) + az(i,j) = rad2deg(refSatData.GPS.series(i).azimuth(j))+360; + else + az(i,j) = rad2deg(refSatData.GPS.series(i).azimuth(j)); + end + el(i,j) = rad2deg(refSatData.GPS.series(i).elevation(j)); + end + groups(i,:) = categorical([0 0 1 1], [0 1], ["GPS", "Galileo"]); + end + % skyplot(az(i,:), el(i,:), labels, "GroupData", groups) + figure; + %skyplot(az(500,:), el(500,:), labels(500,:)) + sp = skyplot(az(1,:),el(1,:),labels(1,:)); + for idx = 1:length(az) + set(sp,AzimuthData=az(1:idx,:),ElevationData=el(1:idx,:)); + drawnow limitrate + end + legend('GPS') +end \ No newline at end of file