Exemple #1
0
        public void MerkelConvertValues(bool isInternationalSystemOfUnits_IS_, bool isElevation, MerkelData data)
        {
            if (isInternationalSystemOfUnits_IS_)
            {
                //    WBT = fnCelcToFar(WBT);
                //    T1 = fnCelcToFar(T1);
                //    T2 = fnCelcToFar(T2);
                data.WetBulbTemperature   = UnitConverter.ConvertCelsiusToFahrenheit(data.WetBulbTemperature);
                data.ColdWaterTemperature = UnitConverter.ConvertCelsiusToFahrenheit(data.ColdWaterTemperature);
                data.HotWaterTemperature  = UnitConverter.ConvertCelsiusToFahrenheit(data.HotWaterTemperature);

                if (!isElevation)
                {
                    data.Elevation = UnitConverter.ConvertMetersToFeet(UnitConverter.ConvertKilopascalToElevationInMeters(data.BarometricPressure));
                }
            }
            else
            {
                if (!isElevation)
                {
                    data.Elevation = UnitConverter.ConvertBarometricPressureToElevationInFeet(UnitConverter.CalculatePressureCelcius(data.BarometricPressure));
                }
            }
        }