|
1 | 1 | --- |
2 | | -title: Location |
| 2 | +title: location |
3 | 3 | --- |
4 | 4 |
|
5 | | -[Golioth Location](/application-services/location) API definitions. |
| 5 | +| | | |
| 6 | +|---|:---:| |
| 7 | +|__Latest Version__| `v1.0.0` | |
| 8 | +|__Input Content Type__| `application/json` | |
| 9 | +|__Output Content Type__| `application/json` | |
6 | 10 |
|
7 | | -## Interface |
8 | | - |
9 | | -| Method | Description | Path | Content Format | |
10 | | -| ----------- | ------------------------------------------------- | ----------------- | -------------- | |
11 | | -| POST | Resolve location using network-based positioning. | `/.l/v1/net` | JSON/CBOR | |
12 | | - |
13 | | - |
14 | | -## Network Positioning Request Format |
15 | | - |
16 | | -Network-based positioning requests may include both cell tower and Wi-Fi access |
17 | | -point information. At least one cell tower or Wi-Fi access point is required for |
18 | | -successful resolution. |
| 11 | +The `location` transformer uses [Golioth |
| 12 | +Location](../../application-services/3-location) to resolve device position |
| 13 | +using network information provided in the data message payload. Network-based |
| 14 | +positioning requires information about zero or more cell towers and Wi-Fi access |
| 15 | +points. Data must be formatted as described below, and at least one cell tower |
| 16 | +or Wi-Fi access point must be provided for successful resolution. |
19 | 17 |
|
20 | 18 | | Attribute | Description | |
21 | 19 | | --------- | ------------------------------------------------------------ | |
22 | 20 | | `cell` | Array of cell tower objects. | |
23 | 21 | | `wifi` | Array of Wi-Fi access point objects. | |
24 | 22 |
|
| 23 | +#### Cell Tower Format |
| 24 | + |
| 25 | +| Attribute | Description | Required | |
| 26 | +|------------|------------------------------------------------------------------------------------|----------| |
| 27 | +| `type` | String indicating type of cellular network (`ltecatm` or `nbiot` | X | |
| 28 | +| `mcc` | Integer indicating Mobile Country Code. | X | |
| 29 | +| `mnc` | Integer indicating Mobile Network Code. | X | |
| 30 | +| `id` | Integer indicating EUCID (LTE Cat-M) or Cell ID (NB-Iot). | X | |
| 31 | +| `strength` | Integer indicating RSRP (LTE Cat-M) or NRSRP (NB-Iot). (dBm) | | |
| 32 | +| `lac` | Integer indicating Tracking Area Code (TAC) | | |
| 33 | +| `age` | Integer indicating age of measurement. (ms) | | |
| 34 | +| `channel` | Integer indicating EARFCN. | | |
| 35 | +| `serving` | Boolean indicate whether device is currently served by the cell. (default: `false`) | | |
| 36 | +| `lid` | Integer indicating PCI (LTE Cat-M) or NCID (NB-Iot) | | |
| 37 | + |
| 38 | +#### Wi-Fi Access Point Format |
| 39 | + |
| 40 | +| Attribute | Description | Required | |
| 41 | +|-------------|--------------------------------------------------------------------------------------------------|----------| |
| 42 | +| `mac` | String indicating access point MAC address. | X | |
| 43 | +| `ssid` | String indicating access point Service Set Identifier. | | |
| 44 | +| `strength` | Integer indicating signal strength of access point (dBm). | | |
| 45 | +| `age` | Integer indicating age of measurement. (ms) | | |
| 46 | +| `frequency` | Integer indicating frequency of access point. (MHz) | | |
| 47 | +| `channel` | Integer indicating channel number of access point. | | |
| 48 | +| `Connected` | Boolean indicating whether device is currently connected to the access point. (default: `false`) | | |
| 49 | + |
25 | 50 |
|
26 | | -An example request with both cellular and Wi-Fi network data is provided below. |
| 51 | +### Example Usage |
| 52 | + |
| 53 | +```yaml |
| 54 | + transformer: |
| 55 | + type: location |
| 56 | + version: v1 |
| 57 | +``` |
| 58 | +
|
| 59 | +### Example Input |
27 | 60 |
|
28 | 61 | ```json |
29 | 62 | { |
@@ -56,47 +89,17 @@ An example request with both cellular and Wi-Fi network data is provided below. |
56 | 89 | } |
57 | 90 | ``` |
58 | 91 |
|
59 | | -### Cell Tower Format |
60 | | - |
61 | | -| Attribute | Description | Required | |
62 | | -|------------|------------------------------------------------------------------------------------|----------| |
63 | | -| `type` | String indicating type of cellular network (`ltecatm` or `nbiot` | X | |
64 | | -| `mcc` | Integer indicating Mobile Country Code. | X | |
65 | | -| `mnc` | Integer indicating Mobile Network Code. | X | |
66 | | -| `id` | Integer indicating EUCID (LTE Cat-M) or Cell ID (NB-Iot). | X | |
67 | | -| `strength` | Integer indicating RSRP (LTE Cat-M) or NRSRP (NB-Iot). (dBm) | | |
68 | | -| `lac` | Integer indicating Tracking Area Code (TAC) | | |
69 | | -| `age` | Integer indicating age of measurement. (ms) | | |
70 | | -| `channel` | Integer indicating EARFCN. | | |
71 | | -| `serving` | Boolean indicate whether device is currently served by the cell. (default: `false`) | | |
72 | | -| `lid` | Integer indicating PCI (LTE Cat-M) or NCID (NB-Iot) | | |
73 | | - |
74 | | -### Wi-Fi Access Point Format |
75 | | - |
76 | | -| Attribute | Description | Required | |
77 | | -|-------------|--------------------------------------------------------------------------------------------------|----------| |
78 | | -| `mac` | String indicating access point MAC address. | X | |
79 | | -| `ssid` | String indicating access point Service Set Identifier. | | |
80 | | -| `strength` | Integer indicating signal strength of access point (dBm). | | |
81 | | -| `age` | Integer indicating age of measurement. (ms) | | |
82 | | -| `frequency` | Integer indicating frequency of access point. (MHz) | | |
83 | | -| `channel` | Integer indicating channel number of access point. | | |
84 | | -| `Connected` | Boolean indicating whether device is currently connected to the access point. (default: `false`) | | |
85 | | - |
86 | | -## Network Positioning Response Format |
87 | | - |
88 | | -| Attribute | Description | |
89 | | -|-----------|---------------------------------------------------------| |
90 | | -| `lat` | Integer indicating latitude of device. (nanodegrees) | |
91 | | -| `lon` | Integer indicating longitude of device. (nanodegrees) | |
92 | | -| `acc` | Integer horizontal positioning accuracy (HPE). (meters) | |
| 92 | +### Example Output |
93 | 93 |
|
94 | | -An example response is provided below. |
| 94 | +While output from the `location` transformer can be transformed further and |
| 95 | +routed to any number of destinations, the format of the data returned can be |
| 96 | +delivered to the [`location` destination](../4-destinations/15-location.md) |
| 97 | +without any modification. |
95 | 98 |
|
96 | 99 | ```json |
97 | 100 | { |
98 | | - "lat": 50664189000, |
99 | | - "lon": 17942112000, |
100 | | - "acc": 65 |
| 101 | + "latitude": 50.664189000, |
| 102 | + "longitude": 17.942112000, |
| 103 | + "accuracy": 65 |
101 | 104 | } |
102 | 105 | ``` |
0 commit comments