From WikiPedia
http://en.wikipedia.org/wiki/Fog#cite_note-4 and other online sites
Fog can be considered a cloud at ground level. The processes forming it, however, are usually different from those that form clouds. Like clouds, fog is made up of condensed water droplets which is the result of the air being cooled to the point (actually, the dewpoint) where it can no longer hold all of the water vapor it contains.
Fog forms when the difference between temperature and dew point is generally less than 2.5 °C or 4 F.
The difference between Fog & Mist is that Fog reduces visibility to less than 1 km (5/8 statute mile) whereas Mist reduces visibilty to 1km or more.
How do we determine visibility?
I guess based on this as a starting point we could have:
function bool IsFoggy(double TemperatureInF, double DewPointInF)
{
if (TemperatureInF > DewPointInF)
if (TemperatureInF - DewPointInF <= 4)
return true;
else if (DewPointInF - TemperatureInF <= 4)
return true;
else
return false;
}
Is this just too simple or is it about right? should we also be looking at humidity?
Also from WikiPedia
For aviation purposes in the UK, a visibility of less than 2 km but greater than 999 m is considered to be mist if the relative humidity is 95% or greater - below 95% haze is reported
Does humidity also affect fog? I found a reference to humidity being 100% for fog?
chris