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

idea for new option

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
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

idea for new option

Post by n9mfk »

Hi Steve,
under internet settings files tab
could ad a check boxes for us an metric unit
so you have a choice if you wanted a file in metric were all tags wood use c mm knots an hpa
beau
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: idea for new option

Post by beteljuice »

But non-US wind speed could be Knots, Miles Per Hour, Metres Per Sec or Kilometres Per Hour.

I assume you want to be able to upload multiple different 'standards' pages ?
Image
......................Imagine, what you will KNOW tomorrow !
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: idea for new option

Post by n9mfk »

Hi beteljuice,

yes that is what i went to do
beau
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: idea for new option

Post by steve »

I think a solution like the beteljuice's multi-language pages would be good here :)
Steve
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: idea for new option

Post by gemini06720 »

steve wrote:I think a solution like the beteljuice's multi-language pages would be good here :)
Steve, indeed, but that involves a template written in PHP where any kind of format can be converted to any kind of format ... such as the following conversion functions:


// Convert temperatures [°C | °F]
function convFtoC($value) { return (($value-32) / 1.8); }
function convCtoF($value) { return (($value * 1.8)+32); }

// Convert pressure [ mb | hPa | kPa | inHg ] 0.0295333727
function convINHGtoHPA($value) { return ($value / 0.0295333727); }
function convHPAtoINHG($value) { return ($value * 0.0295333727); }
function convHPAtoKPA ($value) { return ($value * 0.1); }
function convHPAtoMB ($value) { return ($value); }

// Convert depths [mm | inch)
function convINtoMM($value) { return ($value / 0.0393700787); }
function convMMtoIN($value) { return ($value * 0.0393700787); }

// Convert depths [cm | inch]
function convINtoCM($value) { return ($value / 0.393700787); }
function convCMtoIN($value) { return ($value * 0.393700787); }

// Convert heights [ft | m]
function convFTtoM($value) { return ($value / 3.2808399); }
function convMtoFT($value) { return ($value * 3.2808399); }

// Convert wind speeds [ kts | kmh | mph | m/s | beaufort]
function convMPHtoKTS($value) { return ($value / 1.15077945); }
function convKTStoMPH($value) { return ($value * 1.15077945); }
function convKTStoKMH($value) { return ($value * 1.852 ); }
function convKTStoMPS($value) { return ($value * 0.51444444); }
function convKTStoBFT( $spd ) {
switch (true) {
case ($spd < 1): $val= 0; break; // Calm
case ($spd < 4): $val= 1; break; // Light air
case ($spd < 7): $val= 2; break; // Light breeze
case ($spd < 11): $val= 3; break; // Gentle breeze
case ($spd < 17): $val= 4; break; // Moderate breeze
case ($spd < 22): $val= 5; break; // Fresh breeze
case ($spd < 28): $val= 6; break; // Strong breeze
case ($spd < 34): $val= 7; break; // Near gale
case ($spd < 41): $val= 8; break; // Gale
case ($spd < 48): $val= 9; break; // Strong gale
case ($spd < 56): $val=10; break; // Storm
case ($spd < 64): $val=11; break; // Violent storm
case ($spd >=64): $val=12; break; // Hurricane
}
return $val;
}

So, something as the following could probably be used (I have not tried it yet but will later on):

...
<tr class="td_temperature_data">
<td>Temperature</td>
<td><?php convFtoC(<#temp>); ?>&nbsp;<#tempunit></td>
<td>Dew&nbsp;Point </td>
<td><?php convFtoC(<#dew>); ?>&nbsp;<#tempunit></td>
</tr>
...

In the above example, the PHP function 'convFtoC' would convert from F to C...

I will have to look further in my other software templates as there are functions that take any of the value to be converted and convert them to any other value, such as sending a C value to that function and it will return an F value...
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: idea for new option

Post by steve »

gemini06720 wrote:Steve, indeed, but that involves a template written in PHP where any kind of format can be converted to any kind of format ... such as the following conversion functions:
Ah, sorry, I thought they were HTML + Javascript.
Steve
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: idea for new option

Post by gemini06720 »

steve wrote:Ah, sorry, I thought they were HTML + Javascript.
Do not be sorry, 'beteljuice' templates are 'HTML + JavaScript'.

But I was offering another option of adding a bit of PHP coding into an HTML template... 8-)
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: idea for new option

Post by beteljuice »

The philosophy is much same ;)

Except of course your 'library' is incomplete.

It only has 'native' speed conversions for mph and knots.
It does NOT require kts => beaufort (Cumulus already provides F#)
There appears to be a function missing, to put the required decimal point values.

I've stopped 'messing' atm as the strings.ini file 'builds', but anyone using the beteljuice_ajax already has all possible units available to them. But I leave it to their imagination as how to present those values.
Image
......................Imagine, what you will KNOW tomorrow !
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: idea for new option

Post by gemini06720 »

Beau,

I have made some modifications to my Cumulus PHP Weather (main page only) where the temperature, the rain, the wind and the pressure are displayed in both formats (metric in large fonts and imperial in small fonts).

Here is the link: [link removed]

If that is what you want, the code I have used in my PHP template can surely be incorporated into the HTML template...

beteljuice,
...Except of course your 'library' is incomplete...
Indeed, I quickly copied and pasted some of the code I found in one of my older function template - the new and improved template contains more conversion code as well as precision (number of decimals) code... :)
Last edited by gemini06720 on Wed 22 May 2013 2:46 am, edited 1 time in total.
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: idea for new option

Post by n9mfk »

ray how do you do this
Moon Phase: Full Moon - 15 days, 3 hours, 26 minutes in its cycle - 100% illuminated
Thanks Beau
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: idea for new option

Post by gemini06720 »

n9mfk wrote:ray how do you do this
Moon Phase: Full Moon - 15 days, 3 hours, 26 minutes in its cycle - 100% illuminated
The moon phase thing...

It is a PHP function that has been added to my functions template - it continuously calculate the phase of the moon (in the case of my Cumulus PHP template, every time the page is refreshed - in the case of my Weather Display Ajax-PHP templates, every 5 seconds). I am not going to post the PHP code here as it is way too long (and wide). But, please be advised that I do not think I could easily add that code to the Cumulus HTML templates.

Beau, the way I display both the metric and imperial values (for the temperature, the rain, the wind and the pressure), is that what you were looking for or are you looking for a button that will change every values on the page from one system to another?
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: idea for new option

Post by n9mfk »

Ray is that done by cumulus ?
Last edited by n9mfk on Wed 02 Dec 2009 1:56 am, edited 1 time in total.
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: idea for new option

Post by gemini06720 »

Ray is that done by wd or cumulus ?
Beau, what?

The Web page you looked at (the one I posted the link to) is using data from Cumulus to produce it weather information.

The moon phase information is not relying on Cumulus at all (nor on the other 'I will not name' software :D ) - the moon phase is being continuously calculate using using PHP coding/function from properly entered latitude and longitude coordinates.

On my main weather pages (the one produced by the 'I will not name' software), the moon phase is also calculated by a JavaScript making the resulting display accurate to 5 seconds (when the JavaScript automatically updates the pages).
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: idea for new option

Post by n9mfk »

Hi i like to get more moon info on my site if you can help pm me thanks beau
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: idea for new option

Post by gemini06720 »

Beau, let me check how I can adapt the moon phase PHP code into the Cumulus HTML template. I should probably have something for you by mid afternoon (european time) or mid morning (north american time).

Beau, may I make a comment on the information about your weather station: It is now displaying "davis vp2 sereal datalogger"! Well, there is no such word as 'sereal' (certainly not in the Merriam-Webster Online dictionary)... ;)

And Davis Instruments do not nor have not (ever) produced a 'sereal' datalogger... :roll:

So, I guess, your weather station must be a Davis Vantage Pro2 with 'serial' datalogger... :mrgreen:
Post Reply