Commit b5502224 authored by Federico Sismondi's avatar Federico Sismondi

Added location of flowerbed clusters as doc

parent 61f22108
#!/usr/bin/env python3
"""
Listens to LoRa platform POSTS (sensor readings), reformats data, and forwards to IoT platform.
Listens to LoRa platform POSTS (sensor readings), it reformats data, and forwards to IoT platform.
In simple words this module:
- Initializes Device entities
- Updates Device and Flowerbed entities' attributes.
# datetime for now should be datetime.datetime.now(datetime.timezone.utc).isoformat().replace("+00:00", "Z")
The flowerbeds are located at:
1.
"location": {
"type": "geo:polygon",
"value": [
"46.18418608298799,6.140411101107388",
"46.18399689316645,6.140545143921089",
"46.184056735085676,6.140663530473896",
"46.18416543042762,6.1405709147437815",
"46.18418608298799,6.140411101107388"
]
}
2.
"location": {
"type": "geo:polygon",
"value": [
"46.18374322214299,6.136568203412297",
"46.18376742201472, 6.1368720158459675",
"46.1837387297771, 6.13688047399718",
"46.183561454034184, 6.136799226881401",
"46.18354104365161, 6.13658988021811",
"46.18374322214299, 6.136568203412297"
]
}
3.
"location": {
"type": "geo:polygon",
"value": [
"46.18777345077501, 6.141221902014418",
"46.18776394428967,6.1412558085139075",
"46.187460562531,6.141082986525166",
"46.18747273747444,6.141046425800975",
"46.18777345077501,6.141221902014418"
]
}
4.
"location": {
"type": "geo:polygon",
"value": [
"46.18159456349196,6.1409987953921235",
"46.181588625021845,6.141030022537279",
"46.18139270253789,6.140969933509893",
"46.18139855159107,6.140930937248621",
"46.18159456349196,6.1409987953921235"
]
}
5.
"location": {
"type": "geo:polygon",
"value": [
"46.181615723284146,6.140883015227287",
"46.181614058518115,6.140894712009585",
"46.18131811980222,6.1408214662397675",
"46.18132405821452,6.140790239226948",
"46.181619996950765,6.140863484835084",
"46.181615723284146,6.140883015227287"
]
}
6.
"location": {
"type": "geo:polygon",
"value": [
"46.189423842171415, 6.13594646813324",
"46.189471839237186, 6.1360515432406455",
"46.189511939908066, 6.136018197634609",
"46.189232409898864, 6.135418636893407",
"46.18919332854337, 6.135462321658967",
"46.189423842171415, 6.13594646813324"
]
}
7.
"location": {
"type": "geo:polygon",
"value": [
"46.185130470398505, 6.140464991190295",
"46.18513395867176, 6.1405335596375386",
"46.18508999065603, 6.1405436758278995",
"46.18508470351761, 6.140475150355029",
"46.185130470398505, 6.140464991190295"
]
}
8.
"location": {
"type": "geo:polygon",
"value": [
"46.18417719481858, 6.1394048712655955",
"46.18418137433464, 6.139455287863608",
"46.18414308644842, 6.139489879659276",
"46.18412512757313, 6.139492899043365",
"46.18412211601563, 6.139465769842075",
"46.18417719481858, 6.1394048712655955"
]
}
"""
import re
import os
......
......@@ -136,21 +136,23 @@ attrs = {
# entities ids per pilot tuples
entities = [
# weather prediction use case - weather observed (current)
('urn:ngsi-ld:WeatherObserved:WeatherObserved', ['carouge', 'braila', 'wtp_lab']),
('urn:ngsi-ld:WeatherObserved:WeatherObserved-1', ['alicante']),
('urn:ngsi-ld:WeatherObserved:WeatherObserved-2', ['alicante']),
# forecast today
('urn:ngsi-ld:WeatherForecast:WeatherForecast-Day0-0', ['carouge', 'alicante', 'braila','wtp_lab']),
('urn:ngsi-ld:WeatherForecast:WeatherForecast-Day0-1', ['carouge', 'alicante', 'braila','wtp_lab']),
('urn:ngsi-ld:WeatherForecast:WeatherForecast-Day0-2', ['carouge', 'alicante', 'braila','wtp_lab']),
('urn:ngsi-ld:WeatherForecast:WeatherForecast-Day0-3', ['carouge', 'alicante', 'braila','wtp_lab']),
# forecast tomorrow
('urn:ngsi-ld:WeatherForecast:WeatherForecast-Day1-0', ['carouge', 'alicante', 'braila','wtp_lab']),
('urn:ngsi-ld:WeatherForecast:WeatherForecast-Day1-1', ['carouge', 'alicante', 'braila','wtp_lab']),
('urn:ngsi-ld:WeatherForecast:WeatherForecast-Day1-2', ['carouge', 'alicante', 'braila','wtp_lab']),
('urn:ngsi-ld:WeatherForecast:WeatherForecast-Day1-3', ['carouge', 'alicante', 'braila','wtp_lab']),
# forecast tomorrow
('urn:ngsi-ld:WeatherForecast:WeatherForecast-Day2-0', ['carouge', 'alicante', 'braila','wtp_lab']),
('urn:ngsi-ld:WeatherForecast:WeatherForecast-Day2-1', ['carouge', 'alicante', 'braila','wtp_lab']),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment