Welcome Guest, you are in: Login

wiki.crowe.co.nz

RSS RSS

Navigation





Search the wiki
»

PoweredBy

A formula for current conditions

RSS
Modified on Wednesday, 16 November 2011 06:37 by Administrator Categorized as Uncategorized
These are the variables used followed by the PHP code:
Rain rate is $zxv124
Cloud base is $zxv025
Temperature is $zxv007
Humidity is $zxv005
Dew Point is $zxv022
Barometer is $zxv023
Density Altitude is $zxv026
Active Weather is $smartfcsta
Sky Conditions is $smartfcstc
Wind Speed id $zxv002

The units are:

Wind Speed: MPH Rain rate: inches per hour Cloud base: feet Temperature: degrees Fahrenheit Humidity: percent Dew Point: degrees Fahrenheit Barometer: inches Density Altitude: feet

0.05 && $zxv002 > 5) { $smartfcsta = "Thunderstorm"; } elseif ($zxv124 > 0.40) { $smartfcsta = "Heavy Rain"; } elseif ($zxv124 > 0.12) { $smartfcsta = "Rain"; } elseif ($zxv124 > 0.02) { $smartfcsta = "Light Rain"; } elseif ($zxv124 > 0.00) { $smartfcsta = "Very Light Rain"; } else { $smartfcsta = "None Reported"; } if ($zxv005 > 96 && $zxv025 < 100) { $smartfcstc = "Fog"; } elseif ($zxv124 > 0.02 && $zxv007 < 35) { $smartfcstc = "Winter Mix"; } elseif ($zxv124 > 0.00) { $smartfcstc = "Cloudy"; } elseif ($zxv025 < 1450 && $zxv023 < 30.00 && $zxv005 > 86) { $smartfcstc = "Cloudy"; } elseif ($zxv022 > 62 && $zxv026 > 3500) { $smartfcstc = "Cloudy"; } elseif ($zxv005 > 69 && $zxv023 < 29.95 && $zxv026 > 1000) { $smartfcstc = "Cloudy"; } elseif ($zxv025 < 1500 && $zxv023 < 29.95 && $zxv005 > 75) { $smartfcstc = "Cloudy"; } elseif ($zxv026 < -200 && $zxv023 < 29.95 && $zxv005 > 70 && $zxv025 < 1000) { $smartfcstc = "Cloudy"; } elseif ($zxv026 < 0 && $zxv005 > 82 && $zxv025 < 500) { $smartfcstc = "Cloudy"; } elseif ($zxv026 < -500 && $zxv023 < 29.99) { $smartfcstc = "Cloudy"; } elseif ($zxv026 < 500 && $zxv005 > 90) { $smartfcstc = "Cloudy"; } elseif ($zxv026 < 200 && $zxv023 < 30.00 && $zxv005 > 50 && $zxv025 < 2000) { $smartfcstc = "Cloudy"; } elseif ($zxv026 < 1800 && $zxv023 < 29.95 && $zxv005 > 60) { $smartfcstc = "Cloudy"; } elseif ($zxv025 < 2000 && $zxv005 > 75) { $smartfcstc = "Cloudy"; } elseif ($zxv022 > 62 && $zxv023 < 30.00 && $zxv007 > 72) { $smartfcstc = "Partly Cloudy"; } elseif ($zxv022 > 62 && $zxv026 > 2550) { $smartfcstc = "Partly Cloudy"; } elseif ($zxv022 > 62 && $zxv025 < 1600 && $zxv007 > 72) { $smartfcstc = "Partly Cloudy"; } elseif ($zxv022 > 70 && $zxv025 < 4000) { $smartfcstc = "Partly Cloudy"; } elseif ($zxv026 < -200 && $zxv023 < 29.99) { $smartfcstc = "Partly Cloudy"; } elseif ($zxv026 < -1000 && $zxv005 > 62 && $zxv005 < 70) { $smartfcstc = "Partly Cloudy"; } elseif ($zxv026 < 1000 && $zxv005 > 75 && $zxv023 < 29.95) { $smartfcstc = "Partly Cloudy"; } elseif ($zxv025 < 3000 && $zxv005 > 60 && $zxv023 < 29.95) { $smartfcstc = "Partly Cloudy"; } elseif ($zxv022 > 55 && $zxv005 > 50 && $zxv026 < 2000 && $zxv007 > 75) { $smartfcstc = "Partly Cloudy"; } elseif ($zxv025 > 2000) { $smartfcstc = "Clear"; } else { $smartfcstc = "Clear"; }

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