Go to the bottom.
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! SDDL Name:	QALIGNMENT.SDDL
!
! Purpose:      This SDDL file defines the qalignment relation.
!
! Modification History:
!
!   Date       PR      Who                       Reason
! --------   -------   ---   -------------------------------------------------
! 11/18/94   27329     RJS   Original implementation
! 03/17/95   27408     RJS   Update CALC_SAM description
! 07/20/95   28642     SXT   Add new fields: low_sky & moon_avd_ang
! 11/10/95   28062     SBA   overlaps
! 01/31/96   28642     MRB   Expand information on fields low_sky & moon_avd_ang
! 03/12/96   20893     MRB   Remove TDRS contact fields, IM now using QReadout
! 05/10/96   31409     NLC   Added field: si_intrlv
! 09/06/96   30680     SXT   Updated int_aftr_ths and max_sep_dur comments.
! 05/27/98   36717     RJS   Updated description of pointing mode
! 05/29/98   35967     MMB   Added C language
! 06/07/99   38865     EGB   Add another index for better perf on ref_targ_id
!			     queries.
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
 
LANGUAGE	C, FORTRAN, SQL

INCLUDE         ZSPSS_USER_TYPES.SDDL
 
RECORD  QALIGN_TYPE
 
!------------------------------------------------------------------------------
!
!   RECORD INFORMATION
!
!------------------------------------------------------------------------------
 
    DESCRIPTION    "This is the master relation for alignment data in the PMDB.

		    An alignment is a collection of exposures that are grouped
                    together based upon changes in the target/aperture
                    combinations and the length of a visibility period. That
                    is, a separate alignment is generated if the target or
                    aperture changes between eposures or the sum of the
                    exposure times is greater than a visibility period.
		    In general, alignments that are grouped into an 
		    observation set all share the same pointing. 

		    Alignments are the lowest level entity that the SPSS
		    calendar scheduling software deals with.  The calendar
		    is not concernerd with exposures.  The commands PMDB/UPDATE,
		    CCLIST/CREATE, and CALENDAR/*, and others access most of 
		    the fields in this relation.  

		    Data contained here ranges from alignment SAA information,
		    to timing information, alignment target usage, PCS 
		    restrictions, and much more."

!------------------------------------------------------------------------------
!
!   FIELD INFORMATION
!
!------------------------------------------------------------------------------
 

    FIELD  proposal_id
        TYPE PROPOSAL_ID_TYPE
        FORM
            NAME         "AGD"
            LABEL        "PROPOSAL ID"
        END_FORM
    END_FIELD
 

    FIELD  obset_id
        TYPE OBSET_ID_TYPE
        FORM
            NAME         "AGD"
            LABEL        "OBSET    ID"
        END_FORM
    END_FIELD
 

    FIELD  alignment_id
        TYPE ALIGN_ID_TYPE
        FORM
            NAME         "AGD"
            LABEL        "ALIGN    ID"
        END_FORM
    END_FIELD
 

    FIELD  version_num
        TYPE VERSION_NUM_TYPE
        FORM
            NAME         "AGD"
            LABEL        "VERSION NUM"
        END_FORM
    END_FIELD
 

    FIELD  align_type
        TYPE            C2
        DESCRIPTION     "This field specifies the type of alignment, where
                            'TA' = target acquisition
                            'DC' = data collection
                            'CA' = calibration
                            'RC' = si reconfiguration
                            'NL' = null.
                        type indicates the predominant type of exposures
                        associated with the alignment."
        FORM
            NAME         "AGD"
            LABEL        "ALIGN. TYPE  (CA/DC/RC/TA/NL)"
        END_FORM
        DISCRETE        "CA",  "DC",  "NL",  "RC",  "TA"
    END_FIELD
 

    FIELD  low_priority
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "When this field is 'Y' it indicates this alignment 
			 is for a low priority target."
        FORM
            NAME         "AGD"
            LABEL        "LOW PRIORITY TARGET/ALGN (Y/N)"
        END_FORM
    END_FIELD
 

    FIELD  astrometry
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "When this field is 'Y' it indicates this is an 
			 astrometry alignment."
        FORM
            NAME         "AGD"
            LABEL        "ASTROMETRY ALIGN. FLAG   (Y/N)"
        END_FORM
    END_FIELD
 

    FIELD  sequence
        TYPE            I2
        DESCRIPTION     "This field specifies the sequence number (order) of
                        this alignment in the observation set.

                        The software sorts alignments based on two sort fields:
                                sequence and alignment id; 
 
                        therefore if all sequence fields are zero (by default), 
			the alignments will be sequenced by alignment_id."
        FORM
            NAME         "AGD"
            LABEL        "SEQUENCE NUMBER"
        END_FORM
    END_FIELD
 

     FIELD  excute_slew
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "When this field is 'Y' it indicates this alignment 
			 can be executed during a maneuver. It is illegal
			 to attach a parallel to this alignment.  When this
                         flag is 'Y', then there is a POSSIBILITY that a
                         maneuver would overlap the alignment.  In this
                         overlap situation, the parallel place (maneuver to
                         maneuver) is undefined.  To avoid having to deal
                         with this undefined state, SPSS will not allow a
			 parallel SU that is attached to any primary alignment
                         whose excute_slew ='Y' to be added to the C&Clist
                         via CCLIST/CREATE or CANDLIST/ADDSUS."
        FORM
            NAME         "AGD"
            LABEL        "EXECUTE DURING SLEW"
        END_FORM
    END_FIELD
 

    FIELD  oss_overload
        TYPE            I4
        UNITS           "SECONDS"
        DESCRIPTION     "This field specifies the OSS overload time. This is
                        the amount of time to allow after this alignment if
                        it is followed by real time activity.
                        This gives OSS enough time to catch up
                        with their processing so that they can process the
                        real time data."
        FORM
            NAME         "AGD"
            LABEL        "OSS OVERLOAD TIME"
        END_FORM
    END_FIELD
 

    FIELD  shadow
        TYPE            C1
        DESCRIPTION     "This field indicates how this alignment
                        must be scheduled relative to the earth's shadow.
                            'Y' = must be scheduled in shadow.
                            'A' = must be scheduled to avoid shadow.
                            'C' = must avoid shadow crossing.
                            'N' = no constraint at all."
        FORM
            NAME         "AGD"
            LABEL        "SCHED. IN EARTH SHAD (Y/N/A/C)"
        END_FORM
        DISCRETE        "A",  "C",  "N",  "Y"
    END_FIELD
 

    FIELD  interrupt
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "When this field is 'Y' it indicates this alignment
                         can be interrupted for occultations and other reasons.
			 'N' means it must be scheduled as a whole entity."
        RELATED_FIELDS  "qalignment.int_overhead" "qalignment.min_interrup" "qbs_obset.interrupt"

        FORM
            NAME         "AGD"
            LABEL        "INTERRUPTION ALLOWED     (Y/N)"
        END_FORM
    END_FIELD
 

    FIELD  min_interrup
        TYPE            I4
        DESCRIPTION     "This field specifies the minimum duration for each
                        interrupted alignment segment.  This is set only
                        if the QALIGNMENT.interrupt field='Y'. For each
                        non-interruptable alignment, this field is set to
                        QALIGNMENT.time_require less any start and end
                        overheads. This is set during PMDB/UPDATE."
        RELATED_FIELDS  "qalignment.interrupt"
        UNITS           "SECONDS"
        FORM
            NAME         "AGD"
            LABEL        "MIN. SCIENCE DURATION"
        END_FORM
    END_FIELD
  

    FIELD  interleaver
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "When this field is 'Y' it indicates that a same SI
                        interleaver is allowed."
        FORM
            NAME         "AGD"
            LABEL        "SAME SI INTERLEAVERS     (Y/N)"
        END_FORM
    END_FIELD
 

    FIELD  int_aftr_ths
        TYPE            C1
        DESCRIPTION     "This field indicates whether or not an
                        interrupt is permitted between this alignment
                        and the next. The setting of this flag determines
                        the method used to get the values for min and max
                        separation between this alignment and the one
                        following: QALIGNMENT.min_sep_dur and
                        QALIGNMENT.max_sep_dur. 
                            'D' means take the default values for
                                qalmnp and qalmxp,
                            'Y' means do not recompute these values,
                            'N' causes values to be computed for these
                                variables which eliminate in scheduling
                                the chance for an interrupt occuring.
                        This field is also added for CANDLIST/DISPLAY(pr.30680).
                        For more details see the requirements written by
                        J. Isaacs in the comment section of opr 18592."
        FORM
            NAME         "AGD"
            LABEL        "INTERRUPT PERMITTED BETWEEN THIS ALIGN.
                         AND THE NEXT       (Y/N/D)"
        END_FORM
        DISCRETE        "D",  "N",  "Y"
    END_FIELD
 

    FIELD  calc_sam
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "When this field is 'Y' it indicates a SAM calculation 
			 is to be performed by PMDB/UPDATE for this alignment
                         (target acquisition or science).  The result is
                         stored in SAM_TIME.  When set to 'N',
                         and the alignment requires a SAM, then the user
                         specified SAM_TIME via PFORM AGD will be used in
                         scheduling.  Note that scheduling will also compute
                         a SAM duration.  The maximum of the scheduling
                         and PMDB/UPDATE/TYPE=SU computed SAM durations
                         will be used to schedule a SAM activity."
        FORM
            NAME         "AGD"
            LABEL        "CALC. SMALL ANGLE MANEUVER"
        END_FORM
    END_FIELD
 

    FIELD  sam_time
        TYPE            I4
        UNITS           "SECONDS"
        DESCRIPTION     "This field specifies the small angle maneuver time
                        required to be scheduled before this alignment
                        (target acquisition or science) begins."
        FORM
            NAME         "AGD"
            LABEL        "SMALL ANGLE MANUEVER TIME"
        END_FORM
    END_FIELD
 

    FIELD  acq_time
        TYPE            I4
        DESCRIPTION     "This field specifies the target acquisition time
                        required for this pointing.  This is the time to be
                        scheduled for the initial target acquisition for
                        this alignment. This time will be scheduled
                        uninterrupted."
        UNITS           "SECONDS"
        FORM
            NAME         "AGD"
            LABEL        "TARGET ACQUISITION"
        END_FORM
    END_FIELD
  

    FIELD  time_require
        TYPE            I4
        DESCRIPTION     "This field specifies the total science time
                        associated with this alignment. This should include
                        the sum of exposure times including SI configuration
                        change time, readout time, SI calibration time, etc.
                        It excludes the initial target acquisition time."
        UNITS           "SECONDS"
        FORM
            NAME         "AGD"
            LABEL        "TOTAL ALIGN. SCI. TIME"
        END_FORM
    END_FIELD
  

    FIELD  time_calc
        TYPE            I4
        UNITS           "SECONDS"
        DESCRIPTION     "This field specifies the total calculated alignment
                        time.  It specifies the total time associated with
                        pointing for this alignment. This includes the sum of
                        exposure times including SI configuration change
                        time, readout time, target (re)acquisition times,
                        and the SI calibration time."
        FORM
            NAME         "AGD"
            LABEL        "CALC. ALIGN. TIME"
        END_FORM
    END_FIELD
  

    FIELD  backgr_lite
        TYPE            R4
        DESCRIPTION     "This field specifies background light requirements.
                        It is the signal to noise ratio used in the exposure
                        time tool (SOGS ii) to calculate exposure time based
                        on when the alignment is scheduled. This is set in
                        PMDB/UPDATE as the most restrictive (maximum) of all
                        associated exposure values."
        FORM
            NAME         "AGD"
            LABEL        "BACKGROUND LIGHT LEVEL"
        END_FORM
    END_FIELD
  

    FIELD  data_volume
        TYPE            R*4
        DESCRIPTION     "This field specifies the expected data volume for
                        this alignment in kilobits. This is calculated by
                        as the sum of all exposure data volume estimates."
        UNITS           "KILOBITS"
        FORM
            NAME         "AGD"
            LABEL        "SCIENCE DATA"
        END_FORM
        RANGE
    END_FIELD
  

    FIELD  calib_volume
        TYPE            R*4
        DESCRIPTION     "This field specifies the expected calibration
                        data volume for this alignment.  This is calculated as 
			the sum of all calibration exposure (exposure type
                        = 'CA') data volume estimates."
        UNITS           "KILOBITS"
        FORM
            NAME         "AGD"
            LABEL        "CALIBRATION DATA"
        END_FORM
    END_FIELD
  

    FIELD  tape_recordr
        TYPE            C1
        DESCRIPTION     "This field indicates the usage of the tape
                        recorder for this alignment, where
                            'Y' = use tape recorder,
                            'N' = not use tape recorder,
                            'B' = use tape recorder as backup."
        RELATED_FIELDS  "qreadout.tape_mode"
        FORM
            NAME         "AGD"
            LABEL        "TAPE RECORDER USAGE    (Y/N/B)"
        END_FORM
        DISCRETE        "B",  "N",  "Y"
    END_FIELD
  

    FIELD  prim_target
        TYPE TARGET_ID_TYPE
        DESCRIPTION     "This field specifies the primary target to which 
			 this alignment is pointed."
        FORM
            NAME         "AGD"
            LABEL        "PRIMARY   TARGET ID"
        END_FORM
    END_FIELD
 

    FIELD  ref_target
        TYPE TARGET_ID_TYPE
        DESCRIPTION     "This field specifies the reference target which is 
			 used in target acquisition of the primary target.
			 By default this field is blank."
        FORM
            NAME         "AGD"
            LABEL        "REFERENCE TARGET ID"
        END_FORM
    END_FIELD
 

    FIELD  target_type
        TYPE            C1
        DESCRIPTION     "This field specifies the target type for this
                        alignment, where
                           'P' = Point,
                           'A' = Area,
                           'M' = Moving,
                           'E' = Earth,
                           'G' = Generic,
                           'N' = No target."
        FORM
            NAME         "AGD"
            LABEL        "TARGET TYPE           (A/E/G/M/P/N)"
        END_FORM
        DISCRETE        "A",  "E",  "G",  "M",  "N",  "P"
    END_FIELD
 

     FIELD  calibr_type
        TYPE            C1
        DESCRIPTION     "This field specifies the calibration type for
                        alignments with QALIGNMENT.align_type = 'CA', where
                            'I' = Internal,
                            'E' = External,
                            'N' = Not applicable."
        UNITS
        FORM
            NAME         "AGD"
            LABEL        "CALIBRATION TYPE      (I/E/N)"
        END_FORM
        DISCRETE        "E",  "I",  "N"
    END_FIELD
 

     FIELD  inner_radius
        TYPE            R4
        DESCRIPTION     "This field specifies the angle from the center of the
                        earth to the inner edge of the annulus around the earth
                        where the calibration is to be performed.
                        set if QALIGNMENT.target_type = 'E' (earth).
                        Used with QALIGNMENT.outer_radius for flat field or
                        aperture calibration exposures."
        FORM
            NAME         "AGD"
            LABEL        "INNER RADIUS"
        END_FORM
        UNITS           "DEGREES"
    END_FIELD
 

     FIELD  outer_radius
        TYPE            R4
        DESCRIPTION     "This field specifies the angle from the center of the
                        earth to the outer edge of the annulus around the earth
                        where the calibration is to be performed.
                        Set if QALIGNMENT.target_type = 'E' (earth).
                        Used with QALIGNMENT.inner_radius for flat field or
                        aperture calibration exposures."
        FORM
            NAME         "AGD"
            LABEL        "OUTER RADIUS"
        END_FORM
        UNITS           "DEGREES"
    END_FIELD
  

    FIELD  min_brit_lmt
        TYPE            R4
        DESCRIPTION     "This field specifies the minimum earth limb brightness.
                        Set if QALIGNMENT.target_type = 'E'."
        FORM
            NAME         "AGD"
            LABEL        "MIN. BRIGHTNESS"
        END_FORM
        UNITS
    END_FIELD
 

     FIELD  max_brit_lmt
        TYPE            R4
        DESCRIPTION     "This field specifies the maximum earth limb brightness.
                        set if QALIGNMENT.target_type = 'E'."
        FORM
            NAME         "AGD"
            LABEL        "MAX. BRIGHTNESS"
        END_FORM
        UNITS
    END_FIELD
 

     FIELD  ephemeris_fl
        TYPE            C9
        DESCRIPTION     "This field is obsolete."
    END_FIELD
 
 

    FIELD  jpl_fl
        TYPE            C2
        DESCRIPTION     "This field is obsolete.

                        It held the name of the moving target in the jpl file
                        where:

			me = mercury;
                        ve = venus;
                        ma = mars;
                        ju = jupiter;
                        sa = saturn;
                        ur = uranus;
                        ne = neptune;
                        pl = pluto;
                        mo = moon "
    END_FIELD
 

    FIELD  ephem_fl_typ
        TYPE            C1
        DESCRIPTION     "This field is obsolete."
    END_FIELD
 

    FIELD  saa_avoid
        TYPE SAA_MODEL_TYPE
        DESCRIPTION     "This field defaults to the avoidance model id of 
			the SI specified in QAPOSITION.si_used, where 
			QAPOSITION.initial_pos = 'I' or 'B'.  It is only 
                        used and set if the SAA avoidance flag 
			QALIGNMENT.saa_flag = 'Y' or 'I'."
        FORM
            NAME         "AGD"
            LABEL        "MODEL ID (02-99)"
        END_FORM
    END_FIELD
 

    FIELD  saa_ovr
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "This field is the SI SAA avoidance model ID override
                        FLAG. A value of 'Y' in indicates that the 
			QALIGNMENT.saa_avoid model should be used as
                        the SI SAA avoidance model ID for the alignment.
                        A value of 'N' specifies that the SI SAA avoidance
                        model ID used will be the avoidance model ID of the SI
                        specified in QAPOSITION.si_used, where
                        QAPOSITION.initial_pos = 'I' or 'B'.
                        This field is ignored if QALIGNMENT.saa_flag = 'N'."
	RELATED_FIELDS  "qalignment.saa_flag" "qalignment.saa_avoid" "qbs_obset.saa_ovr"

        FORM
            NAME         "AGD"
            LABEL        "MODEL OVERRIDE FLAG    (Y/N)"
        END_FORM
    END_FIELD
  

    FIELD  recovery_tm
        TYPE            I4
        DESCRIPTION     "This field specifies the SI SAA exit recovery time.
                        It defaults to the recovery time of the SI specified
                        in QAPOSITION.si_used, where QAPOSITION.initial_pos =
                        'I' or 'B'.
                        This field is ignored when QALIGNMENT.saa_flag = 'N'."
        UNITS           "SECONDS"
        FORM
            NAME         "AGD"
            LABEL        "RECOVERY TIME"
        END_FORM
    END_FIELD
 
 

    FIELD  recovery_ovr
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "This field is the SI SAA recovery time override flag,
                        where
                            'N' = default to the ST PDB recovery time of the SI
                                  specified in QAPOSITION.si_used,
                                  where QAPOSITION.initial_pos = 'I' or 'B';
                            'Y' = user override value is input;
                        Ignored when QALIGNMENT.saa_flag = 'N'."
        FORM
            NAME         "AGD"
            LABEL        "RECOVERY OVER. FLAG    (Y/N)"
        END_FORM
    END_FIELD
 
 

    FIELD  target_acqsi
        TYPE            C2
        DESCRIPTION     "This field indicates the target acquisition
                        mode for this pointing where
                           01 = mode I (ground assisted target acquisition
                                requiring realtime tdrs contact),
                           02 = mode II (onboard computer assisted correction
                                to target position), 03 = mode III (fixed simple
                                pointing requiring no special target
                                acquisition activity),
                           00 = null implies there is no target"
        FORM
            NAME         "AGD"
            LABEL        "TARGET ACQUISITION MODE  (00-99)"
        END_FORM
        RANGE           "00..99"
    END_FIELD
 

     FIELD  camera_ast
        TYPE            C4
        DESCRIPTION     "This field is used to indicate if the target
                        acquisition is camera assisted for SI assist
                        modes 1, 2 target acquisition along with scanning
                        techniques where
                            'NONE' = no camera assist,
                            'FOC'  = FOC camera assist,
                            'WFC'  = WF camera assist,
                            'PC'   = PC camera assist."
        FORM
            NAME         "AGD"
            LABEL        "CAMERA ASSIST  (FOC/WFC/PC/NONE)"
        END_FORM
        DISCRETE        "FOC",  "NONE",  "PC",  "WFC"
    END_FIELD
  

    FIELD  pointing_mde
        TYPE            C1
        DESCRIPTION     "This field specifies the specifies the ST
                        pointing mode.  If the pointing mode is track,
                        the target must be a moving target, and optimal GS
                        hand-off sequences will be generated in the response
                        for tracking the target.  Values are
                        'F' for fixed pointing,
                        'T' for a track 48 scan (Not currently supported),
                        'S' for a linear scan (track 51 command)."
        UNITS
        FORM
            NAME         "AGD"
            LABEL        "POINTING MODE            (F/T/S)"
        END_FORM
        DISCRETE        " ",  "F",  "S",  "T"
    END_FIELD
 

     FIELD  track_source
        TYPE            C1
        DESCRIPTION     "This field is used to indicate the source of tracking
                        parameters.  Values are
                           'D' = derived from target ephemeris,
                           'S' = specified."
        FORM
            NAME         "AGD"
            LABEL        "TRACKING SOURCE FLAG          (D/S)"
        END_FORM
        DISCRETE        " ",  "D",  "S"
    END_FIELD
 

     FIELD  scan_type
        TYPE            C1
        DESCRIPTION     "This field specifies the spatial scan mode types.
                         Possible values are
                             'C' = continuous
                             'D' = dwell
                             'N' = not applicable
 
                       The 'C' type is a series of linear scans alternating in
                        direction and offset from one another by a small angle
                        separation (a linear scan is a slew of the ST optical
                        axis from point a to b on the celestial sphere at a
                        constant commanded rate);

                        The 'D' type is like a continuous scan with a
                        specified number of dwell points per line and time
                        to wait at each dwell point.

                        Type 'N' signifies that this field is applicable,
                        i.e. no scan is required."
        FORM
            NAME         "AGD"
            LABEL        "SCAN TYPE             (C/D/N)"
        END_FORM
        DISCRETE        " ",  "C",  "D",  "N"
    END_FIELD
 

    FIELD  scan_coord
        TYPE            C1
        DESCRIPTION     "This field is used to indicate the scan
                        coordinate frame of reference.  Possible values are
                            'C' = celestial frame (ra-dec),
                            'V' = vehicle (v1v2v3)."
        FORM
            NAME         "AGD"
            LABEL        "SCAN COORDINATE FRAME   (C/V)"
        END_FORM
        DISCRETE        " ",  "C",  "V"
    END_FIELD
 

    FIELD  dwells_line
        TYPE            I2
        DESCRIPTION     "This field specifies the number (1-99) of dwell
                        points per line for scan pointing mode.  It is set
                        if this is a dwell scan"
        FORM
            NAME         "AGD"
            LABEL        "POINTS PER LINE"
        END_FORM
    END_FIELD
 

    FIELD  time_dwell
        TYPE            R4
        DESCRIPTION     "This field specifies the wait time (duration) at
                        each dwell point in seconds (1 x 10e-1 precision).
                        It is set only if this is a dwell scan alignment."
        UNITS           "SECONDS"
        FORM
            NAME         "AGD"
            LABEL        "WAIT TIME PER POINT  (secs)"
        END_FORM
    END_FIELD
 

    FIELD  df224_pit
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "This field is used to indicate the setting of a bit in
                        the process interface table (pit) by the NSSC1 to
                        indicate to the DF224 upon activation to start
                        the scan."
        FORM
            NAME         "AGD"
            LABEL        "DF224 PIT FLAG          (Y/N)"
        END_FORM
    END_FIELD
 

    FIELD  scan_angle
        TYPE            R4
        DESCRIPTION     "This field specifies the position angle (0 to 360)
                        of scan line when QALIGNMENT.scan_coord is equal to 'C',
                        this is the counterclockwise angle, about the beginning
                        of the first scan, from north at the target to
                        the direction of the first scan. When scan_coord
                        is equal to v, this is the counterclockwise angle
                        from the positive v3-axis to the direction of the
                        first scan. (1 x 10e-4 precision)"
        UNITS           "DEGREES"
        FORM
            NAME         "AGD"
            LABEL        "POS. ANGLE of SCAN LINE (deg)"
        END_FORM
    END_FIELD
 

    FIELD  scan_rate
        TYPE            R4
        UNITS           "ARCSECONDS/SECOND"
        DESCRIPTION     "This field specifies the commanded constant rate of the
                        line scan (slew of the st optical axis from point
                        a to b on the celestial sphere)."
        FORM
            NAME         "AGD"
            LABEL        "SCAN RATE        (arcsec/sec)"
        END_FORM
    END_FIELD
 

    FIELD  number_lines
        TYPE            I2
        DESCRIPTION     "This field specifies the number of lines per 
                         scan."
        FORM
            NAME         "AGD"
            LABEL        "NUMBER OF LINES PER SCAN"
        END_FORM
        RANGE           "1..99"
    END_FIELD
 

    FIELD  scan_width
        TYPE            R4
        DESCRIPTION     "This field specifies the scan width (0.,3600.)."
        UNITS           "ARCSECONDS"
        FORM
            NAME         "AGD"
            LABEL        "SCAN WIDTH           (arcsec)"
        END_FORM
        RANGE           "0..360"
    END_FIELD
 

    FIELD  scan_length
        TYPE            R4
        DESCRIPTION     "This field specifies the scan length ( 0.,3600.)."
        UNITS           "ARCSECONDS"
        FORM
            NAME         "AGD"
            LABEL        "SCAN LENGTH          (arcsec)"
        END_FORM
        RANGE           "0..360"
    END_FIELD
 

    FIELD  angle_sides
        TYPE            R4
        DESCRIPTION     "This field specifies the angle (0-360) between sides
                        of scan parallelogram clockwise angle, about the
                        beginning of the first scan, from the direction of the
                        first scan to the side of the scan parallogram.
                        (1X10E-04 precision)."
        UNITS           "DEGREES"
        FORM
            NAME         "AGD"
            LABEL        "PARALLELOGRAM    (arcsec/sec)"
        END_FORM
        RANGE           "0..360"
    END_FIELD
 

    FIELD  duration
        TYPE            I4
        DESCRIPTION     "This field specifies the duration of the scan."
        UNITS           "SECONDS"
        FORM
            NAME         "AGD"
            LABEL        "TOTAL DURATION"
        END_FORM
    END_FIELD
 

    FIELD  sis_used
        TYPE            I2
        DESCRIPTION     "See description in qscheduling.sis_used"
        RELATED_FIELDS  "qscheduling.sis_used"
    END_FIELD
 

    FIELD  fhstpar
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "This field indicates whether an FHST update can be
                        scheduled in parallel with this alignment."
        FORM
            NAME         "AGD"
            LABEL        "FHST/ALIGNMENT PARALLEL  (Y/N)"
        END_FORM
    END_FIELD
 

    FIELD  dark_er_occ
        TYPE            R4
        DESCRIPTION     "This field specifies the dark earth avoidance angle
                        for computing target visibility.  A target will be
                        considered occulted by the dark earth if the line of
                        sight vector to the target is within this angle of the
                        dark earth limb."
        UNITS           "DEGREES"
        FORM
            NAME         "AGD"
            LABEL        "OBDARK LIMB OCC."
        END_FORM
        RELATED_FIELDS  "widcr_parms.dark_er_angl"
    END_FIELD
 

    FIELD  brit_er_occ
        TYPE            R4
        DESCRIPTION     "This field specifies the bright earth avoidance angle
                        for computing target visibility.  A target will be
                        considered occulted by the bright earth if the line of
                        sight vector to the target is within this angle of the
                        bright earth limb."
        UNITS           "DEGREES"
        FORM
            NAME         "AGD"
            LABEL        "BRIT LIMB OCC."
        END_FORM
        RELATED_FIELDS  "widcr_parms.brit_er_angl"
    END_FIELD
 

    FIELD  si_parallel
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "This flag specifies whether an SI activity can be
                        scheduled in parallel with the alignment."
        FORM
            NAME         "AGD"
            LABEL        "SI PARALLEL              (Y/N)"
        END_FORM
    END_FIELD
 

    FIELD  occ_ovr
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "This flag specifies whether target earth avoidance
                        is a constraint for this alignment.  'Y' means 
			override target earth avoidance."
        FORM
            NAME         "AGD"
            LABEL        "OVERRIDE FLAG            (Y/N)"
        END_FORM
    END_FIELD
 

    FIELD  gsss_request
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "This flag indicates if the qalignment data should be 
			 sent in a GSSS request. If 'N', data will not be 
			 extracted from the corresponding record.  If 'Y',
                         data will be extracted from the corresponding record. 
			 The purpose of this field is to avoid replicating data
                         in the GSSS request (e.g. for duplicate alignments), 
			 and also to avoid sending data in the GSSS request 
			 which should not be considered when selecting guide
                         stars (e.g. for certain exposures of astrometry 
			 reference stars) "
        FORM
            NAME         "AGD"
            LABEL        "OBSS REQUEST             (Y/N)"
        END_FORM
    END_FIELD
  

    FIELD  max_int_dur
        TYPE            I4
        DESCRIPTION     "This field specifies the maximum time the alignment
                        may be interrupted, as measured from the end of the
                        last science activity before the interruption
                        to the start of the first science activity
                        after the interruption."
        RELATED_FIELDS  "qalignment.interrupt" "qbs_obset.max_int_dur"

        UNITS           "SECONDS"
        FORM
            NAME         "AGD"
            LABEL        "MAX INTERRUPT DURATION"
        END_FORM
    END_FIELD
 

    FIELD  min_sep_dur
        TYPE            I4
        DESCRIPTION     "This field specifies the minimum separation time
                        between this alignment and the next alignment.
                        Separation is measured from the start of the first
                        science activity of this alignment to the start of the
                        first science activity of the next alignment."
        UNITS           "SECONDS"
        FORM
            NAME         "AGD"
            LABEL        "MIN SEPARATION DURATION"
        END_FORM
    END_FIELD
 

    FIELD  max_sep_dur
        TYPE            I4
        DESCRIPTION     "This field specifies the maximum separation time
                        between this alignment and the next alignment.
                        Separation is measured from the start of the first
                        science activity of this alignment to the start of the
                        first science activity of the next alignment.

                        If int_aftr_ths='N',
                           max_sep_dur is calculated during scheduling. If the 
                           corresponding SU is scheduled, CANDLIST/DISPLAY 
                           displays the calculated maximum separation duration 
                           during scheduling. If the SU failed to schedule, 
                           CANDLIST/DISPLAY issues a message 'to be calculated 
                           when scheduled'. 

                        If int_aftr_ths='Y',
                           max_sep_dur field is calculated by TRANS and used
                           by scheduling.

                        If int_aftr_ths='D',
                           max_sep_dur field is calculated by 
                           PMDB/UPDATE/TYPE=SU."

        UNITS           "SECONDS"
        FORM
            NAME         "AGD"
            LABEL        "MAX SEPARATION DURATION"
        END_FORM
    END_FIELD
  

    FIELD  int_overhead
        TYPE            I4
        DESCRIPTION     "This field specifies the overhead time added to each
                        interrupted alignment segment other than the first."
        RELATED_FIELDS  "qalignment.interrupt"
        UNITS           "SECONDS"
        FORM
            NAME         "AGD"
            LABEL        "INTERRUPT OVERHEAD"
        END_FORM
    END_FIELD
 

     FIELD  saa_flag
        TYPE            C1
        DESCRIPTION     "This field specifies whether an SAA avoidance check
                        is to be performed for this alignment.  Possible values
                        are 
                            'Y' = consider saa avoidance
                            'N' = do not consider SAA avoidance
                            'I' = do alignment in SAA region."
        FORM
            NAME         "AGD"
            LABEL        "SAA CHECK FLAG         (Y/N)"
        END_FORM
        DISCRETE        "I",  "N",  "Y"
    END_FIELD
 

    FIELD  beg_tim_delt
        TYPE            I4
        UNITS           "SECONDS"
        DESCRIPTION     "This field specifies the earth shadow time delta
                        for shadow/avoid-shadow entry.  It specifies the
                        time delta in seconds to be added
                        to shadow/avoid shadow entry time.  This field is
                        used in conjunction with QALIGNMENT.shadow as follows:
                        if QALIGNMENT.shadow = 'Y', added to shadow entry time,
                        if QALIGNMENT.shadow = 'A', added to avoid-shadow
                        start time."
        FORM
            NAME         "AGD"
            LABEL        "BEGIN DELTA"
        END_FORM
    END_FIELD
 

    FIELD  end_tim_delt
        TYPE            I4
        DESCRIPTION     "This field specifies the earth shadow time delta
                        for shadow/avoid-shadow exit. It specifies the
                        time delta in seconds to be added to
                        shadow/avoid-shadow exit time.  This field is
                        used in conjunction with QALIGNMENT.shadow as follows:
                        if QALIGNMENT.shadow = 'Y', added to shadow exit time,
                        if QALIGNMENT.shadow = 'A', added to avoid-shadow
                        end time."
        UNITS           "SECONDS"
        FORM
            NAME         "AGD"
            LABEL        "END   DELTA"
        END_FORM
    END_FIELD
 

    FIELD  par_readout
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "This field specifies whether science data readouts 
                        can be scheduled in parallel with the alignment."
        RELATED_FIELDS  "qreadout.par_readout"
        FORM
            NAME         "AGD"
            LABEL        "PARALLEL DATA READOUT         (Y/N)"
        END_FORM
    END_FIELD
 

     FIELD  set_mech_mot
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "This field specifies whether the set mechanism motion
                        flag can be set during the alignment. This alignment
                        may not be scheduled in parallel with an obset which
                        does not permit the mechanism motion flag to be set."
    END_FIELD
 

    FIELD  par_allowed
        TYPE PAR_ALLOWED_TYPE
        FORM
            NAME         "AGD"
            LABEL        "PARALLELS ALLOWED TYPE    (Y/N/I/A)"
        END_FORM
    END_FIELD
 

    FIELD  nssc1_used
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "This field specifies whether the NSSC-1 scratch pad
                        used anywhere during this alignment. This will always
                        be 'Y' if there is at least one QREADOUT record with
                        NSSC interval_typ for this alignment. But, it could
                        be 'Y' even if there are no QREADOUT records."
        FORM
            NAME         "AGD"
            LABEL        "NSSC-1 SCRATCH PAD MEMORY     (Y/N)"
        END_FORM
    END_FIELD
 

    FIELD  ea_duration
        TYPE            I4

        DESCRIPTION     "THIS FIELD IS OBSOLETE."
    END_FIELD
 
 

    FIELD  saa_duration
        TYPE            I4

        DESCRIPTION     "THIS FIELD IS OBSOLETE."
    END_FIELD
 
 

    FIELD  coor_par_exp
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "This field specifies whether this alignment contains
                        any coordinated parallel exposures.  It is used for
                        CALENDAR/DISPLAY purposes only."
        FORM
            NAME         "AGD"
            LABEL        "COORDINATED PARALLEL EXPOSURE (Y/N)"
        END_FORM
    END_FIELD
 

    FIELD  max_al_dur
        TYPE            I4
        DESCRIPTION     "This fields specifies the maximum elapsed time from
                        the start of the alignment to the end of the alignment
                        including any interruptions which may occur. "
        UNITS           "SECONDS"
        RELATED_FIELDS  "qbs_obset.max_ob_dur" "qscheduling.max_su_dur"

        FORM
            NAME         "AGD"
            LABEL        "MAXIMUM ALIGN. DURATION"
        END_FORM
    END_FIELD
 

    FIELD  ovratalstart
        TYPE            I4
        DESCRIPTION     "This field specifies the duration of the overhead 
                        at the start of an alignment which may be scheduled
                        outside target/FGS visibility windows due to SAA,
                        occultation, and shadow restrictions."
        UNITS           "SECONDS"
        FORM
            NAME         "AGD"
            LABEL        "OVERHEAD AT ALIGNMENT START"
        END_FORM
    END_FIELD
 

    FIELD  ovratalend
        TYPE            I4
        DESCRIPTION     "This field specifies the duration of the overhead
                        at the start of an alignment which may be scheduled
                        outside target/FGS visibility windows due to SAA,
                        occultation, and shadow restrictions."
        UNITS           "SECONDS"
        FORM
            NAME         "AGD"
            LABEL        "OVERHEAD AT ALIGNMENT END"
        END_FORM
    END_FIELD
 

    FIELD  mustusegyro
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "This flag specifies whether this alignment must be
                        executed under gyro control.
        FORM
            NAME         "AGD"
            LABEL        "MUST USE GYRO            (Y/N)"
        END_FORM
    END_FIELD
 

    FIELD  guide_tolera
        TYPE            R4
        DESCRIPTION     "This field specifies the maximum accumulated position
                        uncertainty from the end of FGS control to the end of
                        the non-overhead portion of the alignment.  This can
                        be set in a way so that the alignment can extend past
                        fgs visibility."
        UNITS           "ARCSECONDS"
        FORM
            NAME         "AGD"
            LABEL        "GUIDING TOL."
        END_FORM
    END_FIELD


    FIELD  low_sky
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "The low_sky flag indicates whether an alignment has 
                        an exposure that uses the LOW-SKY special requirement."
    END_FIELD


    FIELD  moon_avd_ang
        TYPE            R4
        DESCRIPTION     "This field contains the avoidance angle from the
                         center of the moon. SPSS needs to know the moon
                         avoidance angle for an obset so it can compute
                         its moon avoidance windows during obset-level
                         PMDB/UPDATE. SPSS uses QBOverrides data if it exists.
                         If not, take the maximum QAlignment moon_avd_ang 
                         value (in degrees) over all alignments in the obset, 
                         assuming it is a positive number (0 is equivalent to 
                         `unspecified'). If there is no alignment for which 
                         moon_avd_ang was  populated with a nonzero value, 
                         then fall back on the WIDCR_Parms default.

                         Note that this is suboptimal in the case where an 
                         obset contains some LOW-SKY and some non-LOW-SKY 
                         alignments, since the LOW-SKY moon avoidance angle will
                         be applied to the entire obset even though it is only
                         needed for part of it. A more accurate approach would 
                         move the moon avoidance window processing down
                         to the alignment level, but this would be a major 
                         project in SPSS and is not warranted just to optimize 
                         LOW-SKY.  However, the moon avoidance field is still 
                         being defined at the alignment level to preserve the 
                         option of doing thisat some later time.

                         There was some discussion on whether Trans should 
                         populate moon_avd_ang for all alignments or just the 
                         LOW-SKY alignments.  Doing the latter would preserve
                         our freedom to change WIDCR_Parms without also changing 
                         Trans, but the former approach is more consistent
                         with the way earth avoidance angles are handled and 
                         makes for a cleaner interface in my opinion (the data
                         is always coming from Trans, not from Trans some of 
                         the time and SPSS defaults at other times)."
        RELATED_FIELDS  "qboverrides.moon_avoid" "widcr_parms.mon_avoi_ang"

        UNITS           "DEGREES"
    END_FIELD
 

    FIELD  si_intrlv
        TYPE            I2
        DESCRIPTION     "This field is used as a Bit mask indicate which SIs
                        cannot be interleaved after this alignment.  If the bit
                        is 1, the corresponding SI cannot be used. If the bit
                        is 0, the SI can be used.  Interleaving needs to
                        be prohibited by SI because some of the SIs have
                        buffer-management schemes which would break if another
                        SU used the buffer between alignments.
                        The bit pattern is the same as in QAlignment sis_used.
                        (OPR 30833).  See the include file ZSIBITS.INC for
                        field definitions."
        RELATED_FIELDS  "qalignment.sis_used"
    END_FIELD

END_RECORD
 
 
!------------------------------------------------------------------------------
!
!   RELATION DECLARATION
!
!------------------------------------------------------------------------------
 
RELATION  qalignment
 
    TYPE             QALIGN_TYPE
 
    DESCRIPTION      "Alignment Relation"
 
    SUBSYSTEM_USING  "SPSS", "TRANS", "PODPS"

    RELATED_FIELDS  "qaapertures.*" "qreadout.*" "qexposures.*"


    FORM
        NAME         "AGD"
    END_FORM
 
    INDEX  qalignment_1
        TYPE         unique, clustered
        FIELDS       proposal_id, obset_id, version_num, alignment_id
    END_INDEX
 
    INDEX  qalignment_2
        TYPE         nonclustered
        FIELDS       prim_target, ref_target
    END_INDEX

    INDEX  qalignment_3
        TYPE         nonclustered
        FIELDS       ref_target
    END_INDEX
 
END_RELATION
 
!------------------------------------------------------------------------------
!
!   INSTANCE DECLARATION
!
!------------------------------------------------------------------------------
 
 
INSTANCE  qalignment
 
    GLOBAL
 
    TYPE        QALIGN_TYPE

END_INSTANCE

Go to the top.