예제 #1
0
        public string WeatherDataListing()
        {
            //Forms the weather data into a string separated by line feeds
            string wsList = "";

            if (weaList.Count > 0)
            {
                {
                    wsList += "WriteDate:\t" + ReportDate.ToString("hh:mm:ss");
                    wsList += "\r\n" + "TempScale:\t" + TempScale.ToString();
                    wsList += "\r\n" + "WindScale:\t" + WindScale.ToString();
                    wsList += "\r\n" + "SkyTemp:\t" + SkyTemp.ToString();
                    wsList += "\r\n" + "AmbTemp:\t" + AmbTemp.ToString();
                    wsList += "\r\n" + "SenTemp:\t" + SenTemp.ToString();
                    wsList += "\r\n" + "WindSpeed:\t" + WindSpeed.ToString();
                    wsList += "\r\n" + "Humidity:\t\t" + Humidity.ToString();
                    wsList += "\r\n" + "DewPoint:\t" + DewPoint.ToString();
                    wsList += "\r\n" + "DewHeat:\t" + DewHeat.ToString();
                    wsList += "\r\n" + "RainFlag:\t\t" + RainFlag.ToString();
                    wsList += "\r\n" + "WetFlag:\t\t" + WetFlag.ToString();
                    wsList += "\r\n" + "ElapsedTime:\t" + ElapsedSeconds.ToString();
                    wsList += "\r\n" + "LastDataWrite:\t" + LastDataWrite.ToString("hh:mm:ss");
                    wsList += "\r\n" + "Cloudiness:\t" + Cloudiness.ToString();
                    wsList += "\r\n" + "Windiness:\t" + Windiness.ToString();
                    wsList += "\r\n" + "Raininess:\t" + Raininess.ToString();
                    wsList += "\r\n" + "Darkness:\t" + Darkness.ToString();
                    wsList += "\r\n" + "RoofCloseFlag:\t" + RoofCloseFlag.ToString();
                    wsList += "\r\n" + "AlertFlag:\t\t" + AlertFlag.ToString();
                }
            }
            return(wsList);
        }
        public void Execute(ref EnvironmentManager environmentManager)
        {
            if (environmentManager.intervalMet)
            {
                CloudCoverage cloudCoverage = WeatherDataCurves.GetInstance().cloudCoverageCurves[environmentManager.month];

                environmentManager.currentClearNode        = cloudCoverage.clear.Evaluate(environmentManager.timeOfDay);
                environmentManager.currentMostlyClearNode  = cloudCoverage.mostlyClear.Evaluate(environmentManager.timeOfDay);
                environmentManager.currentPartlyCloudyNode = cloudCoverage.partlyCloudy.Evaluate(environmentManager.timeOfDay);
                environmentManager.currentMostlyCloudyNode = cloudCoverage.mostlyCloudy.Evaluate(environmentManager.timeOfDay);

                Raininess raininess = WeatherDataCurves.GetInstance().rainfallData[environmentManager.month];

                environmentManager.rainfallChance   = raininess.rainfallChance;
                environmentManager.rainfallQuantity = raininess.rainfallHeaviness;

                Temperature temperature = WeatherDataCurves.GetInstance().temperatureData[environmentManager.month];

                environmentManager.currentTemperatureTarget           = temperature.averageTemperature.Evaluate(environmentManager.timeOfDay);
                environmentManager.currentTenToNinetyPercentileSpread = temperature.tenToNinetyPercentileSpread.Evaluate(environmentManager.timeOfDay);
            }
        }