# TTN HTTP integration metadata device location/position

**URL:** <https://www.thethingsnetwork.org/forum/t/ttn-http-integration-metadata-device-location-position/23455>\
**Category:** Uncategorized\
**Created:** [March 3, 2019, 1:00pm UTC](https://www.thethingsnetwork.org/forum/t/ttn-http-integration-metadata-device-location-position/23455 "2019-03-03T13:00:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![joe\_4](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/joe_4/32/35697_2.png) [@joe\_4](https://www.thethingsnetwork.org/forum/u/joe_4)\
**Post date:** [March 3, 2019, 1:00pm UTC](https://www.thethingsnetwork.org/forum/t/ttn-http-integration-metadata-device-location-position/23455/1 "2019-03-03T13:00:30Z")

</div>

Can the device coordinates in the metadata be set from the device GPS position?  
Can this be set from a decoder using payload data?  
Is it a automatically calculated field?  
Or is it only possible to set it manually in the device settings on the web page?  
What is this position data, and what different methods can be used to set this position data?  
Can I somehow set the location source, or is this something else?

```
{
    "time": "2019-03-03T12:47:50.624474908Z",
    "frequency": 868.1,
    "modulation": "LORA",
    "data_rate": "SF12BW125",
    "coding_rate": "4/5",
    "gateways": [
        {
            "gtw_id": "eui-b827ebfffee2b605",
            "timestamp": 485715212,
            "time": "",
            "channel": 0,
            "rssi": -60,
            "snr": 9.8,
            "rf_chain": 1,
            "latitude": 61.510452,
            "longitude": 6.151432,
            "altitude": 235,
            "location_source": "registry"
        }
    ],
--->"latitude": 61.51543,
--->"longitude": 6.2156367,
--->"altitude": 207,
    "location_source": "registry"
}
```

---

<div class="post-metadata">

**Author:** ![UdLoRa](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/udlora/32/45330_2.png) [@UdLoRa](https://www.thethingsnetwork.org/forum/u/UdLoRa)\
**Post date:** [March 3, 2019, 2:13pm UTC](https://www.thethingsnetwork.org/forum/t/ttn-http-integration-metadata-device-location-position/23455/2 "2019-03-03T14:13:22Z")

</div>

It depends.  
If your device has a fixed position (and thus does not need a GPS), you can set its position in the console, and you will automatically find its coordinates as above.  
If your device has a GPS, you can send its coordinates via LoRaWAN but they will be among the payload fields, and you will have to decode them with a decoder function /thus in the payload\_fields field of the JSON file).

---

<div class="post-metadata">

**Author:** ![joe\_4](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/joe_4/32/35697_2.png) [@joe\_4](https://www.thethingsnetwork.org/forum/u/joe_4)\
**Post date:** [March 3, 2019, 2:44pm UTC](https://www.thethingsnetwork.org/forum/t/ttn-http-integration-metadata-device-location-position/23455/3 "2019-03-03T14:44:55Z")

</div>

> [@UdLoRa](#):
>
> via LoRaWAN but they will be among the payload fields, and you will have to decode them with a decoder function /thus in the payload\_fields field of the JSON file).

Can I update this metadata position based on payload data automatically? Or is it not meant to be used this way?

---

<div class="post-metadata">

**Author:** ![system](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/6/2/6250ea44fd2b0d6259489e1a92748df681e1f970.png) [@system](https://www.thethingsnetwork.org/forum/u/system)\
**Post date:** [May 2, 2019, 2:44pm UTC](https://www.thethingsnetwork.org/forum/t/ttn-http-integration-metadata-device-location-position/23455/4 "2019-05-02T14:44:59Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
