Revisited: Wind Chill with corrected formula
Revisited: Wind Chill with corrected formula
- Subject: Revisited: Wind Chill with corrected formula
- From: email@hidden
- Date: Fri, 1 Mar 2002 18:29:21 EST
tell application "Finder"
display dialog "Please enter the temp in degrees Fahrenheit: " buttons {"
Cancel", "OK"} default button 2 default answer "54"
set TheEntryTemp to the text returned of the result as string -- don't
force the coercion yet
display dialog "Please enter the wind speed in miles per hour: " buttons
{"Cancel", "OK"} default button 2 default answer "10"
set TheEntryMPH to the text returned of the result as string
-- insert a little error checking to make sure a number was entered for
each and in range here (-220 to +210 for temp, 0 to 240 for MPH )
set TheTemp to TheEntryTemp as integer
set TheSpeed to TheEntryMPH as integer
set TheWindChill to (35.74 + (0.6215 * TheTemp) - (35.75 *( TheSpeed ^
0.16) + (0.4275 * TheTemp (TheSpeed ^ 0.16))
display dialog "The temp including wind chill is: " & TheWindChill
buttons {"OK"} default button 1
end tell
I took Danny's formula at face value too, and just checked the NOAA website
and found it was V^.16, not V*.16. I also removed the continuation symbols,
so now it should work for him :)
Still missing a factor for humidity levels, though...
=-= Marc
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.