Ejemplo n.º 1
0
 public void Update(CWindInfo windInfo)
 {
     MinSpeed = windInfo.WindSpeed;
     MaxSpeed = windInfo.WindSpeed;
     Accumulate(windInfo);
     ++m_countAcc;
 }
Ejemplo n.º 2
0
        protected override CWeatherInfo GetChangedData()
        {
            var windInfo = new CWindInfo
            {
                WindDirection = WindDirection,
                WindSpeed     = WindSpeed
            };

            var info = new CWeatherInfo(windInfo)
            {
                Temperature = Temperature,
                Humidity    = Humidity,
                Pressure    = Pressure
            };

            return(info);
        }
Ejemplo n.º 3
0
 private void Accumulate(CWindInfo windInfo)
 {
     m_accSpeed  += windInfo.WindSpeed;
     m_accXValue += Math.Cos(windInfo.WindDirection * (Math.PI / 180)) * windInfo.WindSpeed;
     m_accYValue += Math.Sin(windInfo.WindDirection * (Math.PI / 180)) * windInfo.WindSpeed;
 }