[Weather] Fahrenheit to Celsius conversion - Rounds incorrectly - Printable Version +- Tordex Community (http://forum.tordex.com) +-- Forum: True Launch Bar plugins (http://forum.tordex.com/forum-4.html) +--- Forum: Plugins bugs (http://forum.tordex.com/forum-17.html) +--- Thread: [Weather] Fahrenheit to Celsius conversion - Rounds incorrectly (/thread-958.html) |
- Dracula - 10-24-2003 Has anyone noticed that the degrees Celsius are almost always 1 off compared to the real value? Weatherunderground provides temperatures in both Fahrenheit and Celsius, but for the plugin it seems impossible to simply read the Celsius value and display that (it will show an F). So instead, it grabs the Fahrenheit value and converts it to Celsius, but I noticed it does not round but simply cut off the fractions, which, of course, always results in too low values. The formula is: C = (F-32) * 5 / 9 (note: this is not an integer divide ) - shapeshifter - 10-24-2003 I've got a workaround that you can use until this is fixed. If your web page can display Celsius (Yahoo Weather will do this if you add "?force_units=1" to the end of the url), then you can tell Weather Monitor that you're using Farhrenheit, and simply change the graphic for °F. You can alter it to say °C, or simply ° (like I do on my setup to save valuable taskbar space). The file is usually called f.png in the skin's directory. If you're having trouble getting this to work, post your provider file, skin file, and url here and I'll help you out with some specifics. |