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

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

<sddl>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- -->
<!--  SDDL Name:    CONV_LINEAR.SDDL-->
<!-- -->
<!--  Purpose:      This SDDL file defines the CONV_LINEAR relation.-->
<!-- -->
<!--  Modification History:-->
<!-- -->
<!--    Date       OPR      Who                       Reason-->
<!--  - - - -    - - - -    - -   - - - - - - - - - - - - - - - - - - - - - -->
<!--  06/28/96    29389     Rose  Original implementation-->
<lm>  07/03/03   48821     CTB   Converted to XML format </lm> <!-- last mod -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->


    <record name="CONV_LINEAR">

        <description>This relation specifies the LINEAR conversions which
		are to be applied to certain telemetry mnemonics.

		In the past PODPS used a wide relation: one which had a
		single tuple for each mnemonic, and 16 groups of fields
		specifying up to 16 conversion steps. Not only is this
		a poor design limit on the number of possible steps, but
		if a mnemonic only used 2 fields (a majority of cases) 
		there would be a significant amount of unused space reserved
		in the database.

		The current design allows a mnemonic to have any number of
		tuples, each one of which only specifies a single conversion
		step. See OPR.29389.

		The set of conversion tuples (ordered by x_val) allows a
		stepwise linear conversion of any value between 0 and the
		last x_val.  It is recommended that the last x_val be the
		maximum possible for the number of bits in the mnemonic. 
		That is, if the mnemonic has 8 bits, the last x_val should
		be 255.</description>

            <field name="mnemonic">
                    <type>C8</type>
                    <description>The name of the telemetry mnemonic</description>
            </field>

            <field name="x_val">
                    <type>I4</type>
                    <description>The next telemetry value</description>
            </field>

            <field name="y_val">
                    <type>R4</type>
                    <description>The corresponding point in engineering units</description>
            </field>


    </record>



    <relation name="conv_linear">

        <type>CONV_LINEAR</type>

        <description>linear conversion coefficients</description>

        <subsystem_using>OPUS</subsystem_using>

        <index name="conv_linear_1">
            <type>unique clustered</type>
            <field name="mnemonic"/>
            <field name="x_val"/>
        </index>

    </relation>


    <instance  name="conv_linear" scope="global" type="CONV_LINEAR" />

</sddl>
