clear all %close all run /users/swinkels/deploy/MatlabVirgoTools/trunk/startup.m %% write the GPS from the 00 and 02 scans % GPS_00 = utc2gps(2022,07,16, 15, 50, 23); % TEM00 L1z +20.000 % GPS_02 = utc2gps(2022,07,16, 15, 54, 19); % L1z +20.000 GPS_00 = utc2gps(2022,07,16, 15, 22, 08); % TEM00 L1z +20.000 GPS_02 = utc2gps(2022,07,16, 15, 26, 25); % L1z +20.000 % GPS_00 = utc2gps(2022,07,16, 15, 50, 01); % TEM00 L1z +20.000 % GPS_02 = utc2gps(2022,07,16, 15, 54, 19); % L1z +20.000 % %% Section for analyzing TEM00 only and got the reference for mode 02 clear B8sum B7sum sumb7 sumb8 North_00 West_00 B7 B8 t7 t8 B7_t B8_t scan_length = 3*60; % durata scan in minuti n = scan_length/42; dur = 17; B7name = 'SNEB_B7_DC'; B8name = 'SWEB_B8_DC'; for k = 1:n [B7, t7] = getChannel(B7name,GPS_00+(k*42)+1,dur); [B8, t8] = getChannel(B8name,GPS_00+(k*42)+1,dur); B7_t = B7-mean(B7(1:8000)); B8_t = B8-mean(B8(1:8000)); B8sum = sum(B8_t); B7sum = sum(B7_t); sumb7(k) = B7sum; sumb8(k) = B8sum; end North_00 = mean(sumb7) West_00 = mean(sumb8) %% Section for analyzing TEM02 scan_length = 4*60; % durata scan in minuti clear B8sum B7sum sumb7 sumb8 B7 B8 t7 t8 W N B7_t B8_t n = scan_length/42; dur = 17; B7name = 'SNEB_B7_DC'; B8name = 'SWEB_B8_DC'; for k = 1:n [B7, t7] = getChannel(B7name,GPS_02+(k*42)+2,dur); [B8, t8] = getChannel(B8name,GPS_02+(k*42)+2,dur); B7_t = B7-mean(B7(1:8000)); B8_t = B8-mean(B8(1:8000)); B8sum = sum(B8_t); B7sum = sum(B7_t); sumb7(k) = B7sum; sumb8(k) = B8sum; end red = [0.85, 0.325, 0.098]; blue = [0, 0.447, 0.741]; t = linspace(1,n,n); for k = 1:n W(k) = sumb8(k); N(k)= sumb7(k); end %% figure() plot(t*42/60,W/West_00,'-*','Color',red, 'linewidth',2) hold on plot(t*42/60, N/North_00, '-*','Color',blue, 'linewidth',2) grid on; grid minor %ylim([0.012, 0.035]) % xlim([0, 18]) legend(sprintf('West mismatch percentage is = %2.2f, 2xstd = %2.2f', mean(W)/West_00*100, 2*std(W/West_00*100)),... sprintf('North mismatch percentage is = %2.2f, 2xstd = %2.2f', mean(N)/North_00*100, 2*std(N/North_00*100))) set(gca,'FontSize',25,'Fontname','Helvetica') % title ('UTC: ' + string(GPS_02)) % title(sprintf(gps2str(GPS_02))) sgtitle(sprintf(gps2str(GPS_02)),'color',blue,'fontsize',25,'Fontname','Helvetica') xlabel('minutes') ylabel('coupling into TEM2') return %% salvataggio dataset save 3.mat % West_00 North_00 GPS N W t