      PROGRAM XCONSTELLATION
!
!     EXERCISE DRIVER FOR CONSTELLATION.FOR
!
!     B. KNAPP, 1994-12-27, 2001-04-26 (ADD JD ARGUMENT)
!
C
C     RCS DATA
C     
C     $Header$
C     
C     $Log$
C
C
      IMPLICIT NONE

      CHARACTER*3 CONSTELLATION, CONST
      REAL*8 EPOCH
      REAL*4 RA,DEC,RAN1
      INTEGER*4 J, SEED

      CHARACTER*3 CONST1875
      EXTERNAL CONST1875, CONSTELLATION, RAN1

!     Generate random RA, Dec
      SEED = -123454321
      DO J=1,1000000
         RA = RAN1(SEED)*24.0
         DEC = RAN1(SEED)*180.0-90.0
         CONST=CONST1875(RA,DEC)
         IF (CONST .EQ. '???') THEN
            WRITE(*,20) RA, DEC, CONST
 20         FORMAT(2F16.8,A6)
         ENDIF
      ENDDO
      
    1 WRITE(*,'(/A$)') ' Epoch, RA, Dec: '
      READ(*,*) EPOCH,RA,DEC
      CONST=CONSTELLATION(EPOCH,RA,DEC)
      WRITE(*,10) RA,DEC,CONST
   10 FORMAT(' RA = ',F10.6,', DEC = ',F10.6,' is in ',A3)
      GOTO 1
      END
