Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Help with math in MM Basic
Author | Message | ||||
MaxH Newbie Joined: 10/04/2012 Location: United StatesPosts: 2 |
I have been trying to figure out how to enter this formula in MM Basic. It calculates Wind Chill from the temp(F) and wind speed(mph). I have been trying for a couple of days now but my numbers are way off. The part I don't understand is the fractional exponent. Any help would be appreciated. Max |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
In MMBasic the exponentiation operator is the ^ character. So the formula could be written as: INPUT "Temperature? ", T
INPUT "Wind Speed ? ", V PRINT CINT(35.74 + 0.6215 * T - 35.75 * V^0.16 + 0.4275 * T * V^0.16) Interesting chart, although it took me some time to get my head around degrees F and MPH... that was so many years ago. Once I did that I was reassured to see that there is no danger of frostbite in Perth, Western Australia !! Geoff Geoff Graham - http://geoffg.net |
||||
MaxH Newbie Joined: 10/04/2012 Location: United StatesPosts: 2 |
Thanks, as you could tell I've forgotten what little I knew about math and basic. I've tested it and it works as it should. I have a Davis Vantage Pro2 weather station that outputs all the direct reading but doesn't calculate things like Wind Chill, Heat Index or Dew Point. Hopefully I'll be able to send the data to a SitePlayer Web server for viewing via the internet. Thanks again, Max |
||||
Print this page |