Skip to main content

location

Latest Versionv1.0.0
Input Content Typeapplication/json
Output Content Typeapplication/json

The location transformer uses Golioth Location to resolve device position using network information provided in the data message payload. Network-based positioning requires information about zero or more cell towers and Wi-Fi access points. Data must be formatted as described below, and at least one cell tower or Wi-Fi access point must be provided for successful resolution.

Tip

The net_info support in the Golioth Firmware SDK can be used to structure a valid payload. See the location example for more information.

AttributeDescription
cellArray of cell tower objects.
wifiArray of Wi-Fi access point objects.

Cell Tower Format

AttributeDescriptionRequired
typeString indicating type of cellular network (ltecatm or nbiot
mccInteger indicating Mobile Country Code.
mncInteger indicating Mobile Network Code.
idInteger indicating EUCID (LTE Cat-M) or Cell ID (NB-Iot).
strengthInteger indicating RSRP (LTE Cat-M) or NRSRP (NB-Iot). (dBm)
lacInteger indicating Tracking Area Code (TAC)
ageInteger indicating time elapsed since measurement. (ms)
channelInteger indicating EARFCN.
servingBoolean indicate whether device is currently served by the cell. (default: false)
lidInteger indicating PCI (LTE Cat-M) or NCID (NB-Iot)

Wi-Fi Access Point Format

AttributeDescriptionRequired
macString indicating access point MAC address.
ssidString indicating access point Service Set Identifier.
strengthInteger indicating signal strength of access point (dBm).
ageInteger indicating time elapsed since measurement. (ms)
frequencyInteger indicating frequency of access point. (MHz)
channelInteger indicating channel number of access point.
ConnectedBoolean indicating whether device is currently connected to the access point. (default: false)

Example Usage

    transformer:
type: location
version: v1

Example Input

{
"cell": [
{
"type": "ltecatm",
"mcc": 260,
"mnc": 3,
"id": 25115045,
"strength": -113
},
{
"type": "ltecatm",
"mcc": 260,
"mnc": 3,
"id": 25115046,
"strength": -89
}
],
"wifi": [
{
"mac": "b0:5b:99:d8:0f:f4",
"rssi": -83
},
{
"mac": "ac:f8:cc:09:b3:16",
"rssi": -90
}
]
}

Example Output

While output from the location transformer can be transformed further and routed to any number of destinations, the format of the data returned can be delivered to the location destination without any modification.

{
"latitude": 50.664189000,
"longitude": 17.942112000,
"accuracy": 65
}