      program xget_tle_subset
!
!     Exercise driver for subroutine get_tle_subset
!
!     B. Knapp, 2003-12-12
!
      implicit none
!
!     Input to get_tle_subset
      integer*4 SpacecraftID, maxSets
      parameter (SpacecraftID=27651, maxSets=1024)
      integer*4 pathlen
      character*43 path
     &   /'/mizar/proj/sorce/science_data_system/data/'/
!    &   /'/home/betelgeuse/knapp/norad_tle/sorce_history/'/
!
!     Output from get_tle_subset
      integer*4 nSets, nGood, Status
      real*8 EpochJd(maxSets), dNdT(maxSets), d2NdT2(maxSets),
     &   Incl(maxSets), Node(maxSets), E(maxSets), Omega(maxSets),
     &   M(maxSets), N(maxSets), bStar(maxSets)
      character*8 IntlNo(maxSets)
      integer*4 EltSetNo(maxSets), OrbitNo(maxSets)
      character*1 ClsLvl(maxSets), EphTyp(maxSets)
!
!     Externals
      external get_tle_subset
!
      pathlen = len(path)
      call get_tle_subset( SpacecraftID, pathlen, path, maxSets, nSets,
     &   nGood, ClsLvl, IntlNo, EltSetNo, EphTyp, OrbitNo, EpochJd,
     &   dNdT, d2NdT2, bStar, Incl, Node, E, Omega, M, N, Status )
!
      write(*,*) nSets, nGood, Status, EpochJD(nGood)
      end
