Sandaysoft

Support forum for Cumulus weather station software
It is currently Wed May 22, 2013 9:21 am
Please click here before posting. Help me to help you!
Useful Links: Cumulus FAQ • Enhancement requests • Wiki (documentation)
Please put your approximate location into your profile
Add your web site to the Cumulus user map
Vantage Pro2 users with firmware 3.00 should upgrade to fw 3.12 and Cumulus 1.9.4

All times are UTC




Post new topic Reply to topic  [ 69 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: Build 1033 comments
PostPosted: Wed Apr 11, 2012 2:49 pm 
Offline

Joined: Sun Dec 13, 2009 1:21 pm
Posts: 867
Location: Apeldoorn The Netherlands
Weather Station: WH1080 / WS 4000
Operating System: Windows 7 / Ubuntu
beteljuice wrote:
Is there a "Highest monthly windrun" (like the rain) ?

Also you have daily 'range' (low / high) for temp, is there similar for pressure ?


Yes webtags in the helpfile like edited <#ByMonthWindRunH> <#ByMonthWindRunHT> also for daily tempranges, not for pressure ranges

_________________
Ron

Image

Apeldoorn, The Netherlands


Last edited by nitrx on Wed Apr 11, 2012 3:06 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Wed Apr 11, 2012 2:57 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17567
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
beteljuice wrote:
Is there a "Highest monthly windrun" (like the rain) ?

Also you have daily 'range' (low / high) for temp, is there similar for pressure ?

No - I haven't introduced any new statistics, just added month-by-month versions of the existing ones; neither of those two currently exist.

But clearly, adding new useful statistics is always on the to-do list. Another one that occurred to me recently (and has been mentioned by others) is "driest month".

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Wed Apr 11, 2012 2:58 pm 
Offline
User avatar

Joined: Tue Feb 21, 2012 5:48 pm
Posts: 46
Location: Warwick
Weather Station: Davis Vantage Vue
Operating System: Windows 7
Great enhancement - Cheers Johnny :D

_________________
Image
http://warwick-weather.com


Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Wed Apr 11, 2012 7:54 pm 
Online

Joined: Mon Nov 28, 2011 2:13 am
Posts: 349
Location: Brisbane, Australia
Weather Station: La Crosse WS 2306
Operating System: Windows 7 64 Bit
Good effort on this Steve, very good feature. :D
I wish I have been using Cumulus for longer, but this is something I been wanting to do with my manual data from the last 3 years, once I catch up on all my old manual recordings.

_________________
Regards, Matt of Brisbane, Australia
Web Site: http://www.localweatherdata.0glo.com


Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Thu Apr 12, 2012 4:30 pm 
Offline

Joined: Wed May 06, 2009 6:29 pm
Posts: 1708
Location: Cheadle Hulme, Cheshire, England
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Hi Steve,

Before I go ahead and make all those format changes I wanted to check something with you.

The image below is how I would like to display the Monthly Records. I want to split the date into multiple parts and place them in different cells. Will this be possible with the data in an array?
Attachment:
CumulusMonthRecord.jpg


You do not have the required permissions to view the files attached to this post.

_________________
Cheers,
Ray, Cheshire.

Image


Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Thu Apr 12, 2012 4:49 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17567
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
Quote:
I want to split the date into multiple parts and place them in different cells.

What you could do is create three arrays for the components of the timestamps:

var hightempY = new Array("<#ByMonthTempHT mon=1 format=yyyy>", ...
var hightempD = new Array("<#ByMonthTempHT mon=1 format="'Day 'd">", ...
var hightempT = new Array("<#ByMonthTempHT mon=1 format=hh:nn>", ...

and then when you create your cells, give them IDs of (say) TempHY, TempHD, TempHT, and change the code in the changeData function to change all three fields, i.e

document.getElementById('TempHY').innerHTML = hightempY[month];
document.getElementById('TempHD').innerHTML = hightempD[month];
document.getElementById('TempHT').innerHTML = hightempT[month];

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Thu Apr 12, 2012 5:01 pm 
Offline

Joined: Wed May 06, 2009 6:29 pm
Posts: 1708
Location: Cheadle Hulme, Cheshire, England
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Thanks Steve. I'm pleased it's possible. I shall need to read your suggestion a few times so it sinks in. :lol:

_________________
Cheers,
Ray, Cheshire.

Image


Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Thu Apr 12, 2012 6:42 pm 
Offline

Joined: Wed May 06, 2009 6:29 pm
Posts: 1708
Location: Cheadle Hulme, Cheshire, England
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Steve,

I'm having problems with the day number element. I've used your code as a guide but there is a syntax error in this I can't resolve.

var hightempD = new Array("<#ByMonthTempHT mon=1 format="'Day 'd">","<#ByMonthTempHT mon=2 format="'Day 'd">","<#ByMonthTempHT mon=3 format="'Day 'd">","<#ByMonthTempHT mon=4 format="'Day 'd">","<#ByMonthTempHT mon=5 format="'Day 'd">","<#ByMonthTempHT mon=6 format="'Day 'd">","<#ByMonthTempHT mon=7 format="'Day 'd">","<#ByMonthTempHT mon=8 format="'Day 'd">","<#ByMonthTempHT mon=9 format="'Day 'd">","<#ByMonthTempHT mon=10 format="'Day 'd">","<#ByMonthTempHT mon=11 format="'Day 'd">","<#ByMonthTempHT mon=12 format="'Day 'd">");

Can you spot the error?

_________________
Cheers,
Ray, Cheshire.

Image


Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Thu Apr 12, 2012 6:46 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17567
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
RayProudfoot wrote:
new Array("<#ByMonthTempHT mon=1 format="'Day 'd">",

Yes; the first double quote for the format parameter will be taken as the termination of the array item. I don't know enough about using quotes in javascript to know how you get around that, particularly as single quotes are also used inside the format parameters. In some languages, if you want a double quote inside a string, you put two double quotes, e.g:

new Array("<#ByMonthTempHT mon=1 format=""'Day 'd"">"

but I don't know if that works in javascript. It may be that you have to 'escape' the quote character somehow, maybe with a backslash...

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Thu Apr 12, 2012 6:53 pm 
Offline

Joined: Wed May 06, 2009 6:29 pm
Posts: 1708
Location: Cheadle Hulme, Cheshire, England
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
This doesn't cause a syntax error.

var hightempD = new Array("<#ByMonthTempHT mon=1 format='Day 'd>","<#ByMonthTempHT mon=2 format='Day 'd>","<#ByMonthTempHT mon=3 format='Day 'd>","<#ByMonthTempHT mon=4 format='Day 'd>","<#ByMonthTempHT mon=5 format='Day 'd>","<#ByMonthTempHT mon=6 format='Day 'd>","<#ByMonthTempHT mon=7 format='Day 'd>","<#ByMonthTempHT mon=8 format='Day 'd>","<#ByMonthTempHT mon=9 format='Day 'd>","<#ByMonthTempHT mon=10 format='Day 'd>","<#ByMonthTempHT mon=11 format='Day 'd>","<#ByMonthTempHT mon=12 format='Day 'd>")

I removed the double quotes after format= and between d and >. Not sure if that will work but at least it doesn't cause an error.

I'll battle on. Thanks for your answer. Quotes and where to put them is always a bit of a nightmare isn't it? :?

_________________
Cheers,
Ray, Cheshire.

Image


Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Thu Apr 12, 2012 7:46 pm 
Offline

Joined: Wed May 06, 2009 6:29 pm
Posts: 1708
Location: Cheadle Hulme, Cheshire, England
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
I've made progress. I decided to dump the Day = bit as double-quotes didn't work either. Instead I've named the columns so it's clear what is what.
Attachment:
NewMonthlyRecord.jpg

I've only changed Highest Temperature at the moment just so I can see if it works.

I have two queries.

1) If I use the format in the data array to define how I want each element of the date to appear is it necessary to use format again in each td element? I can't think why it would so I haven't included it.

2) When I first load the page I'm still seeing the old date and time format but after hitting a month button it then shows each element of the date and time correctly in its own cell. Why do I still see the original date/time on first load?

Other than that it looks like I have the basics working.


You do not have the required permissions to view the files attached to this post.

_________________
Cheers,
Ray, Cheshire.

Image


Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Thu Apr 12, 2012 7:48 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2512
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
Here is a slight variation on Steve's default page. I've just amended the date/time format slightly, and made it so that the current month is always displayed on entering the page.

You can view my data here: http://weather.wilmslowastro.com/monthlyrecord.htm

Note the navigation menu is wrong for my site (it is the default) and I had to zip the file below as you cannot attach html or txt files.

EDIT: File removed see later posts for an updated version

_________________
Mark
Wilmslow Astro Weather


Last edited by mcrossley on Thu Apr 12, 2012 9:14 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Thu Apr 12, 2012 7:53 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17567
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
RayProudfoot wrote:
1) If I use the format in the data array to define how I want each element of the date to appear is it necessary to use format again in each td element? I can't think why it would so I haven't included it.

2) When I first load the page I'm still seeing the old date and time format but after hitting a month button it then shows each element of the date and time correctly in its own cell. Why do I still see the original date/time on first load?

You've answered your own question. The reason you have to do (1) is because of (2). Unless you add some javascript that triggers when the page is loaded. I'm not completely sure how you do that, possibly by changing the <body> tag to:

<body onload="changeData(0);">

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Thu Apr 12, 2012 7:54 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17567
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
mcrossley wrote:
and made it so that the current month is always displayed on entering the page.
I was going to suggest that in my previous post, but my javascript knowledge is already being stretched :lol:

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: Build 1033 comments
PostPosted: Thu Apr 12, 2012 8:03 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17567
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
Mark, why does:

"<#ByMonthDailyRainHT mon=1 format="'day' dd, yyyy 'at' hh:mm">"

work in your code but apparently didn't for Ray? Why doesn't the double quote starting the format terminate the array item?

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 69 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group