% Initial version: Magnus Billvik, Swedish Institute of Space Physics,
%Uppsala, June 2005

windowsize=[0 0 1275 945];
index=[istart:iend];

figure(1);
set(gcf,'Position', windowsize);
subplot(2,1,1);
plot(jd(index)+timediff,sphi(index));
hold on;
plot(jd(index)+timediff,sphi(index),'r.');
datetick('x',15);
xlabel('time');
ylabel('phi (azimuth in the x->-z plane)');
subplot(2,1,2);
plot(jd(index)+timediff,stheta(index));
hold on;
plot(jd(index)+timediff,stheta(index),'r.');
ylim([-5 5]);
datetick('x',15);
xlabel('time');
ylabel('theta (elevation above the zx plane)');
suptitle('Sun position vector in ROS ref. system (10 oct 2004)');

figure(2);
set(gcf,'Position', windowsize);
subplot(4,1,1);
plot(jd(index)+timediff, q1(index));
datetick('x',15);
xlabel('time');
ylabel('q1');
subplot(4,1,2);
plot(jd(index)+timediff, q2(index));
datetick('x',15);
xlabel('time');
ylabel('q2');
subplot(4,1,3);
plot(jd(index)+timediff, q3(index));
datetick('x',15);
xlabel('time');
ylabel('q3');
subplot(4,1,4);
plot(jd(index)+timediff, q4(index));
datetick('x',15);
xlabel('time');
ylabel('q4');
suptitle('Rosetta attitude quaternions (10 oct 2004)');