IlpPositioningApi.xid.xml 9.76 KB
<?xml version="1.0" encoding="UTF-8" ?>

<specification xmlns="https://xid.location.studio/schema/V1.0.0/XtensibleInterfaceDefinition.xsd"
               xmlns:xid="https://xid.location.studio/schema/V1.0.0/XtensibleInterfaceDefinition.xsd"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="https://xid.location.studio/schema/V1.0.0/XtensibleInterfaceDefinition.xsd https://xid.location.studio/schema/V1.0.0/XtensibleInterfaceDefinition.xsd"
               identity="IlpPositioningApi.xid">
    <title>ILP Hybrid Positioning Services</title>
    <comment>
        This document defines the positioning service interface for the IoT Location Platform (ILP).
        The service provides hybrid position calculation for devices and services communicating
        via standard IP based protocols.  The API currently supports XMF and JSON wire formats.
    </comment>

  <import ref="https://xid.location.studio/Tensor/V1.1/ApiBase.xid.xml" local="ApiBase.xid.xml" />
  <import ref="https://xid.location.studio/HPE/V1.2/HpeCore.xid.xml" local="HpeCore.xid.xml" />

  <namespace name="ILP">
        <using namespace="HPE"/>
        <using namespace="Tensor"/>
      
        <!-- 
        *******************************************************
        ILP Positioning Calculation Data Types
        *******************************************************
        -->

        <!-- CalculateInput structure -->
        <struct name="CalculateInput" type ="InputBase">
            <comment>ILP.Positioning.Calculate input data structure.</comment>

<!--
			these will be resurrected when Session storage is implemented.

            <elem name="uuidSession" multiplicity="0..1" type="UUID">
                <comment>
                    Optional session identifier.  See CreateSession for creating valid
                    session identifiers.  Transactions can be processed in the context of a session to provide
                    historical information and link calcuation in time.
                </comment>
            </elem>

            <elem name="durSession" multiplicity="0..1" type="int32">
                <comment>
                    Optional session duration.  Default is 0 (not persisted).  If specified,
                    the session created for this transaction will be stored for a maximum of 86400 seconds.
                    The uuidSession returned in the output, can be used in subsequent calls to Calculate to utilize
                    the persisted session data.   Call ReleaseSession to release any persisted content once the session
                    is complete.
                </comment>
            </elem>
-->

<!--
			This will be resurrected when Dynamics are implemented

            <elem name="dynamics" multiplicity="0..1" type="DynamicsProfile" default="0">
                <comment>
                    Specifies the dymnamics of the device providing the data.  If not specified, the default dynamics is undefined (0).
                    This parameter optimizes configuration of the estimator to constraint calculations based on the type
                    of motion. If session is specified, this value will be overridden.
                </comment>
            </elem>
-->

            <elem name="rankEstimate" multiplicity="0..1" type="EstimateRanking" default="calcorder">
                <comment>
                    Specifies the sort order of the estimates produced by the hybrid calculation.\n
					If not defined, the default value is to sort estimates based on calculation order (0).
                </comment>
            </elem>

            <elem name="confidence" multiplicity="0..1" type="float32" default="0.682689">
                <comment>
                    Specifies the confidence level to report estimate error uncertainty, range between 0.0 and 1.0\n
					Common values for confidence are:\n
					\t 0.682689 (1 std. dev.)\n
					\t 0.954499 (2 std. dev.)\n
					\t 0.997300 (3 std. dev.)\n
                    If confidence is not specified, the default 
                    value is 0.682689.
                </comment>
            </elem>

            <elem name="maxEstimates" multiplicity="0..1" type="uint8" default="1">
                <comment>
                    Specifies the maximum number of estimates (up to 255) to return in the calculation output.
                    If not specified 1 hybrid estimate is returned.
                </comment>
            </elem>

            <elem name="typeShape" multiplicity="0..*" type="ShapeType">
                <comment>
                    Specifies the preferred shape types to provide estimates in. The highest
                    ranking estimate will be returned in this specified shape types if supported.
                    If not specified, the set defaults to: Spheroid, Circle.
                </comment>
            </elem>

            <elem name="state" multiplicity="0..1" type="StateInfo" ord="90">
                <comment>
                    Specifies the position to initialize the state of the positioning engine.
					At  least one of observations or state is required,
					otherwise there is insufficient data to process.
                </comment>
            </elem>


            <elem name="observations" multiplicity="0..1" type="ObservationSet" ord="89">
                <comment>
                    Set of observation data comprising one ore
					At  least one of observations, obsSetEncoded, or state is required,
					otherwise there is insufficient data to process.
                    
                </comment>
            </elem>

            <elem name="obsSetXmfFmt" multiplicity="0..1" type="EncodingFormat" default="0" ord="88">
                <comment>
                    XMF observation set encoding format. XMF Observations may be passed to the service in
                    an encoding format different than the XNF, encoded in accordance to the 
                    format key defined by the this field.   By default (0) is the native format XMF.
                </comment>
            </elem>

            <elem name="obsSetXmf" multiplicity="0..1" type="xmf" ord="90">
            <comment>
                Encoded observation set encoded in the format specified by "obsSetEncodedFmt". The base, 'native' format is XMF.  
				At least one of observations, obsSetEncoded, or state is required,	otherwise there is insufficient data to process.
				Encoded observations have a base format type of xmf, which may be further encoded with the user defined encoding.
            </comment>
            <comment>
                Use this field to pass data in XMF or other encoded formats.  This allows mixed format messages to be supported (e.g. JSON wrapper around XMF observations).  To
                learn more about obtaining support for custom encoding formats, please contact site administrator for further information.
            </comment>            
            </elem>
        </struct>

        <!-- Calculate Status-->
        <enum name="CalculateStatus" type="Tensor.int8"  default="undefined">
            <comment>
                Specifies the calculation resulting status.   Caller should consult this value first to
                determine if estimates are valid.
            </comment>
            <literal name="EstimateReady" value="1"/>
            <literal name="undefined" value="0"/>
            <literal name="DidNotConverge" value="-1"/>
            <literal name="NotEnoughData" value="-2"/>
            <literal name="UnspecifiedErr" value="-3"/>
        </enum>

        <!-- CalculateOutput structure -->
        <struct name="CalculateOutput" type="OutputBase" >
            <comment>ILP.Positioning.Calculate output data structure.  This contains the reuslts of a calculate oeration.</comment>

            <elem name="uuidSession" multiplicity="1" type="UUID">
                <comment>
                    Session identifier.\n
				    This is the identifier processed session used to process the
                    calculate transaction.
                </comment>
            </elem>

<!--
			May get resurrected when Dynamics are implemented.
            <elem name="dynamics" multiplicity="1" type="DynamicsProfile">
                <comment>
                    Specifies the dymnamics of the device providing the data.
                </comment>
            </elem>
-->
<!--
			Client should remember their requested rankEstimate
            <elem name="rankEstimate" multiplicity="1" type="EstimateRanking">
                <comment>
                    Specifies the sort order of the estimates produced by the hybrid calculation.
                </comment>
            </elem>
-->

            <elem name="status" multiplicity="1" type="CalculateStatus">
                <comment>
                    Specifies the status result of the calculation.
                </comment>
            </elem>

            <elem name="Estimates" multiplicity="0..*" type="Estimate">
                <comment>
                    List of estimates returned from the calculation ranked in the specified order.
                </comment>
            </elem>
        </struct>


        <!-- 
        *******************************************************
        ILP Positioning Service Interface.
        *******************************************************
        -->
        <interface name="Positioning">
            <comment>Hybrid positioning interface defines interactions supporting position calculation functions.</comment>

            <operation name="Calculate">
                <comment>Calculates the position of the device given the specified observation data.</comment>
                <input name="Input" type="CalculateInput" sid="0x1010"/>
                <output name="Result" type="CalculateOutput" sid="0x1011" />
            </operation>      
        </interface>

    </namespace>
</specification>