LocationService / Client / verify_device_position

verify_device_position#

LocationService.Client.verify_device_position(**kwargs)#

Verifies the integrity of the device’s position by determining if it was reported behind a proxy, and by comparing it to an inferred position estimated based on the device’s state.

See also: AWS API Documentation

Request Syntax

response = client.verify_device_position(
    TrackerName='string',
    DeviceState={
        'DeviceId': 'string',
        'SampleTime': datetime(2015, 1, 1),
        'Position': [
            123.0,
        ],
        'Accuracy': {
            'Horizontal': 123.0
        },
        'Ipv4Address': 'string',
        'WiFiAccessPoints': [
            {
                'MacAddress': 'string',
                'Rss': 123
            },
        ],
        'CellSignals': {
            'LteCellDetails': [
                {
                    'CellId': 123,
                    'Mcc': 123,
                    'Mnc': 123,
                    'LocalId': {
                        'Earfcn': 123,
                        'Pci': 123
                    },
                    'NetworkMeasurements': [
                        {
                            'Earfcn': 123,
                            'CellId': 123,
                            'Pci': 123,
                            'Rsrp': 123,
                            'Rsrq': ...
                        },
                    ],
                    'TimingAdvance': 123,
                    'NrCapable': True|False,
                    'Rsrp': 123,
                    'Rsrq': ...,
                    'Tac': 123
                },
            ]
        }
    },
    DistanceUnit='Kilometers'|'Miles'
)
Parameters:
  • TrackerName (string) –

    [REQUIRED]

    The name of the tracker resource to be associated with verification request.

  • DeviceState (dict) –

    [REQUIRED]

    The device’s state, including position, IP address, cell signals and Wi-Fi access points.

    • DeviceId (string) – [REQUIRED]

      The device identifier.

    • SampleTime (datetime) – [REQUIRED]

      The timestamp at which the device’s position was determined. Uses ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

    • Position (list) – [REQUIRED]

      The last known device position.

      • (float) –

    • Accuracy (dict) –

      Defines the level of certainty of the position.

      • Horizontal (float) – [REQUIRED]

        Estimated maximum distance, in meters, between the measured position and the true position of a device, along the Earth’s surface.

    • Ipv4Address (string) –

      The device’s Ipv4 address.

    • WiFiAccessPoints (list) –

      The Wi-Fi access points the device is using.

      • (dict) –

        Wi-Fi access point.

        • MacAddress (string) – [REQUIRED]

          Medium access control address (Mac).

        • Rss (integer) – [REQUIRED]

          Received signal strength (dBm) of the WLAN measurement data.

    • CellSignals (dict) –

      The cellular network infrastructure that the device is connected to.

      • LteCellDetails (list) – [REQUIRED]

        Information about the Long-Term Evolution (LTE) network the device is connected to.

        • (dict) –

          Details about the Long-Term Evolution (LTE) network.

          • CellId (integer) – [REQUIRED]

            The E-UTRAN Cell Identifier (ECI).

          • Mcc (integer) – [REQUIRED]

            The Mobile Country Code (MCC).

          • Mnc (integer) – [REQUIRED]

            The Mobile Network Code (MNC)

          • LocalId (dict) –

            The LTE local identification information (local ID).

            • Earfcn (integer) – [REQUIRED]

              E-UTRA (Evolved Universal Terrestrial Radio Access) absolute radio frequency channel number (EARFCN).

            • Pci (integer) – [REQUIRED]

              Physical Cell ID (PCI).

          • NetworkMeasurements (list) –

            The network measurements.

            • (dict) –

              LTE network measurements.

              • Earfcn (integer) – [REQUIRED]

                E-UTRA (Evolved Universal Terrestrial Radio Access) absolute radio frequency channel number (EARFCN).

              • CellId (integer) – [REQUIRED]

                E-UTRAN Cell Identifier (ECI).

              • Pci (integer) – [REQUIRED]

                Physical Cell ID (PCI).

              • Rsrp (integer) –

                Signal power of the reference signal received, measured in dBm (decibel-milliwatts).

              • Rsrq (float) –

                Signal quality of the reference Signal received, measured in decibels (dB).

          • TimingAdvance (integer) –

            Timing Advance (TA).

          • NrCapable (boolean) –

            Indicates whether the LTE object is capable of supporting NR (new radio).

          • Rsrp (integer) –

            Signal power of the reference signal received, measured in decibel-milliwatts (dBm).

          • Rsrq (float) –

            Signal quality of the reference Signal received, measured in decibels (dB).

          • Tac (integer) –

            LTE Tracking Area Code (TAC).

  • DistanceUnit (string) –

    The distance unit for the verification request.

    Default Value: Kilometers

Return type:

dict

Returns:

Response Syntax

{
    'InferredState': {
        'Position': [
            123.0,
        ],
        'Accuracy': {
            'Horizontal': 123.0
        },
        'DeviationDistance': 123.0,
        'ProxyDetected': True|False
    },
    'DeviceId': 'string',
    'SampleTime': datetime(2015, 1, 1),
    'ReceivedTime': datetime(2015, 1, 1),
    'DistanceUnit': 'Kilometers'|'Miles'
}

Response Structure

  • (dict) –

    • InferredState (dict) –

      The inferred state of the device, given the provided position, IP address, cellular signals, and Wi-Fi- access points.

      • Position (list) –

        The device position inferred by the provided position, IP address, cellular signals, and Wi-Fi- access points.

        • (float) –

      • Accuracy (dict) –

        The level of certainty of the inferred position.

        • Horizontal (float) –

          Estimated maximum distance, in meters, between the measured position and the true position of a device, along the Earth’s surface.

      • DeviationDistance (float) –

        The distance between the inferred position and the device’s self-reported position.

      • ProxyDetected (boolean) –

        Indicates if a proxy was used.

    • DeviceId (string) –

      The device identifier.

    • SampleTime (datetime) –

      The timestamp at which the device’s position was determined. Uses ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

    • ReceivedTime (datetime) –

      The timestamp for when the tracker resource received the device position in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

    • DistanceUnit (string) –

      The distance unit for the verification response.

Exceptions

  • LocationService.Client.exceptions.InternalServerException

  • LocationService.Client.exceptions.ResourceNotFoundException

  • LocationService.Client.exceptions.AccessDeniedException

  • LocationService.Client.exceptions.ValidationException

  • LocationService.Client.exceptions.ThrottlingException