FTN77 
      PROGRAM CXPHS(3,99), COMPUTE EPHEMERIS OF CIR X-1 <930729.2106> 
**    *************************************************************** 
* 
*     WRITTEN ON 1990 JULY 06 
* 
********************************************************************* 
* 
      DIMENSION ITIME(5)
* 
      INTEGER IYR 
      INTEGER ICSECS, ISECS, IMINS, IHRS, IDAYS 
      DATA T0 /299.99/, P0 /16.5768/, PDOT /-0.0000352/ 
* 
*     Read time on control computer 
* 
      CALL EXEC (11,ITIME,IYR)
* 
*     Calculate phase at current time 
* 
      NOYRS = IYR - 1976
      NODAYS = NOYRS*365 + (IYR - 1973)/4 + ITIME(5)
      DAY    = (ITIME(3)/60 + ITIME(4))/24. 
      DAYS   = DAY  + NODAYS
* 
*     Calculate no of cycles since day T0 1976
* 
      DO 552 NCYCL = 1,660
         EPOCH = T0 + (P0 + PDOT*NCYCL)*NCYCL 
           IF (EPOCH.GT.DAYS) GO TO 553 
 552       CONTINUE 
 553  PERIOD = P0 + 2*PDOT*NCYCL
      PHASE  = (EPOCH -DAYS)/PERIOD 
      WRITE (1,100) IYR, ITIME(5), ITIME(4), ITIME(3), PHASE
 100  FORMAT ( "PHASE AT ",I4,"DAY ",I4,2I3, "UT IS: " F10.3) 
      END 
      END$
