Cell Location

GetLocationFromCells

Changed on
<div class="nrf-note"> <p><b>Cloud-to-cloud — authorize with an Organization Auth Token.</b><br><code>https://api.location.nrfcloud.com/v1/organizations/{organizationSlug}/projects/{projectSlug}/location/cell</code></p> <p><b>Device-to-cloud — authorize with a JSON Web Token.</b><br><code>https://api.location.nrfcloud.com/v1/location/cell</code></p> </div> <div style="background-color: #fff3cd; color: #856404; text-align: center; border: 1px solid #ffeeba; border-radius: .25rem; padding: .75rem 1.25rem">This endpoint has an alternative. See the <a href="#tag/Ground-Fix">ground fix endpoint</a> for more details.</div>

Gets the lat, lon, and uncertainty values for the LTE, GSM, or WCDMA cell(s) passed. If the optional nmr parameter is passed the endpoint operates in a "multi-cell" mode, using more than one cell to determine a more accurate location. At least one cell is required. An empty lte, ltecatm, nbiot, gsm, or wcdma array is treated the same as an omitted field.

Basic Request:

curl -X POST "$API_HOST/v1/location/cell" -H "Authorization: Bearer $JWT" -H "Content-Type: application/json" -d "{\"lte\":[{\"mcc\": 244, \"mnc\": 91,\"tac\": 4099,\"eci\":36078631}]}"

Save device location and silence response:

curl --verbose -X POST "$API_HOST/v1/location/cell?doReply=0" -H "Authorization: Bearer $JWT" -H "Content-Type: application/json" -d "{\"lte\":[{\"mcc\": 244, \"mnc\": 91,\"tac\": 4099,\"eci\":36078631}]}"
post/location/cell

Request

Query parameters

boolean
OR
number double
boolean
OR
number double
OR
'singleWifi'
hiConfboolean

nRF Cloud automatically uses a 68% confidence interval when estimating the Horizontal Positioning Error (HPE) for a location. This means that there is a 68% probability that the device's actual location is within the HPE radius of the returned coordinates. Enabling this flag will use a 95% confidence interval instead, resulting in a larger HPE radius, and a higher probability that the device's actual location is within the circle.

Headers

x-custom-device-idstring

User-defined device ID, used to identify requests when using a cloud-to-cloud integration. Ignored if using a device token.

Example:my-device-12345

Request body

Example request

{
  "lte": [
    {
      "rsrp": -90,
      "rsrq": -8,
      "mcc": 310,
      "eci": 167899669,
      "tac": 13601,
      "pci": 143,
      "earfcn": 41490,
      "adv": 20000,
      "nmr": [
        {
          "rsrp": -90,
          "rsrq": -8,
          "earfcn": 41490,
          "pci": 143,
          "eci": 167899669,
          "timeDiff": 300
        }
      ]
    }
  ],
  "ltecatm": [
    {
      "rsrp": -90,
      "rsrq": -8,
      "mcc": 310,
      "eci": 167899669,
      "tac": 13601,
      "pci": 143,
      "earfcn": 41490,
      "adv": 20000,
      "nmr": [
        {
          "rsrp": -90,
          "rsrq": -8,
          "earfcn": 41490,
          "pci": 143,
          "eci": 167899669,
          "timeDiff": 300
        }
      ]
    }
  ],
  "nbiot": [
    {
      "rsrp": -90,
      "rsrq": -8,
      "mcc": 310,
      "eci": 167899669,
      "tac": 13601,
      "pci": 143,
      "earfcn": 41490,
      "adv": 20000,
      "nmr": [
        {
          "rsrp": -90,
          "rsrq": -8,
          "earfcn": 41490,
          "pci": 143,
          "eci": 167899669,
          "timeDiff": 300
        }
      ]
    }
  ],
  "gsm": [
    {
      "mcc": 310,
      "lac": 5126,
      "cid": 16504,
      "rssi": -75,
      "nmr": [
        {
          "baseStationId": 6,
          "arfcn": 82,
          "rssi": -75
        }
      ]
    }
  ],
  "wcdma": [
    {
      "mcc": 310,
      "lac": 5126,
      "cid": 16504,
      "rscp": -95,
      "nmr": [
        {
          "uarfcn": 10788,
          "psc": 123,
          "rscp": -95
        }
      ]
    }
  ]
}

Response

Returns lat/lon coordinates and uncertainty for a device using cell data.

latnumber double required

WGS 84 geodetic grid line, north to south.

lonnumber double required

WGS 84 geodetic grid line, east to west.

uncertaintynumber double required

Radius of the uncertainty circle around the location in meters. Also known as Horizontal Positioning Error (HPE).

Example response

{
  "lat": 45.524098,
  "lon": -122.688408,
  "uncertainty": 300.5
}

Changes

    • info

      query request parameter fallback list-of-types was widened by adding types number and string

    • info

      for the query request parameter fallback, the type was generalized from boolean to no type