next up previous contents index
Next: D.16 ISO Guide-Star Tycho Up: D. Satellite Files Previous: D.14 ISO Star-Tracker Calibration

Subsections



D.15 ORBIT

The ORBIT file contains all the information needed to reconstruct the orbital parameters of the ISO spacecraft. As it is not merely a tabulation of data conforming to the FITS standard but also contains, for example, variable numbers of interpolation coefficients, some accompanying software is required for its proper use. The subroutine MC_ORBIT, listed at the end of this section may be used for this purpose.

This file holds also compressed and detailed information about the complete history of the spacecraft's geocentric position and velocity. For the convenience of observers, at three times during an observation (at the start, middle and end) ISO's heliocentric velocity and velocity towards the target is determined from this file and inserted in the headers of the corresponding instrument data files as described in the instrument specific volumes (II to V) of this Handbook. These data are kept in two sets of three keywords, TREFHEL1,2,3 and TREFDOP1,2,3, along with the corresponding UTC and orbital phase, kept in the TREFCOR1,2,3 and TREFPHA1,2,3 keywords. Note that the spacecraft velocities reported do not include any component of the velocity of the target, SSO or otherwise.

D.15.1 Primary header

The ORBIT file contains a primary header with the fields described in Table D.36. In this example non-mandatory fields are filled with example values.

Table D.36: ORBIT primary header.
Keyword Value Description
SIMPLE = T /
BITPIX = 8 /
NAXIS = 0 /
EXTEND = T /
ORIGIN = 'ESA ' / European Space Agency
TELESCOP = 'ISO ' / Infrared Space Observatory
COMMENT   Compressed orbit file
FILENAME = 'ORBIT' / File name in ISO archive
DATE = '07/07/98' / Creation date
FILEVERS = '1350 ' / Version ID in ISO archive
OLPVERS = 'OLP_632 ' / SOC OLP system version
CALGVERS = 'CALG_31 ' / SOC OLP CAL-G files version
USERNAME = 'PIPELINE' /
COMMENT   This file contains ISO orbit data. It can only be interpreted
    using the software `MCRORB' within the MC package,
    or using similar software supplied directly by ESOC.

D.15.2 Records

The ORBIT file contains records described in Table D.37.

Table D.37: ORBIT records.
Keyword Number Format Description
ORBITDAT 1 A80 Orbit parameters (composite structure)


D.15.3 MC_ORBIT subroutine

This section lists the FORTRAN subroutine used to read the ORBIT file above described. There is only one call in this subroutine that needs explanation, that of MCRPR.


        CALL MCRPR (LFILE, RECORD, 80, EOF, BUFFER)

reads from unit number LFILE (I*4) record number RECORD (I*4). This record is expected to be 80 bytes long. If, on return, the logical EOF is true it indicates that the requested record was out of the range of the file, otherwise the record is placed in BUFFER (in this case C*80).



        SUBROUTINE MC_ORBIT(DAY,KODE,LFILE,IERROR,NSAT,X,REVNUM)
  C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  CP  ORBIT: RETRIEVAL ROUTINE FOR COMPRESSED LTOF/STOF ORBIT FILE, 
  C          delivered under the original name of "ORBIT" by ESOC/OAD. 
  C
  C   The following changes have been made by J. Sternberg to the original
  C   routine supplied by ESOC/OAD in March 1995.
  C     1. Name changed to MC_ORBIT (= MC package convention).
  C     2. Every formatted READ statement was converted to an UNformatted READ
  C        (MCRPR) followed by an internal READ, keeping the same statement
  C        numbers for the FORMAT, "END=" and "ERR=" labels.
  C     3. NEXT_RECORD was introduced, to keep track of file position, 
  C        because ORBIT is a direct access file instead of sequential.
  C     4. A REWIND statement was replaced by an assignment of NEXT_RECORD to 1.
  C     5. IMPLICIT statement was completed for all initial letters, due to
  C        /WARNINGS option being in use. 
  C   Anyone outside the SOC trying to use this routine could de-integrate it
  C   from the MC package, by reversing the above-mentioned changes, i.e. by
  C   removing everything to do with MCRPR, LFILE_BUFFER, and NEXT_RECORD. 
  C
  C   OAD's UPDATE OF 1994/08/30
  C   OAD's UPDATE OF 1995/03/24: REMOVE REFERENCE TO CLUSTER
  C                               CHANGE SEARCH FOR FIRST BLOCK RECORD
  C                               RETURN EARLIEST/LATEST DATES IF INVALID DAY
  C 
  C   INPUT:
  CI  DAY (R*8) = MODIFIED JULIAN DAY, FROM 2000, FOR THE STATE VECTOR
  CI  KODE (I*4) = NUMBER OF COMPONENTS OF STATE VECTOR = DIM. OF ARRAY
  C              X(); = 3 FOR S/C POSITION, = 6 FOR POSITION & VELOCITY
  CI  LFILE (I*4) = LOGICAL NUMBER OF INPUT DATA FILE
  C   OUTPUT:
  CO  IERROR (I*4) = RETURN CODE: 0=NO ERROR, 1='DAY' TOO EARLY, 2=TOO
  C            LATE, 3=TIME GAP IN DATA, 4=WRONG VALUE OF 'KODE',
  C            5=FILE CONTENT INCONSISTENT, 6=READ ERROR FROM DATA FILE
  CO  NSAT (I*4) = SATELLITE NUMBER: FROM 1 to 99
  CO  X(KODE) (R*8) = SPACECRAFT POSITION, KM (AND VELOCITY, KM/S)
  CO                  IF 'IERROR' = 1 THEN X(2) = EARLIEST TIME (MJD2000)
  CO                  IF 'IERROR' = 2 THEN X(3) = LATEST TIME (MJD2000)
  CO  REVNUM (R*8) = REVOLUTION NUMBER
  C
  CF  READS A SEQUENTIAL FORMATTED FILE WITH LOGICAL NUMBER 'LFILE'
  C--------------------------------------------------------------------
        IMPLICIT REAL*8(A-H,O-Z), INTEGER*4(I-N)
        DIMENSION Y(6),COEFF(10,6),X(KODE)
        CHARACTER*3 CH3
        INTEGER*4 LFILE_BUFFER(20)   !added by JRS, for integration with MC
        CHARACTER*80 CFILE_BUFFER    !added by JRS, for integration with MC
        EQUIVALENCE (LFILE_BUFFER, CFILE_BUFFER) !  for integration with MC
        INTEGER*4 NEXT_RECORD        !added by JRS, for integration with MC
        LOGICAL*4 EOF                !added by JRS, for integration with MC
  C   INITIALISE FILE NUMBER TO FORCE FILE READING AT FIRST CALL
        DATA MFILE/-9999/
  C
  C  PARAMETERS SAVED INSIDE ROUTINE: NSATIN,MFILE,DAYFIR,DAYLAS,Y(),
  C  RDIST,COEFF(,),KOEFF,DAYBEG,DAYEND,EPOCH,REVEPO,SMAXIS,OMOTIN
        SAVE
  C
  C  INITIALISE ERROR CODES
        IERROR = 0
        IF(KODE .LE. 0) GOTO 504
        IF(KODE .GT. 6) GOTO 504
  C
  C  ALWAYS REWIND IF A NEW FILE NUMBER IS USED
        IF(LFILE .NE. MFILE) GOTO 10
  C
  C  CHECK IF 'DAY' IS INSIDE LAST READ RECORD BLOCK
        IF(DAY .GT. DAYEND + 1.D-4) GOTO 20
        IF(DAY .GE. DAYBEG - 1.D-4) GOTO 70
  C
  C  INITIALISE THE READING FROM THE FILE
  10    DAYFIR = 99.D9
        DAYLAS = 99.D9
        MFILE = LFILE
  C     REWIND LFILE       !Commented out by JRS, since not correct for MC
        NEXT_RECORD = 1    !Added by JRS, to replace REWIND
  C
  20    CONTINUE
  C  READ 1ST RECORD IN A BLOCK
        CALL MCRPR (LFILE, NEXT_RECORD, 80, EOF, LFILE_BUFFER)
        NEXT_RECORD = NEXT_RECORD + 1
        IF (EOF) GOTO 509
        READ (CFILE_BUFFER,41,ERR=506) NSATIN, CH3
  41    FORMAT(I3,A3)
  C  IF: CH3 IS '  P' OR '  R' THEN THIS IS 1ST RECORD IN A BLOCK
        IF(CH3.NE.'  P' .AND. CH3.NE.'  R') GOTO 20
        NSAT = NSATIN
  C
  C  READ 2ND RECORD IN THE BLOCK
  CF  NREC = RECORD IDENTIFICATION, SHALL BE = 200 + NSATIN
  CF  DAYBEG = BEGIN TIME OF THE RECORD (MJD)
  CF  DAYEND = END TIME OF THE RECORD (MJD)
  CF  EPOCH = EPOCH OF REFERENCE STATE VECTOR (MJD)
  CF  REVEPO = REVOLUTION NUMBER AT EPOCH
  CF  SMAXIS = SEMIMAJOR AXIS FOR THE KEPLER ORBIT
  CF  OMOTIN = INVERSE MEAN MOTION FOR THE KEPLER ORBIT
        CALL MCRPR (LFILE, NEXT_RECORD, 80, EOF, LFILE_BUFFER)
        NEXT_RECORD = NEXT_RECORD + 1
        IF (EOF) GOTO 509
        READ (CFILE_BUFFER,42,ERR=506)
       &NREC,DAYBEG,DAYEND,EPOCH,REVEPO,SMAXIS,OMOTIN
  42    FORMAT(I3,2F12.6,F15.9,F11.3,2F13.5)
  C  CHECK CONSISTENCY OF FILE
        IF(NREC .NE. 200 + NSATIN) GOTO 505
        IF(DAYBEG .GT. DAYEND) GOTO 505
  C
  C  DAYFIR = START TIME OF 1ST RECORD ON 1ST BLOCK ON THE FILE - MARGIN
        DAYFIR = DMIN1(DAYFIR,DAYBEG - 1.D-4)
  C  ERROR RETURN IF 'DAY' IS BEFORE START OF FILE (WITH MARGIN)
        IF(DAY .LT. DAYFIR) THEN
          X(2) = DAYFIR
          GO TO 501
        ENDIF
  C  ERROR RETURN IF THERE IS A GAP FROM LAST BLOCK (WITH MARGIN)
        IF(DAYBEG .GT. DAYLAS) GOTO 503
  C  DAYLAS = END TIME OF LAST READ RECORD BLOCK + MARGIN
        DAYLAS = DAYEND + 2.D-4
  C
  C  CONTINUE READ IF 'DAY' IS AFTER END OF THIS RECORD BLOCK
        IF(DAY .GT. DAYEND + 1.D-4) GOTO 20
  C  REWIND WHEN 'DAY' IS EARLIER THAN START OF PRESENT RECORD BLOCK
        IF(DAY .LT. DAYBEG - 1.D-4) GOTO 10
  C
  C  READ 3RD RECORD IN THE BLOCK
  CF  NREC = RECORD IDENTIFICATION, SHALL BE = 300 + NUMBER OF POL.COEFF.
  CF  Y(6) = REFERENCE STATE VECTOR FOR KEPLER ORBIT (KM, KM/S)
  CF  RDIST = S/C EARTH CENTRE DISTANCE AT EPOCH
        CALL MCRPR (LFILE, NEXT_RECORD, 80, EOF, LFILE_BUFFER)
        NEXT_RECORD = NEXT_RECORD + 1
        IF (EOF) GOTO 505
        READ (CFILE_BUFFER,43,ERR=506) NREC,Y,RDIST
  43    FORMAT(I3,3F11.3,3F11.7,F11.3)
  
  C  CHECK CONSISTENCY OF FILE
        IF(NREC .GT. 310) GOTO 505
        IF(NREC .LT. 300) GOTO 505
  C   KOEFF = NUMBER OF POLYNOMIAL COEFFICIENTS, BETWEEN 0 AND 10
        KOEFF = NREC - 300
  C
  C  IF THERE ARE NO COEFFICIENTS IN THIS BLOCK
        IF(KOEFF. LE. 0) GOTO 70
        DO 60 K = 1,KOEFF
  CF  NREC = RECORD IDENT. = KOEFF + 11*K
  CF  COEFF(10,6) = MATRIX WITH UP TO 10 COEFFICIENTS OF THE CHEBYSHEV
  CF  POLYNOMIAL FOR EACH OF THE 6 COMPONENTS OF THE STATE VECTOR
        CALL MCRPR (LFILE, NEXT_RECORD, 80, EOF, LFILE_BUFFER)
        NEXT_RECORD = NEXT_RECORD + 1
        IF (EOF) GOTO 505
        READ (CFILE_BUFFER,44,ERR=506) NREC,(COEFF(K,I),I=1,6)
  44    FORMAT(I3,3F11.3,3F11.7)
  C
  C  CHECK CONSISTENCY OF FILE
        IF(11*K + KOEFF .NE. NREC) GOTO 505
  60    CONTINUE
  C  END OF BLOCK READING SEQUENCE, PROVIDE OUTPUT DATA
  70    CONTINUE
  C
  C  TIME CONVERTED TO DIFFERENCE IN MEAN ANOMALY
        DMANOM = (DAY - EPOCH)*864.D2/OMOTIN
  C  ORBIT NUMBER
        REVNUM = REVEPO + DMANOM/6.2831853072D0
  C
  C  START MODELLING KEPLER ORBIT
        ARIN = SMAXIS/RDIST
        ARM = (RDIST - SMAXIS)/SMAXIS
        RVWAM = (Y(1)*Y(4) + Y(2)*Y(5) + Y(3)*Y(6))*OMOTIN/SMAXIS**2
  C  CALC. OF ECC. ANOMALY BY NEWTON'S ITERATION
        TAM = DMANOM - RVWAM
        COMP = 1.D-7 + 1.D-10*DABS(TAM)
        B = TAM
  C  ITERATIONS TO SOLVE KEPLER'S EQUATION:
        DO 130 ITER = 1,15
        GO = DCOS(B)
        G1 = DSIN(B)
        BET = TAM - ARM*G1 + RVWAM*GO
        D = (BET - B)/(1.D0 + ARM*GO + RVWAM*G1)
        B = B + D
  C  THIS GIVES THE ACCURACY  1.D-14 IN B & THE G'S
        IF(DABS(D) .LE. COMP) GOTO 140
  130   CONTINUE
  C  NO CONVERGENCE, ERROR RETURN
        GOTO 505
  140   CONTINUE
        GO = GO - D*G1
        G1 = G1 + D*GO
        G2 = 1.D0 - GO
        G3 = B - G1
        FX = 1.D0  - G2*ARIN
        GX = (DMANOM - G3)*OMOTIN
  C
        K = MIN0(KODE,3)
        DO 150 J = 1,K
  150   X(J) = FX*Y(J) + GX*Y(J+3)
  C
        IF(KODE .LE. 3) GOTO 170
        RX = DSQRT(X(1)**2 + X(2)**2 + X(3)**2)
        FT = -G1*SMAXIS*ARIN/(OMOTIN*RX)
        GT = 1.D0 - G2*SMAXIS/RX
        DO 160 J = 4,KODE
  160   X(J) = FT*Y(J-3) + GT*Y(J)
  C  END OF MODELLING KEPLER ORBIT
  170   CONTINUE
  C
  C  CHECK IF POLYNOMIAL COEFFICIENTS ARE REQUIRED (1 IS NOT WORTH WHILE)
        IF(KOEFF .LE. 1) GOTO 600
  C  MID-POINT & SCALE FACTOR FOR CHEBYSHEV POLYNOMIAL
        DAYMID = 0.5D0*(DAYBEG + DAYEND)
        SCALE = 4.D0/(DAYEND - DAYBEG)
  C  ADD CHEBYSHEV POLYNOMIAL TO KEPLER STATE VECTOR
        S = SCALE*(DAY - DAYMID)
        PA = 1.D0
        P = S*0.5D0
  C
  C  'KODE' = NUMBER OF COMPONENTS OF THE STATE VECTOR
        DO 200 J = 1,KODE
  200   X(J) = X(J) + COEFF(1,J) + COEFF(2,J)*P
  C
        IF(KOEFF .LE. 2) GOTO 600
        DO 210 L = 3,KOEFF
        PB = PA
        PA = P
        P = S*PA - PB
        DO 210 J = 1,KODE
  210   X(J) = X(J) + COEFF(L,J)*P
  230   CONTINUE
  C
        GOTO 600
  C  ERROR RETURNS; IERROR = 5, 6, 4, 3, 2 OR 1
  509   CONTINUE
  C  END-OF-FILE ONLY IF AT LEAST ONE RECORD HAS BEEN READ
        IF(DAYLAS .LT. 1.D9) THEN
          X(3) = DAYLAS
          GOTO 502
        ENDIF
  505   IERROR = -1
  506   IERROR = IERROR + 2
  504   IERROR = IERROR + 1
  503   IERROR = IERROR + 1
  502   IERROR = IERROR + 1
  501   IERROR = IERROR + 1
  C  FORCE A RE-INITIALISATION OF READ AT NEXT CALL AFTER AN ERROR
        MFILE = -9999
  600   RETURN
        END


next up previous contents index
Next: D.16 ISO Guide-Star Tycho Up: D. Satellite Files Previous: D.14 ISO Star-Tracker Calibration
ISO Handbook Volume I (GEN), Version 2.0, SAI/2000-035/Dc