IlpPositioningApi.xid.xml 16 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 XtensibleInterfaceDefinition.xsd"
               identity="IlpPositioningApi.xid.xml">
    <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.0.0/Definitions.xid.xml" local="Definitions.xid.xml" />
  <import ref="https://xid.location.studio/HPE/V1.1.1/HpeCore.xid.xml" local="HpeCore.xid.xml" />
  <import ref="https://xid.location.studio/HPE/CommonDefs/V1.1.1/HpeGnss.xid.xml" local="HpeGnss.xid.xml" />
  <import ref="https://xid.location.studio/HPE/CommonDefs/V1.1.1/HpeCellular.xid.xml" local="HpeCellular.xid.xml" />
  <import ref="https://xid.location.studio/HPE/CommonDefs/V1.1.1/HpeWiFi.xid.xml" local="HpeWiFi.xid.xml" />
  <import ref="https://xid.location.studio/ILP/V1.1.1/IlpApiBase.xid.xml" local="IlpApiBase.xid.xml" />

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

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

            <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>

            <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="3">
                <comment>
                    Specifies the sort order of the estimates produced by the hybrid calculation.  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.\n
If not specified, the set defaults to: Spheroid, Circle.
                </comment>
            </elem>

            <elem name="directive" multiplicity="0..*" type="NameValue" ord="87">
                <comment>
                    A set of directives to influence processing. Unknown directives are ignored.
                </comment>
            </elem>


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

            <elem name="encObs" multiplicity="0..1" type="EncodingFormat" default="0" ord="88">
                <comment>
                    Observation set encoding format. Observations may be passed to the service in
                    an encoding format different than that outer wire format.
					By default wire protocol native format is assumed.
                </comment>
            </elem>

            <elem name="observations" multiplicity="0..1" type="ObservationSet" encoding ="encObs" ord="89">
                <comment>
                    Set of observation data encoded in the format specified by encObs.\n
					At  least one of observations or state is required,
					otherwise there is insufficient data to process.
                </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="IlpOutputBase" >
            <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.  This is the Identifier processed session used to process the
                    calculate transaction.  If session, was not previously created by CreateSession, then
                    the session will not be available for future use.
                </comment>
            </elem>

            <elem name="dynamics" multiplicity="1" type="DynamicsProfile">
                <comment>
                    Specifies the dymnamics of the device providing the data.
                </comment>
            </elem>

            <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>


        <!-- 
        *******************************************************
        CreateSession Data Types
        *******************************************************
        -->

        <!-- CreateSessionInput structure -->
        <struct name="CreateSessionInput" type="IlpInputBase">
            <comment>ILP.Positioning.CreateSession input data structure.</comment>
          
            <elem name="dynamics" multiplicity="1" type="DynamicsProfile">
                <comment>
                    Specifies the dymnamics of the device providing the data.  If not known specify undefined.
                    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="duration" multiplicity="1" type="int32">
                <comment>
                    Number of seconds duration should persist. Maximum value is 86400 (1 day).
                </comment>
            </elem>

            <elem name="typeObs" multiplicity="0..*" type="ObservationType">
                <comment>
                    Optional List of supported observation types.  Improves transaction initialization speed if only observation types needed are specified.
                    If not specified, all supported observations will be available for the session.
                </comment>
            </elem>

            <elem name="ctTypicalObs" multiplicity="0..1" type="int32">
                <comment>
                    Optional count of typical observations.  Improves memory allocation when sizing internal buffers to typical number
                    of observations.
                </comment>
            </elem>

        </struct>

        <!-- CreateSessionOutput structure -->
        <struct name="CreateSessionOutput" type="IlpOutputBase" >
            <comment>ILP.Positioning.CreateSession output data structure.</comment>
            <elem name="resultcode" multiplicity="1" type="ResultCode">
                <comment>
                    Result of session creation operation.
                </comment>
            </elem>
            <elem name="uuidSession" multiplicity="0..1" type="UUID">
                <comment>
                    Session identifier of the created session.
                </comment>
            </elem>
        </struct>
    
        <!-- 
        *******************************************************
        ReleaseSession Data Types
        *******************************************************
        -->

        <!-- ReleaseSessionInput structure -->
        <struct name="ReleaseSessionInput" >
            <comment>ILP.Positioning.ReleaseSession input data structure.</comment>
            <elem name="uuidSession" multiplicity="1" type="UUID">
                <comment>
                    Session identifier of the session to release.
                </comment>
            </elem>

        </struct>

        <!-- 
        *******************************************************
        Initialize Data Types
        *******************************************************
        -->

        <!-- InitializeInput structure -->
        <struct name="InitializeInput" type="IlpInputBase" >
            <comment>ILP.Positioning.Initialize input data structure.</comment>

            <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>

            <elem name="state" multiplicity="1" type="StateInfo">
                <comment>
                    Specifies the position to initialize the state of the positioning engine.
                </comment>
            </elem>
 
        </struct>

        <!-- InitializeOutput structure -->
        <struct name="InitializeOutput" type="IlpOutputBase">
            <comment>ILP.Positioning.Initialize output data structure.</comment>
            <elem name="resultcode" multiplicity="1" type="ResultCode">
                <comment>
                    Result of session creation operation.
                </comment>
            </elem>
            <elem name="uuidSession" multiplicity="0..1" type="UUID">
                <comment>
                    Session identifier of the created session.
                </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>

            <operation name="CreateSession">
                <comment>
                    Creates a persistent session object and returns its UUID.  Can be used to process a series of related transactions
                    using the previous filter state.  Good for temporal or multiple observation type updates that were not
                    available at the same time.
                </comment>
                <input name="Input" type="CreateSessionInput" sid="0x1012"/>
                <output name="Result" type="CreateSessionOutput" sid="0x1013"/>
            </operation>

            <operation name="ReleaseSession">
                <comment>
                    Releases any persistent session data associated with the UUID.
                </comment>
                <input name="Input" type="ReleaseSessionInput" sid="0x1014"/>
                <!-- output name="Result" type="void" sid="0x0000" result="return"/ -->
            </operation>      
      
            <operation name="Initialize">
                <comment>
                    Initializes the positioning engine to state specified in the provided shape information.
                    This is an optional interaction given most cases, this initial position can be determmined from
                    the provided data.   
                </comment>
                <input name="Input" type="InitializeInput" sid="0x1016"/>
                <output name="Result" type="InitializeOutput" sid="0x1017" />
            </operation>
      
        </interface>

    </namespace>
</specification>