Watchmaker Wiki

The ultimate watch maker for Android Wear!

User Tools

Site Tools


tips:windchill

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tips:windchill [2015/01/26 21:08] – [Explanation] jt3tips:windchill [2015/01/26 22:49] – [Examples] jt3
Line 2: Line 2:
  
 ===== Examples ===== ===== Examples =====
 +
 +====Fahrenheit====
 +   Text:  ({wt}<80 and {wt} or {wh}<40 and {wt} or math.floor(-42.379+(2.04901523*{wt})+(10.14333127*{wh})+(-0.22475541*{wt}*{wh})+(-.00683783*({wt}^2))+(-.05481717*({wh}^2))+(.00122874*{wh}*({wt}^2))+(.00085282*{wt}*({wh}^2))+(-.00000199*({wt}^2)*({wh}^2))+.5)) .. "ᵒF"
 +
  
  
Line 15: Line 19:
 This is done by first calculating wind chill using the current temperature ({wt}) and the wind speed in MPH ({wws}).  Please note that while WatchMaker says it's outputting wind speed in Meters per Second (mps), it's **always** shown in MPH.  Thus, we must also convert that to Km/h in the Celsius formula. This is done by first calculating wind chill using the current temperature ({wt}) and the wind speed in MPH ({wws}).  Please note that while WatchMaker says it's outputting wind speed in Meters per Second (mps), it's **always** shown in MPH.  Thus, we must also convert that to Km/h in the Celsius formula.
  
-Once we've done the calculation, we need to concatenate the "ᵒF" or "ᵒC" to the formula.  To do this, we need to fool LUA into thinking that we're dealing exclusively with strings (for some stupid reason... LUA isn't the smartest of languages sometimes).  We do this by encapsulating the entire formula within a single set of parentheses.  So, yes, the first and last parentheses **are** required.  Then, we simply add the concatenation symbol ".." followed by the desired display ("ᵒF", "ᵒC", or even just "ᵒ").  Just be sure to include a single space on either side of the concatenation symbol.+Once we've done the calculation, we need to concatenate the "ᵒF" or "ᵒC" to the formula.  To do this, we need to fool LUA into thinking that we're dealing exclusively with strings (for some stupid reason... LUA isn't the smartest of languages sometimes).  We do this by encapsulating the entire formula within a single set of parentheses.  So, yes, the first and last parentheses **are** required.  Then, we simply add the concatenation symbol ".." followed by the desired display in quotes ("ᵒF", "ᵒC", or even just "ᵒ").  Just be sure to include a single space on either side of the concatenation symbol.
tips/windchill.txt · Last modified: 2015/01/27 20:59 by jt3