Find 3D Position with WLAN

User Story

The user wants to determine the WGS-84 compliant coordinates and altitude defined by the WLAN information in the POST body.

Request

The code block below demonstrates a POST request to get the geocoordinates and altitude defined by the WLAN information in the POST body. You need to set the request content type in the HTTP headers.

Altitude information is requested by including query parameter desired=altitude and is provided if available. Note that it can also be requested with query parameter required=altitude, in which case HTTP status code 404 is returned, if altitude is not available. See Construct Locate Request chapter for details.

Global
Azure
POST /v2/locate?apiKey={YOUR_API_KEY}&desired=altitude HTTP/1.1
Host: positioning.hereapi.com
Content-Type: application/json
POST /v2/locate?apiKey={YOUR_API_KEY}&desired=altitude HTTP/1.1
Host: az.positioning.hereapi.com
Content-Type: application/json

Note

This example uses a HERE API Key to authenticate your request. For the available authentication options, see the Identity & Access Management Developer Guide.

This POST request requires the following POST body.

{
  "wlan": [
    {
      "mac": "74:26:AC:1F:47:9F",
      "rss": -47
    },
    {
      "mac": "74:26:AC:4C:5F:3E",
      "rss": -59
    },
    {
      "mac": "7C:21:0E:A9:58:03",
      "rss": -55
    },
    {
      "mac": "74:26:AC:1F:47:93",
      "rss": -57
    },
    {
      "mac": "7C:21:0E:A9:59:62",
      "rss": -59
    },
    {
      "mac": "7C:21:0E:A9:59:63",
      "rss": -59
    }
  ]
}

Response

The response to the request contains:

  • lat: WGS-84 compliant latitude coordinate
  • lng: WGS-84 compliant longitude coordinate
  • accuracy: Radius of the uncertainty circle around the position in meters
  • alt: Altitude in meters (referenced to the WGS-84 ellipsoid) negative or positive
  • altAccuracy: Uncertainty of the altitude estimate in meters (degree of confidence according to the confidence parameter)
{
  "location": {
    "lat": 61.49450804,
    "lng": 23.7754544,
    "accuracy": 4,
    "alt": 138.9,
    "altAccuracy": 2.5
  }
}

results matching ""

    No results matching ""