Go to the bottom.
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! SDDL Name:	QTEPHEMERIS.SDDL
!
! Purpose:      This SDDL file defines the qtephemeris relation.
!
! Modification History:
!
!   Date       OPR      Who                       Reason
! --------   -------    ---   -------------------------------------------------
! 11/15/94    27329     SSS   Original implementation
! 06/23/95    28910     NLC   Remove SPSS_NODE processing;
!			      the FACILITY field should be removed from this 
!			      relation the next time the relation is modified.
!
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
 
LANGUAGE	FORTRAN, SQL

INCLUDE         ZSPSS_USER_TYPES.SDDL
 
RECORD  QTEPHM_TYPE
 
    DESCRIPTION       "This relation maintains a catalog of moving target
                       ephemeris information.  One record for each moving
                       target is contained in this relation.  'qtephemeris' 
                       is only read from and written to by the SPSS EPHFILE/* 
                       programs, but an initial record for each moving
                       target must be created (using PFORM TEF) prior to
                       executing the EPHFILE/* programs.   The 'qtmchebychev'
                       relation contains one or more Chebychev polynomial fit
                       coefficient records for each record in 'qtephemeris'.
                       See relation 'qtmchebychev' for more information."
 

    FIELD  target_id
        TYPE TARGET_ID_TYPE
        DESCRIPTION     "This is a unique name assigned to the target.  This
                         field is used for joins with relations 'qtmchebychev'
                         and 'qtargets'."
        FORM
            NAME         "TEF"
            LABEL        "TARGET ID"
        END_FORM
        RELATED_FIELDS  "qtmchebychev.target_id" "qtargets.target_id"

    END_FIELD
 

    FIELD  ephemeris
        TYPE            C30
        DESCRIPTION     "This is the file name of the file containing the
                         geocentric light-time corrected ephemeris data.  
                         This is a binary file with geocentric earth mean 
                         equator (epoch J2000) cartesian position and velocity
                         vectors (Kilometers/Seconds).  Each state vector also 
                         includes a time in coordinated universal time 
                         expressed in the number of seconds past 1980.  The 
                         file is assumed to be located in the path of the VMS
                         logical SPSSULIB.   The file extension is also 
                         assumed to be '.EPC'."
        FORM
            NAME         "TEF"
            LABEL        "EPHEMERIS"
        END_FORM
        RELATED_FIELDS  "qtmchebychev.eph_file"
    END_FIELD
 

    FIELD  facility
        TYPE            C7
        DESCRIPTION     "This is an obsolete field. " 
        FORM
            NAME         "TEF"
            LABEL        "(SPSS_SC/SPSS_IF)"
        END_FORM
        DISCRETE        "SPSS_IF",  "SPSS_SC"
    END_FIELD
 

    FIELD  start_time
        TYPE SOGS_CHAR_TIME_TYPE
        DESCRIPTION     "This is the ephemeris file start time (uncorrected
                         for light-travel time)."
        FORM
            NAME         "TEF"
            LABEL        "EPHEMERIS START"
        END_FORM
    END_FIELD
 

    FIELD  stop_time
        TYPE SOGS_CHAR_TIME_TYPE
        DESCRIPTION     "This is the ephemeris file stop time (uncorrected
                         for light-travel time)."
        FORM
            NAME         "TEF"
            LABEL        "EPHEMERIS END"
        END_FORM
    END_FIELD
 

    FIELD  cor_start
        TYPE SOGS_CHAR_TIME_TYPE
        DESCRIPTION     "This is the light-time corrected ephemeris file 
                         start time."
        FORM
            NAME         "TEF"
            LABEL        "COR EPH START"
        END_FORM
    END_FIELD
 

    FIELD  cor_stop
        TYPE SOGS_CHAR_TIME_TYPE
        DESCRIPTION     "This is the light-time corrected ephemeris file 
                         end time."
        FORM
            NAME         "TEF"
            LABEL        "COR EPH END"
        END_FORM
    END_FIELD
 

    FIELD  window_file
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "This is a flag which indicates whether user supplied
                         target visibility windows (type 'MT') are to be 
                         loaded into relation 'qbwindows' for this target.  
                         These windows are loaded directly into the PMDB by 
                         an SQL file and they are used to restrict the 
                         scheduling of observations of the target. 'Y' 
                         implies a window file is to be used.  'N' indicates 
                         a window file is not to be used."
        FORM
            NAME         "TEF"
            LABEL        "WINDOW FILE  (Y/N)"
        END_FORM
    END_FIELD
 

    FIELD  resolution
        TYPE            C1
        DESCRIPTION     "This a flag to indicate the numerical resolution of 
                         the Chebychev polynomials to be computed for the 
                         ephemeris.  'H' indicates high resolution and 'L' 
                         indicates low resolution."
        FORM
            NAME         "TEF"
            LABEL        "RESOLUTION   (H/L)"
        END_FORM
        DISCRETE        "H",  "L"
        RELATED_FIELDS  "qtmchecbychev.resolution"
    END_FIELD
 

    FIELD  spc_src
        TYPE            C4
        DESCRIPTION     "This field indicates the ephemeris data source for the
                         ephemeris file.  The possible choices are 'JPL', 
                         'ORB', or 'EPH'.  
                        
                         'JPL' indicates that the Jet Propulsion Lab Export 
                         Planetary Ephemeris file is to be used to create the 
                         target ephemeris file.  This file is currently 
                         SPSSLIB:WEMJPL.EPM and it contains ephemerides for 
                         the Sun, Anti-Sun (viewed from Earth), Moon, and the
                         9 major planets for a time span well beyond the 
                         lifetime of the HST.   

                         'EPH' indicates that a user supplied ephemeris file is
                         to be used.  In most cases this file is produced using
                         the Moving Object Support System (MOSS).

                         'ORB' indicates the ephemeris file was generated by 
                         the EPHFILE/STPOLE program.  These files contain 
                         ephemeris data for either the north or south pole of
                         the HST orbit.  The source for the HST orbit data is
                         an HST orbit file."
        FORM
            NAME         "TEF"
            LABEL        "DATA SOURCE (EPH/JPL/ORB)"
        END_FORM
        DISCRETE         "EPH", "JPL", "ORB"
    END_FIELD
 

    FIELD  ephem_delta
        TYPE SOGS_INT_TIME_TYPE
        DESCRIPTION     "This is the delta time step to be used when the 
                         field 'spc_src' is 'JPL'.  This time step is used 
                         as the time increment when reading the JPL Export 
                         Planetary Ephemeris file."
        FORM
            NAME         "TEF"
            LABEL        "EPHEMERIS DELTA"
        END_FORM
    END_FIELD
 

    FIELD  max_fit_deg
        TYPE            I4
        DESCRIPTION     "This is a user supplied limit on the the maximum 
                         allowed degree of Chebychev polynomials to be 
                         computed by the EPHFILE/FIT program."
        FORM
            NAME         "TEF"
            LABEL        "MAX FIT DEGREE (5-25)"
        END_FORM
        RANGE             "5..25"
    END_FIELD
 

    FIELD  fit_strt_tim
        TYPE SOGS_INT_TIME_TYPE
        DESCRIPTION     "This is the overall start time of the Chebychev 
                         polynomials computed for the target by the 
                         EPHFILE/FIT program."
        FORM
            NAME         "TEF"
            LABEL        "FIT START"
        END_FORM
    END_FIELD
 

    FIELD  fit_end_tim
        TYPE SOGS_INT_TIME_TYPE
        DESCRIPTION     "This is the overall end time of the Chebychev 
                         polynomials computed for the target by the EPHFILE/FIT
                         program."
        FORM
            NAME         "TEF"
            LABEL        "FIT END"
        END_FORM
    END_FIELD
 

    FIELD  freq_eph_pts
        TYPE            I4
        DESCRIPTION     "This is the frequency of data points to be selected
                         from the ephemeris file for fitting by the EPHFILE/FIT
                         program.  In other words, select every th point 
                         in the file."
        FORM
            NAME         "TEF"
            LABEL        "FIT EPHEMERIS SAMPLE RATE"
        END_FORM
    END_FIELD
 

    FIELD  min_int_dur
        TYPE SOGS_INT_TIME_TYPE
        DESCRIPTION     "This is a user supplied minimum time limit over which
                         one Chebychev polynomial will be valid.  This field
                         is used by EPHFILE/FIT."
        FORM
            NAME         "TEF"
            LABEL        "MIN INTERVAL LENGTH"
        END_FORM
    END_FIELD
 

    FIELD  max_int_dur
        TYPE SOGS_INT_TIME_TYPE
        DESCRIPTION     "This is a user supplied maximum time limit over which
                         one Chebychev polynomial will be valid.  This field
                         is used by EPHFILE/FIT."
        FORM
            NAME         "TEF"
            LABEL        "MAX INTERVAL LENGTH"
        END_FORM
    END_FIELD
 

    FIELD  max_ang_err
        TYPE            R4
        UNITS           "ARCSECONDS"
        DESCRIPTION     "This is the user supplied maximum angular error 
                         allowed. This is used by EPHFILE/FIT when 
                         calculating Chebychev polynomials."
        FORM
            NAME         "TEF"
            LABEL        "MAX ALLOWED ANG ERROR"
        END_FORM
    END_FIELD
 

    FIELD  max_dx_err
        TYPE            R4
        UNITS           "ARCSECONDS"
        DESCRIPTION     "This is the user supplied maximum allowed range 
                         (distance to target) error allowed.   This is used by
                         EPHFILE/FIT when calculating Chebychev polynomials."
        FORM
            NAME         "TEF"
            LABEL        "MAX ALLOWED DIS ERROR"
        END_FORM
    END_FIELD
 

    FIELD  res_err_in_x
        TYPE            R4
        UNITS           "KILOMETERS"
        DESCRIPTION     "This is the maximum residual error in the X vector 
                         component computed by EPHFILE/FIT.  This is a 
                         'goodness-of-fit' measure."
        FORM
            NAME         "TEF"
            LABEL        "RESIDUAL ERROR IN X"
        END_FORM
    END_FIELD
 

    FIELD  res_err_in_y
        TYPE            R4
        UNITS           "KILOMETERS"
        DESCRIPTION     "This is the maximum residual error in the Y vector 
                         component computed by EPHFILE/FIT.  This is a 
                         'goodness-of-fit' measure."
        FORM
            NAME         "TEF"
            LABEL        "RESIDUAL ERROR IN Y"
        END_FORM
    END_FIELD
 

    FIELD  res_err_in_z
        TYPE            R4
        UNITS           "KILOMETERS"
        DESCRIPTION     "This is the maximum residual error in the Z vector 
                         component computed by EPHFILE/FIT.  This is a 
                         'goodness-of-fit' measure."
        FORM
            NAME         "TEF"
            LABEL        "RESIDUAL ERROR IN Z"
        END_FORM
    END_FIELD
 

    FIELD  rms_err_in_x
        TYPE            R4
        UNITS           "KILOMETERS"
        DESCRIPTION     "This is the root mean square (RMS) error in the  
                         X vector component computed by EPHFILE/FIT.  This 
                         is a 'goodness-of-fit' measure."
        FORM
            NAME         "TEF"
            LABEL        "RMS ERROR IN X"
        END_FORM
    END_FIELD
 

    FIELD  rms_err_in_y
        TYPE            R4
        UNITS           "KILOMETERS"
        DESCRIPTION     "This is the root mean square (RMS) error in the  
                         Y vector component computed by EPHFILE/FIT.  This 
                         is a 'goodness-of-fit' measure."
        FORM
            NAME         "TEF"
            LABEL        "RMS ERROR IN Y"
        END_FORM
    END_FIELD
 

    FIELD  rms_err_in_z
        TYPE            R4
        UNITS           "KILOMETERS"
        DESCRIPTION     "This is the root mean square (RMS) error in the  
                         Z vector component computed by EPHFILE/FIT.  This 
                         is a 'goodness-of-fit' measure."
        FORM
            NAME         "TEF"
            LABEL        "RMS ERROR IN Z"
        END_FORM
    END_FIELD
 

    FIELD  mean_err_dir
        TYPE            R4
        UNITS           "ARCSECONDS"
        DESCRIPTION     "This is the mean angular error (in direction) computed
                         by EPHFILE/FIT. This is a 'goodness-of-fit' measure."
        FORM
            NAME         "TEF"
            LABEL        "MEAN DIRECTION ERROR"
        END_FORM
    END_FIELD
 

    FIELD  mean_err_dis
        TYPE            R4
        UNITS           "ARCSECONDS"
        DESCRIPTION     "This is the mean range (distance to target) error 
                         computed by EPHFILE/FIT. This is a 'goodness-of-fit' 
                         measure."
        FORM
            NAME         "TEF"
            LABEL        "MEAN DISTANCE ERROR"
        END_FORM
    END_FIELD
 

    FIELD  rms_err_dir
        TYPE            R4
        UNITS           "ARCSECONDS"
        DESCRIPTION     "This is the root mean squared (RMS) angular error 
                         (in direction) computed by EPHFILE/FIT. This is a 
                         'goodness-of-fit' measure."
        FORM