Welcome Guest, you are in: Login

wiki.crowe.co.nz

RSS RSS

Navigation





Search the wiki
»

PoweredBy

Accuweather Real Feel

RSS
Modified on Tuesday, 10 July 2018 09:13 by Administrator Categorized as Uncategorized
https://www.google.com/patents/US7251579




//Rextester.Program.Main is the entry point for your code. Don't change it.
//Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;

namespace Rextester
{
    public class Program
    {
            public static double RealFeel(double W, double A, double T, double D, int UVIndex, int P2)
    {
        // Adjust Wind
        double WA = (W < 4) ? (W / 2 + 2) : (W < 56) ? W : 56;

        double WSP1 = Math.Sqrt(W) * ((Math.Sqrt(A / 10.0)) / 10.0);
        double WSP2 = (80.0 - T) * (0.566 + 0.25 * Math.Sqrt(WA) - 0.0166 * WA) * ((Math.Sqrt(A / 10.0)) / 10.0);

        double SI2 = (double)UVIndex;// UV index is already in hectoJoules/m^2 (0-16)

        double DA = (D >= (55 + Math.Sqrt(W))) ? D : 55.0 + Math.Sqrt(W);
        double H2 = (DA - 55.0 - Math.Sqrt(W)) * 2.0 / 30.0;

        double MFT = (T >= 65) ? 80.0 - WSP2 + SI2 + H2 - P2
        : T - WSP1 + SI2 + H2 - P2;
        return MFT;
        //print realfeel(5,1013,70,6,50,0) = 75.51231765840727
    }

        
        public static void Main(string[] args)
        {
            //Your code goes here
            Console.WriteLine(RealFeel(5,1013,70,50,6,0));
        }
    }
}

ScrewTurn Wiki version 3.0.4.560. Some of the icons created by FamFamFam.