!   TITLE:  mma_sweep.mac (MMA WBDDS)
!
!---------------------------------------------------------------------------
!       Rev -     08/19/2006        D. Edwards
!---------------------------------------------------------------------------
!
!   OBJECTIVE:
!
!   Make repeated calls to ground_load.mac to sweep through the entire
!   stroke from fully closed to fully opened.  Store the results in
!   a file named "mma.dat".
!
!   COMMAND SYNTAX:
!               
!        mma_sweep
!
!   ARGUMENTS:
!
!           None
!
!   DESCRIPTION:
!
!   The results file will be in space delimited column format with
!   a header row defining the name of each variable.
!
!   Return:
!
!       mma.dat
!
!---------------------------------------------------------------------------
!

Adoor1 = 0               ! [deg] Doors closed
Adoor2 = 95              ! [deg] Doors open

!
! Write the header row
!
/out,mma,dat
*vwrite
('Adoor Arga Mrga Height CGoy CGoz CGiy CGiz d1 d2')
/out


!
! Loop through each upper panel angle
!
*do,ar10,Adoor1,Adoor2,1

gl,ar10

/out,mma,dat,,append
! 19 parameters can be written  
*vwrite,Adoor,Arga,Mrga,Height,CGoy,CGoz,CGiy,CGiz,d1,d2
(10E18.8)
/out

*enddo