Location data along fields vs channel settings
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello,
Could you please help in explaining what is the difference between location data along the 8 available fields and location data on channel settings? Shouldn't be it be the same data?
Below is an example:
I set the location data:
POST /update.json HTTP/1.1
Host: api.thingspeak.com
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
Postman-Token: XX
api_key=XX&lat=45.01&lon=27.01&1=44.444&elevation=10.1
I get the data from channel fields:
{
"channel": {
"id": 1094740,
"name": "Caravan_ESP32",
"latitude": "44.412",
"longitude": "26.123",
"field1": "Humidity",
"field2": "Temperature",
"field7": "boot_count",
"field8": "h_thres",
"created_at": "2020-07-06T13:59:32Z",
"updated_at": "2020-07-10T06:11:42Z",
"last_entry_id": 11298
},
"feeds": [
{
"created_at": "2020-07-10T05:51:33Z",
"entry_id": 11298,
"field1": "44.444",
"latitude": "45.01",
"longitude": "27.01",
"elevation": "10.1"
}
]
}
I get the data from channel settings:
{
"id": 1094740,
"name": "Caravan_ESP32",
"description": "",
"latitude": "44.412",
"longitude": "26.123",
"created_at": "2020-07-06T13:59:32Z",
"elevation": "",
"last_entry_id": 11298,
"public_flag": false,
"url": "",
"ranking": 30,
"metadata": "",
"license_id": 0,
"github_url": null,
"tags": [],
"api_keys": [
{
"api_key": "XX",
"write_flag": true
},
{
"api_key": "XX",
"write_flag": false
}
]
}
As you can see above, location data is different. When I write location data as above, I would like to see it updated in the channel location. Is this possible?
Thanks,
George
댓글 수: 0
채택된 답변
Vinod
2020년 7월 10일
The lat-lon of the channel is where the channel is located. The lat-lon of the feed is where the actual feed was measured.
To take a concrete example, say you had one channel for your farm. On your farm you had multiple sensors (maybe an autonomous lawn mower?). Each sensor might make a reading at a different GPS location, but, your farm itself (and the channel) doesn't move. The channel lat-lon is used to show the map on the channel view. The feed lat-lon may be used to overlay the location of each individual sensor reading on the map, like this example.
댓글 수: 5
추가 답변 (0개)
커뮤니티
더 많은 답변 보기: ThingSpeak 커뮤니티
참고 항목
카테고리
Help Center 및 File Exchange에서 Read Data from Channel에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!