% Create a plot of the IASI 2x2 FOVs and Imager 64x64 pixel square FOV
%

% Based on the following info:
%
% source: Eumesat "IASI Level 1 Products Guide" (section 4)
%    IASI scan range = +- 48.333 degrees
%    A swath (scan line) consists of 30 IASI FOVs
%    Each IASI FOV is composed of a square 2x2 of IFOVs
%    IASI IFOV diameter = 14.65 mrad (0.839 deg)
%    Imager (ISS) FOV is aligned to match the IASI FOV
%    Imager FOV is a square composed of 64x64 pixels
%    Imager FOV is 59.63 x 59.63 mrad (3.416 x 3.416 deg)
%
% source: CNES technical documents "Dossier definition des algorithmes"
%    Distance of IASA IFOV central axis from FOV central axis = 0.88 deg
%
% Derived info:
%    IASI scan step distance = 3.33 degrees (2 * 48.33 degrees / 29 steps)
%    IASI IFOV separation = 1.25 degrees (0.88 deg * 2*sin(45 deg))

%
% Created: 27 Nov 2007, Scott Hannon
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Radius of each ifov
rifov=0.839/2;


% Positions of the four ifovs
x1 =  1.25/2;
y1 = -1.25/2;
x2 =  1.25/2;
y2 =  1.25/2;
x3 = -1.25/2;
y3 =  1.25/2;
x4 = -1.25/2;
y4 = -1.25/2;


% Circle of radius rifov
xx=-rifov:(rifov/1000):rifov;
yy=sqrt(rifov.^2 - xx.^2);
xxx=[xx, xx(2001:-1:1)];
yyy=[yy, -yy(2001:-1:1)];


% 64x64 pixels boundary grid
xx=1:65;
x=ones(65,1)*xx;
y=xx'*ones(1,65); %'
x33=x-33;
y33=y-33;
scale=3.416/64;
xs=x33*scale;
ys=y33*scale;


% Plot data
plot(xs,ys,'b',ys,xs,'b')
hold
plot(xxx+x1,yyy+y1,'r',xxx+x2,yyy+y2,'r',xxx+x3,yyy+y3,'r',xxx+x4,yyy+y4,'r')
plot(x1,y1,'r.',x2,y2,'r.-',x3,y3,'r.-',x4,y4,'r.-')
plot(0,0,'c.')
axis([-1.8 1.8 -1.8 1.8])

%%% end of program %%%
