
rnx_file = 'sjdv0100.02o';
eph_file = 'epgga2.010';
sp3_file = 'igs11484.sp3';
obs = 'P1';
iter = 4;
decim = 1;

[L,SL,X,G,PDOP,T] = get_pos(rnx_file,eph_file,obs,iter,decim);

disp(['Standard deviations in N, E, U (m): ' ...
       num2str(std(L(:,1))) ', ' ...
       num2str(std(L(:,2))) ', ' ...
       num2str(std(L(:,3)))]);

figure; hold on;
xlabel(['Time (dec. hours)']);
ylabel(['Position (m)']);
title(['red = N, green = E, blue = U']);
plot(T,mean(L(:,1))-L(:,1),'r');
plot(T,mean(L(:,2))-L(:,2),'g');
plot(T,mean(L(:,3))-L(:,3),'b');
axis([0 23.8 -150 150]);

[L,SL,X,G,PDOP,T] = get_pos_WORK(rnx_file,eph_file,sp3_file,obs,iter,decim);

disp(['Standard deviations in N, E, U (m): ' ...
       num2str(std(L(:,1))) ', ' ...
       num2str(std(L(:,2))) ', ' ...
       num2str(std(L(:,3)))]);

figure; hold on;
xlabel(['Time (dec. hours)']);
ylabel(['Position (m)']);
title(['red = N, green = E, blue = U']);
plot(T,mean(L(:,1))-L(:,1),'r');
plot(T,mean(L(:,2))-L(:,2),'g');
plot(T,mean(L(:,3))-L(:,3),'b');
axis([0 23.8 -150 150]);

