'Free code, use at your own risk. No warrentee 'Not fully tested or proven to be accurate. 'Provided by Inlet.net comments@inlet.net 'How to Estimate Denisty Altitude and Estimate visability ' This should work as ASP or Visual Basic code intCurrentTemp = 44.5 intDewPoint = 41.2 intBarometer = 30.602 'The following calculates Density Altitude intRankin = intCurrentTemp + 459.69 intTemp = (17.326 * intBarometer) / intRankin intDensityAltitudeFeet = Int (145366 * (1 - (intTemp ^ 0.235))) intDensityAltitudeMeters = Int ((145366 * (1 - (intTemp ^ 0.235))) * .3048) 'The following estimates the Cumulus Base Cloud 'I added 1000 feet to the Estimate. This made the result closer to true area reports. intCumulusCloudBaseEstimate = (Int (222 * (intCurrentTemp - IntDewPoint))) + 1000 'This section estimates what the current sky conditions are. It is usually correct. intSkyConditions = intCurrentTemp - intDewPoint If intCurrentTemp < 32 then StrIceConditions = "Ice Warning" If intSkyConditions < 5 and intSkyConditions > 3 then strSkyConditions = "Fog Warning" elseif intSkyConditions <= 3 then strSkyConditions = "Freezing Fog" else strSkyConditions = "Clear" End if Else StrIceConditions = "" If intSkyConditions < 5 and intSkyConditions > 3 then strSkyConditions = "Fog Warning" elseif intSkyConditions <= 3 then strSkyConditions = "Fog" else strSkyConditions = "Clear" End if End if