      program xlatlon
!
!     Exercise driver for subroutine latlon
!
!     B. Knapp, 98.11.19
C
C     RCS DATA
C     
C     $Header$
C     
C     $Log$
C
C
!
      implicit none
!
      real*8 jd0, jd, hour, eci(3), lat, lon, mag
      parameter (hour = 1.d0/24.d0)
      integer*4 j
!
 1    write(*,'(/a$)') ' ECI (x,y,z)? '
      read(*,*) eci
      write(*,'(a$)') ' JD? '
      read(*,*) jd0
!
!     Normalize eci
      mag = 0.d0
      do j=1,3
         mag = mag+eci(j)**2
      enddo
      mag = sqrt( mag )
      do j=1,3
         eci(j) = eci(j)/mag
      enddo
      write(*,'(a6,3f20.6)') ' ECI: ',eci
!
      do j=0,23
         jd = jd0+hour*j
         call latlon( jd, eci, lat, lon )
         write(*,'(i6,3f20.6)') j, jd, lat, lon
      enddo
      goto 1
!
      end
