====== Projets Objets Connectés et Services (OCS) ====== ==== GROUP GR13 ==== === Title of the Project : Light Sensor to Weather === === Name of the members of the Group === * ALFONSI * Martin * IHM * alfonsi@polytech.unice.fr * VICARD * Axel * IHM * vicard@polytech.unice.fr === Equipments === * Marque et type de votre téléphone : NOKIA LUMIA * Téléphone personnel : NON * IMEI : 356355051357562 === Content of the Project === Our project aims is to detect the current weather using the Windows Phone's Light Sensor combine to the current time. To gather data from the Light Sensor, we use the LightSensor class from the Windows.Devices.Sensors namespace, which is available since Windows Phone 8.1 SDK is up. This class returns the ambient-light reading as a LUX value. To get the current time, we also use the DateTime class from the System namespace. For our detection we round the current time to the below hour. To get the weather from these values, we use a neural network. To create this neural network with use the [[http://www.alglib.net/|alglib library]] . We trained this neural network with several values which respect these hypothesis : * dark indoor : 0-50 lux, from 7am to 6pm * very cloudy : 51-5000 lux, from 7am to 6pm * sunny with some cloud : 5001-30000 lux, from 7am to 6pm * sunset : 10001-30000 lux, at 6pm * sunny without cloud : 30001-100000 lux, from 7am to 6pm * moonless night : 0-10 lux, from 7pm to 6am * fullmoon night : 11-50 lux, from 7pm to 6am * home light : 51-100000 lux, from 7pm to 6am * sunrise : 10001-30000 lux, at 6am === SOFTWARE PACKAGES of the Project === * README To execute our project, you will need to have Visual Studio 2013 SP2 (or later) and the Windows Phone 8.1 SDK (or later) installed on your computer. Then you can should create a new Windows Phone 8.1 project and import our project files to it. You should be able to run the project without adding any .dll. * Project zip file : [[https://drive.google.com/file/d/0B7i70Bg2z72QN05tbFRfcU9kZTg/view?usp=sharing]] * All required softwares Visual Studio 2013 : [[http://www.microsoft.com/fr-fr/download/details.aspx?id=44921]] Windows Phone SDK : [[http://dev.windows.com/fr-fr/develop/download-phone-sdk]] === HOW TO USE IT === To use our application, just launch it. [[https://drive.google.com/file/d/0B7i70Bg2z72Qa3RTWkxNVmxVdEE/view?usp=sharing|There is only 1 view.]] On this view you can see the current LUX value from the light sensor, the current time, and the current weather deduct by the previous values. These values are all update every time the light sensor detect a change of the lux value. === RESULTS === As expected, once the neural network is trained, we can determine the weather using this network, the current lux value and the current time. Unfortunately, we didn't have a Windows Phone during the last test phase, and the simulator can only simulate the presence of a Light Sensor, we couldn't change its lux value. So the accuracy of our application might be really bad. To fix this problem, we should make a better dataset, looking for lux values with a Windows Phone for each time and each weather. Then use this dataset in stead of our actual values to train the neural network.