%% function oiareaplot()
clear; clf;

pixx = 1936;
pixy = 1436;
pixd = sqrt(pixx.^2 + pixy.^2);

dfov = 90;

alt = 3; 

diag = 2*(alt*sind(dfov/2));

picx = diag*(pixx/pixd);

picy = diag*(pixy/pixd);

pixelx = picx/pixx;
pixely = picy/pixy;


figure(1);

rectangle('Position', [-picx/2 0.06 picx pixely],'EdgeColor','k','LineWidth',2, 'FaceColor','w');
%rectangle('Position', [-picx/2+.1 -pixely/2 picx pixely],'EdgeColor','k','LineWidth',2);

%axis equal;
%axis off;
hold on;


mbswath = 140;
mbx = 2*(alt*sind(mbswath/2));
mby = 0.05;

mbpingxy = 0.05;


rectangle('Position', [-mbx/2 0 mbx mby],'EdgeColor','k','LineWidth',2,'FaceColor','w');


lidarsw = 30;
ldx = 2*(alt*sind(lidarsw/2));
ldy = 0.01

ldpingxy = 0.01;

rectangle('Position', [-ldx/2 .1 ldx ldy],'EdgeColor','k','LineWidth',2,'FaceColor','w');


shipxy = 10;
auvxy  = 1;

return

figure(2);

%rectangle('Position', [0 0 shipxy shipxy],'EdgeColor','k','LineWidth',2,'Facecolor',[.9 .9 .9]);
%rectangle('Position', [0 0 auvxy auvxy],'EdgeColor','k','LineWidth',2,'Facecolor','w');
rectangle('Position', [0 0 mbpingxy mbpingxy],'EdgeColor','k','LineWidth',2,'Facecolor',[.9 .9 .9]);
hold on;axis equal; axis off;
rectangle('Position', [0 0 ldpingxy ldpingxy],'EdgeColor','k','LineWidth',2,'Facecolor','w');
rectangle('Position', [0 0 pixelx pixely],'EdgeColor','k','LineWidth',2,'Facecolor',[.9 .9 .9]);
