Sandaysoft

Support forum for Cumulus weather station software
It is currently Thu Jun 20, 2013 5:11 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  [ 66 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Mon Aug 22, 2011 6:57 pm 
Offline

Joined: Fri Jul 15, 2011 5:15 pm
Posts: 38
Location: Ohio
Weather Station: Davis Vantage Pro 2
Operating System: Windows Vista
Thank you Ray;
I am using godaddy, and e-rice for my website. Not sure what I have as far as PHP, or Java. I do know that I need/want help in making my weather site look good.

On a side note, my home page I have a link to radar, and forecast, (At least they were links) For some reason the forecast link quit working with a mouse click, but still works on my droid phone touch screen. I just added my web address to my sig, but just in case it doen't work, here it is. http://www.sixmileturn-weather.com/

gemini06720 wrote:
Mike, my version of the 'Annual Weather Data Summary' page, although based on David's PHP code, is now a 'highly modified' version of the original PHP script - I did not and will not adapted (update) David's JavaScript, not only because I am not as familiar with JavaScript as I am with PHP, but because I do not believe that JavaScript (code running on a user's computer) should be used for a script that should be run directly from the host server through the use of a PHP scripts... :roll:

With that said/written, I would be interested in helping you getting the data summary page installed and running ... as long as your host server makes PHP available - I could not check as you do not provide a link to your web pages in your profile... :evil:

_________________
http://www.sixmileturn-weather.com/


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Tue Aug 23, 2011 12:07 am 
Offline
User avatar

Joined: Fri Apr 01, 2011 8:14 pm
Posts: 18
Location: Smethport, Pa.
Weather Station: Davis VP2 w/FARS
Operating System: Toshiba Laptop Windows 7 x64
hdmax wrote:
On a side note, my home page I have a link to radar, and forecast, (At least they were links) For some reason the forecast link quit working with a mouse click, but still works on my droid phone touch screen. I just added my web address to my sig, but just in case it doen't work, here it is. http://www.sixmileturn-weather.com/

Looks like your call to *style="#temp* is broken at the end of the image, after the closing href tag...happens to me too many times...
Code:
<p style="#temp {
   float: left;
   width: 100px;
}"><a href="http://www.wunderground.com/radar/mixedcomposite.asp?region=b4&size=2x&type=loop">
              <img src="http://maps.wunderground.com/data/640x480/mw_sf_anim.gif" alt="" border="0"/></a></p#temp {
   float: right;
   width: 400px;
}

A fix would look like
Code:
</a></p>
<p style="#temp {
   float: right;
   width: 400px;
}


Your link should work fine after fixing that. If not, we'll try again...

Brad

_________________
Davis VP2/FARS
Cumulus 1.9.3(1054)


McKean Weather
'cause not everyone lives at the airport

Wunderground Webcam URL
Image


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Tue Aug 23, 2011 10:25 am 
Offline

Joined: Mon Aug 10, 2009 10:16 pm
Posts: 1698
Location: World...
Weather Station: No weather station
Operating System: No operating system
hdmax wrote:
I am using godaddy, and e-rice for my website. Not sure what I have as far as PHP, or Java.
Mike, I am attaching (download) a small PHP script that you can upload to your host server and test through your browser - the script will let you know if, indeed, PHP is available on your host server.

hdmax wrote:
I do know that I need/want help in making my weather site look good.
Then, you could start by correcting some the coding errors you have made to your main 'index.htm' page... 8-)

Looking at the source code for your main page, I see this:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head><link href="weatherstyle.css" rel="stylesheet" type="text/css" />

<style type="text/css" media="all">
body   { color: blue;
     font-family: "arial","times new roman","courier";
         }
h1   { color: crimson;
          font-weight: bold; }
</style>


<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" />
<meta name="description" content="My backyard weather data" />
<meta name="keywords" content="Cumulus, My backyard weather data, weather, data, weather station" />
<title>My backyard weather</title>
<link href="weatherstyle.css" rel="stylesheet" type="text/css" />
</head>
The code at the top of the page should be rewritten to look like this:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" />
<meta name="description" content="My backyard weather data" />
<meta name="keywords" content="Cumulus, My backyard weather data, weather, data, weather station" />
<title>My backyard weather</title>
<link href="weatherstyle.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body  {
  color: blue;
  font-family: arial, times new roman , courier";
}
h1  {
  color: crimson;
  font-weight: bold;
}
</style>
</head>
And that is just the start... About a dozen more lines need some corrections, such as the one proposed by Brad... :twisted:

Mike you have to understand that cleanly written code (be it HTML, PHP, JavaScript, C++, Perl, etc.) make it easier to follow and understand what the code does - it also allows for the code to run better.

I am quite picky about the way code is written - this date back to my years in college and an excellent (and very demanding) teacher I had then... :)

It might be time to start a new message thread where code modifications and proper code writing is being demonstrated (taught) and practiced... :geek:


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Sun Sep 11, 2011 9:02 am 
Offline

Joined: Tue Jun 24, 2008 9:43 pm
Posts: 188
Location: Maghull, nr Liverpool, UK
Weather Station: MyDEL WX2008 Mk2 Fine Offset
Operating System: XP and W7
Hi David. sorry mate, been away.

I would have liked both max/min pressure and actually managed it using another helper but thanks anyway.

One thing i am having problems with is the auto upload of dayfile.txt.

i cant get it to work. Am home now so will have another go.

thanks for all your input.

_________________
Phil - G0DOR


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Thu Oct 27, 2011 2:26 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2596
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
An old thread but I just played around with this again. I've added the following to David's original PHP script...

  • Added low/high value highlighting like lots of other people - mine is transparent
  • Added row/column hover highlighting to both cells on the min/max table, in the original version it only works on the low value
  • Added extra data sets, and in particular handled Dominant Wind Direction in a summary manner rather than raw numbers

http://weather.wilmslowastro.com/datasummary.php

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Thu Oct 27, 2011 3:14 pm 
Offline

Joined: Wed Feb 25, 2009 12:01 am
Posts: 356
Location: Woodland Park, Colorado USA
Weather Station: Zephyr PWS-1000TB(Fine/Offset)
Operating System: Windows 7 64bit
mcrossley wrote:
An old thread but I just played around with this again. I've added the following to David's original PHP script...

.....
[*]Added extra data sets, and in particular handled Dominant Wind Direction in a summary manner rather than raw numbers[/list]

http://weather.wilmslowastro.com/datasummary.php


Looks nice. How did you convert the dayfile text from #s?

_________________
Bob

http://woodlandweather.org/


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Thu Oct 27, 2011 3:35 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2596
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
Hi Bob
My PHP code is below (bear in mind I'm no PHP expert!)...

Code:
//add winddir to $label_items
...
//define a global array of compass headings and arrow characters
$compass_headings = array('N&nbsp;↓','NE&nbsp;↙','E&nbsp;←','SE&nbsp;↖','S&nbsp;↑','SW&nbsp;↗','W&nbsp;→','NW&nbsp;↘','N&nbsp;↓');

//define a function to decode a 0-360 value to a heading
function getHeading($deg) {
   global $compass_headings;
   return $compass_headings[round($deg / 45)];;
}

//in the main 'drawCalendar()' for loop substitute the heading string for the value
...
            if (array_key_exists($id, $data)) {
               $data_arr = explode('|', $data[$id]);
...
               if ($whatdata == 'winddir' && intval($data_arr[0]) > 0) {
                  $data_arr[0] = getHeading(intval($data_arr[0]));
               }
...

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Thu Oct 27, 2011 4:02 pm 
Offline

Joined: Wed Feb 25, 2009 12:01 am
Posts: 356
Location: Woodland Park, Colorado USA
Weather Station: Zephyr PWS-1000TB(Fine/Offset)
Operating System: Windows 7 64bit
Thanks, but.... I use htm. don't know if it would work?

_________________
Bob

http://woodlandweather.org/


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Thu Oct 27, 2011 4:07 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2596
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
I haven't looked at the JavaScript version, but the PHP code will only need minor tweaking to convert to JavaScript

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Thu Oct 27, 2011 4:32 pm 
Offline

Joined: Wed Feb 25, 2009 12:01 am
Posts: 356
Location: Woodland Park, Colorado USA
Weather Station: Zephyr PWS-1000TB(Fine/Offset)
Operating System: Windows 7 64bit
mcrossley wrote:
I haven't looked at the JavaScript version, but the PHP code will only need minor tweaking to convert to JavaScript


Maybe, but still a bit beyond my capabilities I'm afraid... ;)

_________________
Bob

http://woodlandweather.org/


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Thu Oct 27, 2011 11:04 pm 
Offline
User avatar

Joined: Wed Mar 03, 2010 10:20 am
Posts: 300
Location: Brisbane, Australia
Weather Station: Vantage Pro2 w/ daytime FARS
Operating System: Windows Vista SP2
It would be even easier if today's dominant/average wind direction in the dayfile.txt file was included as a compass point as well as degrees. I'll submit an enhancement request (providing Steve can get the Rover back from Glasgow in one piece).

_________________
Dan

http://www.brisbaneliveweather.com




A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Fri Oct 28, 2011 12:40 am 
Offline

Joined: Wed Feb 25, 2009 12:01 am
Posts: 356
Location: Woodland Park, Colorado USA
Weather Station: Zephyr PWS-1000TB(Fine/Offset)
Operating System: Windows 7 64bit
I've played with my javascript and can get the page to display, but there is no data:
http://woodlandweather.org/datasummary.html

I am using dayfile col #39 for the dominate wind direction but it does not display any data. When I insert another data field # in the javascript it will show that data. Is field #39 the correct one for dominate wind bearing?

Thanks...

_________________
Bob

http://woodlandweather.org/


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Fri Oct 28, 2011 1:29 am 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1888
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
Quote:
... It would be even easier if today's dominant/average wind direction in the dayfile.txt file was included as a compass point as well as degrees...
Non-English users would still need a routine to translate.
Quote:
I am using dayfile col #39 for the dominate wind direction but it does not display any data. When I insert another data field # in the javascript it will show that data. Is field #39 the correct one for dominate wind bearing?
I'm not sure, but I think it's complaining because at the start of the year that (and several other) values did not exist.

_________________
Image
......................Imagine, what you will KNOW tomorrow !


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Fri Oct 28, 2011 6:59 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17835
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
beteljuice wrote:
Quote:
... It would be even easier if today's dominant/average wind direction in the dayfile.txt file was included as a compass point as well as degrees...
Non-English users would still need a routine to translate.

It's a possibility for a future version of Cumulus. It could perhaps use strings.ini so that the translated equivalent was always logged.

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


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Fri Oct 28, 2011 11:06 am 
Offline

Joined: Mon Aug 10, 2009 10:16 pm
Posts: 1698
Location: World...
Weather Station: No weather station
Operating System: No operating system
mcrossley wrote:
Added low/high value highlighting like lots of other people - mine is transparent
Mark, a while back, I also added transparency to the hi/lo temperature colours but used a different coding:
Code:
  background-color: #000000;
  background: transparent;
Produces similar results but more inline with the W3C standards...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 66 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