function adi_array_geom
%
% Displays array geometry in array geometry file format at beginning
% of time period specified in RDA.
%
% Routines that work with array geometry files include:
% adi_array_make, adi_array_plot, adi_array_rot, adi_array_find, adi_array_geom;
%
gui_global

jT=1;
% Pull out current receiver position and heading:
%xy_src=SRC.txyvp(jT,2:3); v_src=SRC.txyvp(jT,4); phi_src=SRC.txyvp(jT,5);
xy_rec=REC.txyvp(jT,2:3); v_rec=REC.txyvp(jT,4); phi_rec=REC.txyvp(jT,5);
%
nxy=REC.nxy; nzr=REC.nzr;
% Element one is at front of array heading in phi_rec direction:
rot_mat=[sin(phi_rec) cos(phi_rec); -cos(phi_rec) sin(phi_rec)];
xy_array=REC.dxy*rot_mat;
%
%if exist('TLr')==1,
%	disp(num2str(TLr.c_src(1),6))
%elseif exist('TL'),
%	disp(num2str(TL.c_src(1),6))
%end
disp(' ')
disp(' ')
disp('  RDA Array Geometry File: ')
disp(' ')
disp(sprintf('%1i %4.4f %4.4f %4.4f\n',[ones(REC.nph,1), 1000*xy_array, REC.dzr]'))

disp(' ')
disp(' ')
disp('  ABX Array Geometry File: ')
disp(' ')
disp('*(10) RECEIVER ARRAY SPECIFICATION: IIARR (1=uniform, 2=nonuniform)')
disp('2');
disp('!!! NOTE: POS z POINTS UP (OPPOSITE OF GAMARAY INPUT FILE) !!!')
disp('IIARR=1: uniformly spaced receiver array')
disp('*(11) zr1  nx  ny  nz   dx    dy    dz  [dx,dy,dz are element spacings]')
disp('     500.  20   1   1   10.   20.   20.')
disp('IIARR=2: receiver array depths. nzr>0 ==> give zr1,zr2,... ;')
disp('   nzr<0 ==> give zr1,dz2,dz3... (dz are element spacings, pos down)')
disp('*(12) nzr   zr1  zr2(dz2) zr3(dz3) ...')
disp([sprintf('%1i  ',REC.nzr),sprintf('%2.2f ',REC.z + REC.dzr(1:REC.nzr)')])
disp('IIARR=2: specify (x,y) receiver positions for each of the nzr depths:')
disp('*(13) nxy  x(1),y(1)  x(2),y(2) ... x(nxy),y(nxy) [nzr lines like this]')
disp(sprintf('%1i',REC.nxy))
disp(sprintf('%4.4f  %4.4f\n',[1000*xy_array(1:REC.nxy-1,:)'])) 
disp(sprintf('%4.4f  %4.4f',[1000*xy_array(REC.nxy,:)'])) 
disp('*(14) Average sound speed')
disp(sprintf('%6.2f',REC.c))
%
% COPYRIGHT (c) 2008
% 
% Applied Research Laboratories, The University of Texas at Austin
% (ARL:UT)
% All rights reserved.
% 
% This material may be reproduced by or for the U.S. Government
% only. This notice must appear in all copies of this file and its
% derivatives. Further distribution outside the U.S. Government is
% prohibited without the explicit written authorization from the
% Director of the Environmental Sciences Laboratory, ARL:UT.
% 
% THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
% EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE
% IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
% PURPOSE, OR NONINFRINGEMENT.
% 
% IN NO EVENT WILL ARL:UT BE LIABLE FOR ANY DAMAGES WHATSOEVER ARISING
% OUT OF THE USE OR INABILITY TO USE THIS SOFTWARE, EVEN IF ARL:UT HAS
% BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
