Sandaysoft

Support forum for Cumulus weather station software
It is currently Thu May 23, 2013 9:24 pm
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  [ 59 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: Consecutive Dry/Wet Days
PostPosted: Mon Aug 29, 2011 5:04 pm 
Offline
User avatar

Joined: Sat Jul 31, 2010 10:34 pm
Posts: 1039
Location: Anglesey, North Wales, UK
Weather Station: Fine Offset
Operating System: Windows XP
Yeah, i had the banner for a while, but i managed to stuff up some setting on my browser, so i could never see it myself, so i got rid of it

_________________
Rob,
Dyffryn History on WU Dyffryn on Twitter Dyffryn on WOW
Image


Top
 Profile  
 
 Post subject: Re: Consecutive Dry/Wet Days
PostPosted: Mon Aug 29, 2011 5:08 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2518
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
steve wrote:
I would suggest that anyone who doesn't like the way I've implemented this facility should write some javascript (or whatever) to modify the figures to suit themselves (e.g. based on whether it's rained so far today or not).
As I have already done on my 'now' page...

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: Consecutive Dry/Wet Days
PostPosted: Mon Aug 29, 2011 5:09 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
robynfali wrote:
Yeah, i had the banner for a while, but i managed to stuff up some setting on my browser, so i could never see it myself, so i got rid of it


I can't see why a browser would mess it up. Mine is visible in IE7 and Firefox. But you probably have your hands full with your current problem. Might be worth revisiting it when things calm down. It's always handy knowing how to tweak code on your own website. ;)

_________________
Cheers,
Ray, Cheshire.

Image


Top
 Profile  
 
 Post subject: Re: Consecutive Dry/Wet Days
PostPosted: Mon Aug 29, 2011 5:17 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17586
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
mcrossley wrote:
As I have already done on my 'now' page...

Yes, I thought you had, which is why I was confident in suggesting it :lol: Presumably your "Consecutive Rain Days (incl. today)" says "...(excl. today)" if it hasn't rained so far today?

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


Top
 Profile  
 
 Post subject: Re: Consecutive Dry/Wet Days
PostPosted: Mon Aug 29, 2011 5:20 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2518
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
doh! I hadn't thought of that...

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: Consecutive Dry/Wet Days
PostPosted: Mon Aug 29, 2011 5:20 pm 
Offline
User avatar

Joined: Tue Jul 29, 2008 8:00 pm
Posts: 2001
Location: Thornhill, Dumfries, UK
Weather Station: WH1081
Operating System: Mac OSx & Win 7
robynfali wrote:
sent email to your "findmyinbox" address is that ok?

yes, that is fine

I will have a look shortly. Just to be clear, this is not a php problem but JavaScript. I saw the rest of the topic going slightly off topic about php ;)

_________________
David
Contact Me


Top
 Profile  
 
 Post subject: Re: Consecutive Dry/Wet Days
PostPosted: Mon Aug 29, 2011 5:25 pm 
Offline
User avatar

Joined: Sat Jul 31, 2010 10:34 pm
Posts: 1039
Location: Anglesey, North Wales, UK
Weather Station: Fine Offset
Operating System: Windows XP
No problem mate

I thought to myself if it were a case of simply adding the new tags to the realtimeextras file, but it's probably not that simple!

_________________
Rob,
Dyffryn History on WU Dyffryn on Twitter Dyffryn on WOW
Image


Top
 Profile  
 
 Post subject: Re: Consecutive Dry/Wet Days
PostPosted: Mon Aug 29, 2011 5:44 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
daj wrote:
Just to be clear, this is not a php problem but JavaScript. I saw the rest of the topic going slightly off topic about php ;)

:lol: Shows how much I know!!

_________________
Cheers,
Ray, Cheshire.

Image


Top
 Profile  
 
 Post subject: Re: Consecutive Dry/Wet Days
PostPosted: Mon Aug 29, 2011 5:54 pm 
Offline

Joined: Sun May 10, 2009 8:52 pm
Posts: 502
Location: Springfield, IL
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Hi Steve,
I was thinking of the log file but I typed dayfile.txt
sorry Beau

steve wrote:
n9mfk wrote:
Hi Steve
why not put the value in dayfile so if it rained in the middle of the day
you wood not have to wait all day for Consecutive Dry days to rest
Beau

I don't understand how putting the values in dayfile.txt would make any difference, the counts are updated at the end of the day.

I would suggest that anyone who doesn't like the way I've implemented this facility should write some javascript (or whatever) to modify the figures to suit themselves (e.g. based on whether it's rained so far today or not).


Last edited by n9mfk on Mon Aug 29, 2011 9:08 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: Consecutive Dry/Wet Days
PostPosted: Mon Aug 29, 2011 6:32 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2518
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
steve wrote:
Presumably your "Consecutive Rain Days (incl. today)" says "...(excl. today)" if it hasn't rained so far today?
It does now :roll: Thanks Steve.

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: Consecutive Dry/Wet Days
PostPosted: Tue Aug 30, 2011 12:45 pm 
Offline
User avatar

Joined: Mon Dec 20, 2010 12:12 pm
Posts: 446
Location: Palmerston, NT, Australia
Weather Station: WS-1081 with rain gauge mod
Operating System: Windows 7 & 1.9.3 b1059
steve wrote:
n9mfk wrote:
Hi Steve
why not put the value in dayfile so if it rained in the middle of the day
you wood not have to wait all day for Consecutive Dry days to rest
Beau

I don't understand how putting the values in dayfile.txt would make any difference, the counts are updated at the end of the day.

I would suggest that anyone who doesn't like the way I've implemented this facility should write some javascript (or whatever) to modify the figures to suit themselves (e.g. based on whether it's rained so far today or not).

Hey Steve, I think it's great what you've done. Good work. I have taken you're advice though, and added "Consecutive dry days (excl. today)", "Consecutive Wet Days (excl. today)" and "Consecutive Wet Days (incl. today)" if it has rained during the day. I used Javascript to make this:
Code:
<tr class="td_rainfall_data">

<script type="text/javascript">
<!--
//Michael Holliday's code to display either consecutive rain or dry days, which ever is more than 0.
//If it has rained, the rain days WILL include today! :) 
var ConsecutiveRainDays=<#ConsecutiveRainDays>;
var ConsecutiveDryDays=<#ConsecutiveDryDays>;
var rained=<#rfall>;  //rain fall for today
if (rained>0){
ConsecutiveRainDays=<#ConsecutiveRainDays>+1;
document.write("<td>Consecutive Rain Days \(incl. today\)</td><td>" + ConsecutiveRainDays + "</td>");
}else if (ConsecutiveRainDays>0){
document.write("<td>Consecutive Rain Days \(excl. today\)</td><td><#ConsecutiveRainDays></td>");
}else {
document.write("<td>Consecutive Dry Days \(excl. today\)</td><td><#ConsecutiveDryDays></td>");
}
//-->
</script>
</td>


Can't wait to see if you implement a webtag to display rainfall duration. :clap:
EDIT - PS. Love the records editors, soooooo much easier :!: And if I use it with a rainfall duration webtag, my data has me aiming for 55hrs + ;) . Thanks in advance Steve.

_________________
Michael, Palmerston, NT Australia www.Palmerston-WeatherImageNo image? I'm offline!
ImageImageImage


Top
 Profile  
 
 Post subject: Re: Consecutive Dry/Wet Days
PostPosted: Tue Aug 30, 2011 1:01 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2518
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
Michael

Just a slight adjustment, you should change:

if (rained>0){
and
}else if (ConsecutiveRainDays>0){

to...

//use default 0.2mm, or 0.01in threshold
if (rained>=0.2){
and
}else if (ConsecutiveRainDays>=0.2){

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: Consecutive Dry/Wet Days
PostPosted: Tue Aug 30, 2011 1:19 pm 
Offline
User avatar

Joined: Mon Dec 20, 2010 12:12 pm
Posts: 446
Location: Palmerston, NT, Australia
Weather Station: WS-1081 with rain gauge mod
Operating System: Windows 7 & 1.9.3 b1059
mcrossley wrote:
Michael

Just a slight adjustment, you should change:

if (rained>0){
and
}else if (ConsecutiveRainDays>0){

to...

//use default 0.2mm, or 0.01in threshold
if (rained>=0.2){
and
}else if (ConsecutiveRainDays>=0.2){

Changing the rain value will do little for me as after 0 the next value it displays is .2mm anyway. As for ConsecutiveRainDays, how do you get 0.2 of a day? :lol: After 0 it will read 1 (and will skip .2, .3, etc.). It will get the same end result, so I see no point changing it. ConsecutiveRainDays will not advance unless it breaks the rain threshold which is preset at 0.2mm.
But thanks for the concern anyway.

_________________
Michael, Palmerston, NT Australia www.Palmerston-WeatherImageNo image? I'm offline!
ImageImageImage


Top
 Profile  
 
 Post subject: Re: Consecutive Dry/Wet Days
PostPosted: Tue Aug 30, 2011 1:34 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2518
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
Opps, a slip up there, you're right the second bit is nonsense :oops:
Still to make your code generic across all users you should change the initial compare from zero to whatever threshold value you are using - my station counts in 0.1mm 'steps'.

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: Consecutive Dry/Wet Days
PostPosted: Tue Aug 30, 2011 2:08 pm 
Offline

Joined: Mon Aug 10, 2009 10:16 pm
Posts: 1772
Location: World...
Weather Station: No weather station
Operating System: No operating system
Mark, it really does not matter how much rain is needed to move the tipping spoon (be it 0.01 in or 0.1 mm or 0.2 mm) - as soon as Cumulus sense that it is raining, the '<#rfall>' value (which Michael is using) will change from '0.0' to something else - thus the value will not be zero anymore - thus the 'rained' variable will not be zero anymore... :mrgreen:


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

All times are UTC


Who is online

Users browsing this forum: Pgarcimore and 1 guest


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