1 subroutine get_elements(iyr,iday,sec,secend,fit,orbout,cdrg,
2 * iyorb,idorb,secorb,irec,ier)
60 #include "nav_cnst.fin"
62 real*8 orbout(6),orb1(6),orb2(6),cdrg,sec,secend
63 real*8 secorb,tdif,s,cd,tdifen,oneorb
64 integer*4 iyr,iday,iyorb,idorb,irec,ier,lun,spare
65 integer*4 jd,jdr,jdo,i,nrecs,iy,id
72 filnm =
'$ELEMENTS/elements.dat'
74 open(lun,file=filnm,status=
'old',access=
'direct',err=990,
75 * recl=128, convert=
'big_endian')
78 read(lun,rec=1,err=990) nrecs
85 read (lun,rec=irec,err=990) iy,id,s,orb1,orb2,cd,forb,spare
86 write(*,*) iy,id,s,orb1,orb2,cd,forb
88 tdif = (jdo-jdr)*864.d2 + s - sec
89 tdifen = tdif + sec - secend
90 if (tdifen.lt.(-oneorb)) fit = .false.
98 print *,
'GET_ELEMENTS:',
99 *
' No elements in file preceding requested time'
102 read (lun,rec=irec,err=990) iy,id,s,orb1,orb2,cd,forb,spare
104 tdif = (jdo-jdr)*864.d2 + s - sec
107 tdifen = tdif + sec - secend
108 if (tdifen.lt.0.) fit = (fit.and.forb)
128 print *,
'GET_ELEMENTS:',iyorb,idorb,secorb,fit
135 990 print *,
'Error reading elements file'