<?xml version="1.0" encoding="UTF-8"?>

<!-- <!DOCTYPE sddlschema SYSTEM "sddlschema.xsd">-->

<sddl>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- -->
<!--  SDDL Name:  JITTER_EVT_MAP.SDDL -->
<!-- -->
<!--  Purpose:      This SDDL file defines the JITTER_EVT_MAP relation.-->
<!-- -->
<!--  Modification History:-->
<!-- -->
<!--    Date       PR      Who                       Reason-->
<!--  - - - -    - - - -   - -    - - - - - - - - - - - - - - - - - - - - - -->
<!--  11/30/00   44862     Baum   Original implementation-->
<lm>  07/03/03   48821     CTB   Converted to XML format </lm> <!-- last mod -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
 
    <record name="JITTER_EVT_MAP_TYPE"> 
 
 
        <description>This relation is used to identify the all the jitter
                   datasets that follow either the SMS start event or the GS
                   acquisition event, identified by event time. The event_type
                   specifies whether the event_start_time is for an SMS or a GS
                   acquisition. If the event is an acquisition, then the 
                   evt_start_time will exactly match the acq_start_time in the
                   gsa_data table. This table is also used to identify internal
                   exposures that do not need engineering telemetry for its 
                   defaulted jitter files. The table was designed to be easily 
                   joined to qolink_sms to get exposure status so that jitter
                   files are not generated for exposures have a status of N. </description>


            <field name="event_start_time">
                    <type>C17</type>
                    <description>YYYY.DDD:HH:MM:SS, Start time of event. If event_type is
                    G for GSACQ then this time must match the acq_start_time
                    in the gsa_data table and it can be used to join to that
                    table. </description>

            </field>


            <field name="event_type">
                    <type>C3</type>
                    <description>(SMS or GSA)  SMS start or GS acquisition start. </description>
            </field>

            <field name="program_id">
                    <type>C3</type>
                    <units>BASE_36</units>
                    <description>When a proposal is accepted into the PMDB by SPSS it must
		    be assigned a unique 3 character base 36 program identifier.
		    This is done by the pmdb -accept_prop or pmdb -load command.
                    It is used for identification of proposals by spacecraft 
                    and OPUS software. It is also used in the OPUS and DADS 
                    rootname for all archived science data files. 
                    Because of flight design software, program_id must be
                    three characters. </description>
            </field>

            <field name="obset_id">
                    <type>C2</type>
                    <units>BASE_36</units>
                    <description>An observation set is a collection of one or more 
		    alignments that are grouped together based on FGS pointing 
		    requirements.  That is, if multiple alignments can all be 
		    executed using the same guide star pair, they are grouped
		    into the same observation set. </description>
            </field>

            <field name="ob_number">
                    <type>C2</type>
                    <units>BASE_36</units>
                    <description>Observations are numbered sequentially throughout
                    an observation set and are assigned by SMS/Gen.
                    An ob_number is _NOT_ the same as an obset_ID. </description>
            </field>

            <field name="internal_flag">
                    <type>C1</type>
                    <description>(Y or N) Y indicates this is a internal observation. </description>
            </field>

    </record>
 
 
 
    <relation name="jitter_evt_map">
 
        <type>JITTER_EVT_MAP_TYPE</type>

        <description>FGS-jitter-dataset to MSC-event Mapping Relation</description>

        <subsystem_using>OPUS</subsystem_using>

        <index name="jitter_evt_map_1">
            <type>unique clustered</type>
            <field name="event_start_time"/>
            <field name="event_type"/>
            <field name="program_id"/>
            <field name="obset_id"/>
            <field name="ob_number"/>
        </index>

        <index name="jitter_evt_map_2">
            <type>nonclustered</type>
            <field name="program_id"/>
            <field name="obset_id"/>
            <field name="ob_number"/>
        </index>

    </relation>
</sddl>
