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

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

<sddl>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- -->
<!--  SDDL Name: GSA_DATA.SDDL -->
<!-- -->
<!--  Purpose:      This SDDL file defines the GSA_DATA relation.-->
<!-- -->
<!--  Modification History:-->
<!-- -->
<!--    Date       PR      Who                       Reason-->
<!--  - - - -    - - - -   - -   - - - - - - - - - - - - - - - - - - - - - -->
<!--  11/09/00   44862     Baum  Original implementation-->
<lm>  07/03/03   48821     CTB   Converted to XML format </lm> <!-- last mod -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> 

    <record name="GSA_DATA_TYPE"> 
 
 
        <description>This relation is used to identify the full time range of the
                   planned Guide Star acquisition, and to report results of the
                   actual acquisition. The first three fields are populated
                   when the record is inserted into the table and the remaining
                   fields are updated after gs acqisition processing. </description>


            <field name="gsa_rootname">
                    <type>C14</type>
                    <description>GYYYYDDDHHMMSS where the time values match the 
                         gsa_start_time.</description>
            </field>

            <field name="gsa_start_time">
                    <type>C17</type>
                    <description>YYYY.DDD:HH:MM:SS, Commanded start of the GSACQ1 or
                         REACQ event.</description>
            </field>

            <field name="gsa_end_time">
                    <type>C17</type>
                    <description>YYYY.DDD:HH:MM:SS, Allocated end of the REACQ
                         event, or the end of the GSACQ1 event if num_pair is
                         1, or end of the GSACQ2 event if num_pair is 2.</description>
            </field>

            <field name="acq_success_time">
                    <type>C17</type>
                    <description>YYYY.DDD:HH:MM:SS, time of the start of FGS guiding
                        when takedata flag is first raised during the 
                        acquistion or blank if no telemetry or acq failure. </description>
            </field>

            <field name="guiding_mode">
                    <type>C2</type>
                    <description>Guiding mode at end of acquisition. GY - gyro, 
                         FL - fine lock on both stars, FG - fine lock/gyro,
                         CT - coarse track on both stars, CG - coarse track/
                         gyro. CT and CG are no longer allowed but old
                         schedules allowed these modes. </description>
            </field>

            <field name="acq_status">
                    <type>C12</type>
                    <description>GSFAIL keyword value or blank. The non-blank values
                         are: TLMGAP - unknown due to missing telemetry;
                         VEHSAFE - not attempted due to safing; SSLEXP -
                         scan step limit exceeded on primary GS; SSLEXS -
                         scan step limit exceeded on secondary GS; SREXCPn -
                         search radius exceeded on primary GS of pair n;
                         SREXCSn - search radius exceeded on secondary GS of
                         pair n;  NOLOCK - failed to obtain finelock on either
                         GS. </description>
            </field>

            <field name="acq_tlm_gap">
                    <type>R4</type>
                    <description>(Seconds) time of telemetry gap that overlaps 
                        the acquisition window between gsa_start_time and 
                        gsa_end_time. </description>
            </field>

            <field name="actual_pair_num">
                    <type>I4</type>
                    <description> -1 = undetermined, 0 - failure, 1 - first pair is
                        acquired, or 2 - second pair is acquired. </description>
            </field>

            <field name="acq_dom_fgs">
                    <type>I4</type>
                    <description>Dominant FGS number or 0, after acquisition. A zero
                         value indicates a total failure.</description>
            </field>

            <field name="acq_rol_fgs">
                    <type>I4</type>
                    <description>Roll FGS number or 0, after acquisition. A zero 
                         value is either a planned FGS/GYRO mode or a
                         failure to acquire both GSs.</description>
            </field>

    </record>
 
  
 
    <relation name="gsa_data">
 
            <type>GSA_DATA_TYPE</type>
 
            <description>GS Acq Data Relation</description>
 
            <subsystem_using>OPUS</subsystem_using>

            <index name="gsa_data_1">
                    <type>unique clustered</type>
                    <field name="gsa_rootname"/>
            </index>

            <index name="gsa_data_2">
                    <type>nonclustered</type>
                    <field name="gsa_start_time"/>
            </index>

    </relation>
</sddl>
