Location data along fields vs channel settings
17 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
George Popovici
le 10 Juil 2020
Commenté : George Popovici
le 14 Juil 2020
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 commentaires
Réponse acceptée
Vinod
le 10 Juil 2020
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.
Plus de réponses (0)
Communautés
Plus de réponses dans ThingSpeak Community
Voir également
Catégories
En savoir plus sur Read Data from Channel dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
