- Sat Mar 26, 2022 6:18 am
#94091
rpiloverbd wrote:Till now, how accurate is the weather forecasting of InqWeather?
As of now, I have only found the chart below that I got from this web page
https://www.artofmanliness.com/lifestyle/gear/fair-or-foul-how-to-use-a-barometer/Below the chart is the coding logic the
InqWeather's changing.html page uses. I tried to translate that chart into this code.
InqWeather has no ability to get wind direction yet. It only uses two variables so far.
_P = the current pressure.delta = the 3-hour pressure change calculation.The problem is, I don't know anything about weather prediction and I don't know if the constants are bad or the if/then logic. Just don't know where to start. All I know, is the cheap electronic weather stations, using the same three pieces of information (temperature, humidity and pressure) can do a pretty-good job. I'm hoping someone can help or even point me to some good Internet pages for me to study.
VBR,
InqCode: Select allfunction predict(delta)
{
const MID_HIGH = 0.18;
const LOW_MID = 0.04;
const SLOW_MID = 0.01;
const DFLT_CONDITION = "Same ole - Same ole";
if (_P < 29.8)
{
if (delta < -MID_HIGH)
{
setBackground('Gale.jpg', 'orchid');
return "Severe northeast gales and heavy rain or snow, followed in winter by cold wave.";
}
else if (delta > MID_HIGH)
{
setBackground('ClearCold.jpg', 'navy');
return "Clearing and colder.";
}
else
return DFLT_CONDITION;
}
else if (_P < 30)
{
if (delta < -MID_HIGH)
{
setBackground('RainWind.jpg', 'grey');
return "Rain with high-wind, followed with 2 days by clearing, colder.";
}
else if (delta < -SLOW_MID)
{
setBackground('RainComing.jpg', 'teal');
return "Rain within 18 hours that will continue for a day or two.";
}
else if (delta < SLOW_MID)
return DFLT_CONDITION;
else // delta > SLOW_MID
{
setBackground('ClearCold.jpg', 'navy');
return "Clearing and colder within 12 hours.";
}
}
else if (_P < 30.2)
{
if (delta < -MID_HIGH)
{
setBackground('WarmRain.jpg', 'lime');
return "Warmer, and rain with 24 hours";
}
else if (delta < MID_HIGH)
{
setBackground('FareStable.jpg', 'white');
return "Fair, with slight changes in temperature for 1 to 2 days.";
}
else // delta > MID_HIGH
{
setBackground('FairRainComing.jpg', 'navy');
return "Fair, followed within 2 days by warmer and rain.";
}
}
else // _P >= 30.2
{
if (delta < -MID_HIGH)
{
setBackground('ClearCold.jpg', 'navy');
return "Cold and clear, quickly followed by warmer and rain.";
}
else
return "No early change.";
}
};