Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Convert Daily Range Between Fahrenheit and Celsius

Discussion and questions about Cumulus weather station software version 1. This section is the main place to get help with Cumulus 1 software developed by Steve Loft that ceased development in November 2014.
Post Reply
User avatar
Buford T. Justice
Posts: 423
Joined: Fri 17 Aug 2012 9:21 pm
Weather Station: Ecowitt GW1002
Operating System: Windows 11 Pro
Location: USA

Convert Daily Range Between Fahrenheit and Celsius

Post by Buford T. Justice »

On my weather webpages, I use a small script to convert Fahrenheit to Celsius (or vice versa) so both temperatures are shown as Fahrenheit | Celsius. Using the example of the year's highest temperature, here is the HTML code I use to show both Fahrenheit and Celsius using Celsius data:

Code: Select all

<script>tempF1 = <#YearTempH> * 1.8 + 32;document.write(tempF1.toFixed(0));</script> °F | <#YearTempH> <#tempunit>
And here is the same thing using Fahrenheit data:

Code: Select all

<#YearTempH> <#tempunit> | <script>tempC1 = (<#YearTempH> - 32) / 1.8;document.write(tempC1.toFixed(1));</script>
The problem I running into using these codes deals with the daily ranges. I know they are determined by subtracting the low from the high temperature, but there must be a way to do it to where I can show the range as both Fahrenheit and Celsius. I cannot figure out a way to do this Might someone out there know?
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Convert Daily Range Between Fahrenheit and Celsius

Post by steve »

To convert a temperature difference between deg C and deg F, just multiply/divide by 1.8 as appropriate.
Steve
User avatar
Buford T. Justice
Posts: 423
Joined: Fri 17 Aug 2012 9:21 pm
Weather Station: Ecowitt GW1002
Operating System: Windows 11 Pro
Location: USA

Re: Convert Daily Range Between Fahrenheit and Celsius

Post by Buford T. Justice »

Oh of course! Every 1 °C = 1.8 °F. Ever have one of those days you can't remember simple things like that? LOL! Thanks.
Post Reply