52 lines
1.8 KiB
Mathematica
52 lines
1.8 KiB
Mathematica
|
|
%--- Include folders with functions ---------------------------------------
|
||
|
|
addpath include % The software receiver functions
|
||
|
|
addpath geoFunctions % Position calculation related functions
|
||
|
|
%% Clean up the environment first =========================================
|
||
|
|
%%clc; close all; %
|
||
|
|
format ('compact');
|
||
|
|
format ('long', 'g');
|
||
|
|
load trackingResults
|
||
|
|
% plotTracking(1:settings.numberOfChannels, trackResults, settings)
|
||
|
|
sat2Remove=[];
|
||
|
|
for sat=sat2Remove
|
||
|
|
trackResults(find([trackResults.PRN]==sat))=[];
|
||
|
|
channel(find([trackResults.PRN]==sat))=[];
|
||
|
|
|
||
|
|
end
|
||
|
|
settings.numberOfChannels=settings.numberOfChannels-length(sat2Remove);
|
||
|
|
settings.navSolPeriod=100;
|
||
|
|
navSolutions = postNavigationSnapshot(trackResults, settings);
|
||
|
|
plotNavigation(navSolutions,settings);
|
||
|
|
|
||
|
|
idx=3;
|
||
|
|
P=sqrt(trackResults(idx).I_P.^2+trackResults(idx).Q_P.^2);
|
||
|
|
E=sqrt(trackResults(idx).I_E.^2+trackResults(idx).Q_E.^2);
|
||
|
|
L=sqrt(trackResults(idx).I_L.^2+trackResults(idx).Q_L.^2);
|
||
|
|
|
||
|
|
figure;hold on;
|
||
|
|
tt=(1:length(E))/1000;
|
||
|
|
h=plot(tt,E,'-*r');
|
||
|
|
plot(tt,P,'-*b');
|
||
|
|
plot(tt,L,'-*y');
|
||
|
|
xlabel('seconds');
|
||
|
|
grid on;
|
||
|
|
hLegend= legend('$\sqrt{I_{E}^2 + Q_{E}^2}$', ...
|
||
|
|
'$\sqrt{I_{P}^2 + Q_{P}^2}$', ...
|
||
|
|
'$\sqrt{I_{L}^2 + Q_{L}^2}$');
|
||
|
|
set(hLegend, 'Interpreter', 'Latex');
|
||
|
|
|
||
|
|
refCoord.E = mean(navSolutions.E(~isnan(navSolutions.E)));
|
||
|
|
refCoord.N = mean(navSolutions.N(~isnan(navSolutions.N)));
|
||
|
|
refCoord.U = mean(navSolutions.U(~isnan(navSolutions.U)));
|
||
|
|
figure;
|
||
|
|
plot( [(navSolutions.E - refCoord.E)', ...
|
||
|
|
(navSolutions.N - refCoord.N)',...
|
||
|
|
(navSolutions.U - refCoord.U)']);
|
||
|
|
|
||
|
|
title ( 'Coordinates variations in UTM system');
|
||
|
|
legend('E', 'N', 'U');
|
||
|
|
xlabel( ['Measurement period: ', ...
|
||
|
|
num2str(settings.navSolPeriod), 'ms']);
|
||
|
|
ylabel('Variations (m)');
|
||
|
|
grid ;
|
||
|
|
axis ([0 240 -200 200]);
|