subroutine TLE_Subset( nIn, nOut, ClsLvl, IntlNo, EltSet, EphTyp, & Orbit, EpochJD, dNdT, d2NdT2, bStar, Incl, Node, E, & Omega, M, N, Status ) ! ! Select a "consistent" subset of the input NORAD (USSPACECOM) ! two-line orbit element sets. The input arrays are overwritten ! by the output. ! ! B. Knapp, 2000-05-26 ! implicit none ! ! Input integer*4 nIn ! ! Input/Output real*8 EpochJD(nIn), dNdT(nIn), d2NdT2(nIn), Incl(nIn), Node(nIn), & E(nIn), Omega(nIn), M(nIn), N(nIn), bStar(nIn) character*8 IntlNo(nIn) integer*4 EltSet(nIn), Orbit(nIn) character*1 ClsLvl(nIn), EphTyp(nIn) ! ! Output integer*4 nOut, Status ! ! Externals external TLE_Filter ! ! Static: none ! ! Local integer*4 j !, nGood1 ! ! Verify that elements are sorted in ascending order of Epoch do j=1,nIn-1 if ( EpochJd(j+1) .le. EpochJd(j) ) then Status = 98 return endif enddo ! ! Perform one round of internal consistency checking (select ! a consistent subset) call TLE_Filter( nIn, nOut, ClsLvl, IntlNo, EltSet, EphTyp, & Orbit, EpochJD, dNdT, d2NdT2, bStar, Incl, Node, E, & Omega, M, N, Status ) ! call TLE_Filter( nGood1, nOut, ClsLvl, IntlNo, EltSet, EphTyp, ! & Orbit, EpochJD, dNdT, d2NdT2, bStar, Incl, Node, E, ! & Omega, M, N, Status ) if ( Status .ne. 0 ) then Status = 97 return endif ! ! We must have at least four TLE sets if ( NOut .lt. 4 ) then Status = 96 return endif ! ! All is well! Status = 0 return end