YAWS: Difference between revisions
From ICO wiki
Jump to navigationJump to search
Line 33: | Line 33: | ||
===XML=== | ===XML=== | ||
<source lang="xml"> | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<records timestamp="1489951055" > | |||
<record> | |||
<username>kepsic</username> | |||
<location> | |||
<!--Postal aadress--> | |||
<aadress/> | |||
<!--GPS cordinates--> | |||
<geo> | |||
<lat/> | |||
<long/> | |||
</geo> | |||
</location> | |||
<values> | |||
<value property="airpressure" unit="hPa" > <![CDATA[1004.1]]></value> | |||
<value property="relativehumidity" unit="" ><![CDATA[87]]></value> | |||
<value property="airtemperature" unit="C" ><![CDATA[-0.5]]></value> | |||
<value property="winddirection" unit="degree" ><![CDATA[207]]></value> | |||
<value property="windspeed" unit="m/s" ><![CDATA[0.5]]></value> | |||
<value property="windspeedmax" unit="m/s" ><![CDATA[2.1]]></value> | |||
<!--Calculated values if GPS cordinates is set--> | |||
<value property="sunrise" ><![CDATA[04:00]]></value> | |||
<!--Calculated values if GPS cordinates is set--> | |||
<value property="sunset" ><![CDATA[02:00]]></value> | |||
</values> | |||
<related_ehmi_stations> | |||
<station> | |||
<name>Võru</name> | |||
<wmocode>26249</wmocode> | |||
<phenomenon>Variable clouds</phenomenon> | |||
<visibility>20.0</visibility> | |||
<precipitations>0</precipitations> | |||
<airpressure>1004.1</airpressure> | |||
<relativehumidity>87</relativehumidity> | |||
<airtemperature>-0.5</airtemperature> | |||
<winddirection>207</winddirection> | |||
<windspeed>0.5</windspeed> | |||
<windspeedmax>2.1</windspeedmax> | |||
</station> | |||
<station> | |||
<name>Valga</name> | |||
<wmocode>26247</wmocode> | |||
<phenomenon/> | |||
<visibility>23.0</visibility> | |||
<precipitations>0</precipitations> | |||
<airpressure>1004.4</airpressure> | |||
<relativehumidity>92</relativehumidity> | |||
<airtemperature>-1.4</airtemperature> | |||
<winddirection>203</winddirection> | |||
<windspeed>0.4</windspeed> | |||
<windspeedmax>1.8</windspeedmax> | |||
</station> | |||
</related_ehmi_stations> | |||
</record> | |||
</records> | |||
</source> | |||
===XML schema (XSD)=== | ===XML schema (XSD)=== | ||
===XSLT 1=== | ===XSLT 1=== |
Revision as of 23:44, 19 March 2017
Meeskond
- Andres Kepler
Idee
Luua ilmajaama veebiteenus.
Vajalikud komponendid:
- REST teenus
- REST Teenuse kliendiks on RPi(2|3) W10, mis teeb sensori (SparkFun Weather Shield) andmetega XML POST päringuid REST teenuse suunas
- Presentatsiooni kiht, mis visualiseerib REST'i andmed.
- Presenteerivaks seadmeks on tavaarvuti või RPI3 7" W10'ga
Projekt
Ülesanne
- Tuvastatud kasutaja saab ilmajaama andmedi lisada, kuvada ja kustutada
- Tuvastatud kasutaja saab REST teenusega lisada andmebaasi ilmajaama andmedi.
- Anonüümne ja tuvastatud kasutaja saab ilmajaama sensoriandmedi filtreerida asukoha ja perioodi järgi
- Tuvastatud kasutajajid saab lisada gruppidesse (Riik, Maakond, Vald, Linn, Linnaosa)
- Tuvastatud kasutaja andmeid saab muuta
- Igal tuvastatud kasutajal on oma sensoriadnemetega "töölaud" (dashboard)
- Tuvastatud kasutaja saab oma ilmajaama andmed (dashboard) anonüümselt jagada.
Blog
- 17.03.2017 - YEInt'st saabus raudvara. RPi sai omale W10 peale.
XML
Teema
Ilmajaama andmed
XML
<?xml version="1.0" encoding="utf-8"?>
<records timestamp="1489951055" >
<record>
<username>kepsic</username>
<location>
<!--Postal aadress-->
<aadress/>
<!--GPS cordinates-->
<geo>
<lat/>
<long/>
</geo>
</location>
<values>
<value property="airpressure" unit="hPa" > <![CDATA[1004.1]]></value>
<value property="relativehumidity" unit="" ><![CDATA[87]]></value>
<value property="airtemperature" unit="C" ><![CDATA[-0.5]]></value>
<value property="winddirection" unit="degree" ><![CDATA[207]]></value>
<value property="windspeed" unit="m/s" ><![CDATA[0.5]]></value>
<value property="windspeedmax" unit="m/s" ><![CDATA[2.1]]></value>
<!--Calculated values if GPS cordinates is set-->
<value property="sunrise" ><![CDATA[04:00]]></value>
<!--Calculated values if GPS cordinates is set-->
<value property="sunset" ><![CDATA[02:00]]></value>
</values>
<related_ehmi_stations>
<station>
<name>Võru</name>
<wmocode>26249</wmocode>
<phenomenon>Variable clouds</phenomenon>
<visibility>20.0</visibility>
<precipitations>0</precipitations>
<airpressure>1004.1</airpressure>
<relativehumidity>87</relativehumidity>
<airtemperature>-0.5</airtemperature>
<winddirection>207</winddirection>
<windspeed>0.5</windspeed>
<windspeedmax>2.1</windspeedmax>
</station>
<station>
<name>Valga</name>
<wmocode>26247</wmocode>
<phenomenon/>
<visibility>23.0</visibility>
<precipitations>0</precipitations>
<airpressure>1004.4</airpressure>
<relativehumidity>92</relativehumidity>
<airtemperature>-1.4</airtemperature>
<winddirection>203</winddirection>
<windspeed>0.4</windspeed>
<windspeedmax>1.8</windspeedmax>
</station>
</related_ehmi_stations>
</record>
</records>