Author Topic: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL  (Read 46938 times)

0 Members and 1 Guest are viewing this topic.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL
« Reply #50 on: November 22, 2011, 04:50:44 PM »
Glad you found the 'secret sauce' for specifying a Nexstorm directory :)

I've done another update so the wxmetar.php page can show 2-up or 3-up metar displays based on narrow/wide aspect ratio for the screen.  include-metar-display.php and get-metar-conditions-inc.php updated.

Updates at http://saratoga-weather.org/wxtemplates/updates.php for 22-Nov-2011

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL
« Reply #51 on: November 22, 2011, 05:30:03 PM »
Got 'em. Will post shortly.

Thanks, Ken.
John
W7JKG

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL
« Reply #52 on: November 22, 2011, 07:48:15 PM »
The METAR looks much better in the double-up display.

Thanks!
John
W7JKG

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL
« Reply #53 on: November 25, 2011, 01:46:50 PM »
Hi Ken,

This might be an over-the-edge request, but 'one does not know if one does not ask'.

Given that lat/lon is available in both the metar reports and clientraw, would it be possible to add a 'Distance from Station' line on the wxmetar.php page? I realize this would most likely be a big job, but I think it would be a very informative addition to the page.

Thanks.
John
W7JKG

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL
« Reply #54 on: November 25, 2011, 04:37:02 PM »
Hi John,
Definitely no harm in asking :)

The METAR data from the NWS server doesn't include lat/long of the METAR reporting station, but
http://weather.rap.ucar.edu/surface/stations.txt does contain the world-wide METAR station list with lat/long.

I'm working up a script to allow you to easily find the lat/long for your stations, and then you can manually include the lats/longs in the wxmetar.php $MetarList = array(); then (as you say) use the $SITE lat/long specs to show the distance to each station.

Stay tuned...

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL
« Reply #55 on: November 25, 2011, 05:40:39 PM »
Hi Ken,

That's great! However, as usual, I'm now confused.

Here is my KPHX.TXT metar...

Code: [Select]
Phoenix, Phoenix Sky Harbor International Airport, AZ, United States (KPHX) 33-26-03N 112-03-04W 336M
Nov 25, 2011 - 04:51 PM EST / 2011.11.25 2151 UTC
Wind: from the W (260 degrees) at 9 MPH (8 KT):0
Visibility: 10 mile(s):0
Sky conditions: mostly clear
Temperature: 70.0 F (21.1 C)
Dew Point: 43.0 F (6.1 C)
Relative Humidity: 37%
Pressure (altimeter): 30.04 in. Hg (1017 hPa)
ob: KPHX 252151Z 26008KT 10SM FEW050 21/06 A3004 RMK AO2 SLP162 T02110061
cycle: 22

The first line contains the lat/lon numbers. What am I (also as usual) missing?

Ahh - possibly you just use the data from the ob: line? If so, would there be a way to get the lat/lon from the first line?

Thanks.
« Last Edit: November 25, 2011, 06:02:05 PM by jgillett »
John
W7JKG

Offline Weather Display

  • Forecaster
  • *****
  • Posts: 2611
    • West Coast Road Weather Data
Re: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL
« Reply #56 on: November 25, 2011, 06:05:51 PM »
that must be a new thing they have added....the lat/long....I do not recall seeing that before..
Brian
info@weather-display.com
http://www.weather-display.com

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL
« Reply #57 on: November 26, 2011, 12:00:27 AM »
It's in the XML version of the METAR report page .. it's not in the 'raw' metars we use Brian.

Example: NOAA XML-formatted metar http://www.weather.gov/xml/current_obs/display.php?stid=KSJC which returns (for USA METARs only)
Code: [Select]
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet href="latest_ob.xsl" type="text/xsl"?>
<?xml-stylesheet href='latest_ob.xsl' type='text/xsl'?>
<!--
this comment is here to foil Internet Explorer and Firefox attempt to treat
this as a channel and thereby ignore our stylesheet
this comment is here to foil Internet Explorer and Firefox attempt to treat
this as a channel and thereby ignore our stylesheet
this comment is here to foil Internet Explorer and Firefox attempt to treat
this as a channel and thereby ignore our stylesheet
-->
<current_observation version="1.0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.weather.gov/view/current_observation.xsd">
<credit>NOAA's National Weather Service</credit>
<credit_URL>http://weather.gov/</credit_URL>
<image>
<url>http://weather.gov/images/xml_logo.gif</url>
<title>NOAA's National Weather Service</title>

<link>http://weather.gov</link>
</image>
<suggested_pickup>15 minutes after the hour</suggested_pickup>
<suggested_pickup_period>60</suggested_pickup_period>
<location>San Jose International Airport, CA</location>
<station_id>KSJC</station_id>

<latitude>37.37</latitude>
<longitude>-121.93</longitude>
<observation_time>Last Updated on Nov 25 2011, 7:53 pm PST</observation_time>
        <observation_time_rfc822>Fri, 25 Nov 2011 19:53:00 -0800</observation_time_rfc822>
<weather>Partly Cloudy</weather>
<temperature_string>52.0 F (11.1 C)</temperature_string>

<temp_f>52.0</temp_f>
<temp_c>11.1</temp_c>
<relative_humidity>89</relative_humidity>
<wind_string>South at 3.5 MPH (3 KT)</wind_string>
<wind_dir>South</wind_dir>
<wind_degrees>200</wind_degrees>

<wind_mph>3.5</wind_mph>
<wind_gust_mph>0.0</wind_gust_mph>
<wind_kt>3</wind_kt>
<wind_gust_kt>0</wind_gust_kt>
<pressure_string>1027.8 mb</pressure_string>
<pressure_mb>1027.8</pressure_mb>

<pressure_in>30.36</pressure_in>
<dewpoint_string>48.9 F (9.4 C)</dewpoint_string>
<dewpoint_f>48.9</dewpoint_f>
<dewpoint_c>9.4</dewpoint_c>
<visibility_mi>10.00</visibility_mi>
  <icon_url_base>http://weather.gov/images/fcicons/</icon_url_base>

<two_day_history_url>http://www.weather.gov/data/obhistory/KSJC.html</two_day_history_url>
<icon_url_name>nsct.jpg</icon_url_name>
<ob_url>http://www.nws.noaa.gov/data/METAR/KSJC.1.txt</ob_url>
<disclaimer_url>http://weather.gov/disclaimer.html</disclaimer_url>
<copyright_url>http://weather.gov/disclaimer.html</copyright_url>
<privacy_policy_url>http://weather.gov/notice.html</privacy_policy_url>

</current_observation>

Example: 'classic' raw METAR http://weather.noaa.gov/pub/data/observations/metar/stations/KSJC.TXT which returns (for METARs world-wide)
Code: [Select]
2011/11/26 03:53
KSJC 260353Z 20003KT 10SM FEW016 SCT050 11/09 A3036 RMK AO2 SLP278 T01110094

I've found the new XML-formatted metar feed to be somewhat erratic and USA-only, while the classic raw metar feed is solid and world-wide in scope.

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL
« Reply #58 on: November 28, 2011, 12:58:10 AM »
Hi Ken,

This might be an over-the-edge request, but 'one does not know if one does not ask'.

Given that lat/lon is available in both the metar reports and clientraw, would it be possible to add a 'Distance from Station' line on the wxmetar.php page? I realize this would most likely be a big job, but I think it would be a very informative addition to the page.

Thanks.

Well, it turned out to be a bigger deal than I thought, but the release today does support display of bearing and distance on the display.

I've also done a utility find-metar page on my site that you can input your latitude/longitude, max distance to use and the page will display the nearest active metars to your location and generate the copy code for the $SITE['conditionsMETAR'] and for the wxmetar.php page $MetarList array.

Update your V3 site with wxmetar.php and include-metar-display from the updates page.

Best regards,
Ken

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL
« Reply #59 on: November 28, 2011, 01:58:07 AM »
Had a feeling it would be on the tough side.

That find-metar page is great! Given it's just a tad late here, I'll get this posted first thing in the morning.

Thanks, Ken!   =D&gt;
John
W7JKG

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL
« Reply #60 on: November 28, 2011, 02:06:49 AM »
Glad you like the new find-metar utility .. that was the tough one!

It does a daily cache of the official metar listing at http://weather.rap.ucar.edu/surface/stations.txt (which has the lat/long/elevation for each metar ICAO), and then prunes it to the ICAO that weather.noaa.gov has available (and updated conditions within the last 7 days).  That trims the base 8K+ metars listed to a bit over 5000 with 'fresh' data available.
Hopefully, that will prevent folks from using a 'dead' or 'non existent' METAR ICAO in their specs for the wxmetar.php page.

Let me know how it goes...
Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline ed2kayak

  • Ed
  • Forecaster
  • *****
  • Posts: 613
  • Davis Vantage Pro2 w/12 hr FARS, solar/uv
    • Cumberland Valley Weather
Re: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL
« Reply #61 on: November 28, 2011, 05:49:51 AM »
Thanks a bunch, cool feature. Will add


Ed
Ed
CoCoRaHS PA-CD-6,  Weather Underground KPAMECHA7, CWOP DW5425

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL
« Reply #62 on: November 28, 2011, 11:29:11 AM »
Got it posted - http://tiggrweather.net/wxmetar.php  - really nifty. Thanks again, Ken!

Added a line at the top of the page as an explanation of what folks are looking at. Also changed the order of the display based on near to far distance from my station. Seems to make more sense (to me, anyway  :roll: ).

In my Settings-weather.php there was no $SITE['conditionsMETAR'] entry, so I just added it right after $SITE['showSnowTemp']. There's no version number or date, either, so I'm not sure where I'm at with that file.

And finally, just to improve my sadly lacking PHP knowledge - the $MetarList array, as generated, has a ',' after the last entry. I thought that was a no-no (definitely NOT a complaint - just trying to learn).

Thanks.
John
W7JKG

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL
« Reply #63 on: November 28, 2011, 01:49:56 PM »
Nice, John!  I like the explanation at the page top.  I can update the $MetarList output to be sorted with ascending distance .. right now it's just in Metar ICAO order.

Since you're running Weather-Display, you don't really need the $SITE['conditionsMETAR'] entry as the WD-plugin doesn't use it at all.. Weather-Display itself is doing your Metar fetch, but there's no harm in leaving it there; it would be used only if your switch from Weather-Display to a different weather software package (which I DO NOT recommend, as WD has the best tags set available).

Yes, the trailing comma is a bit of bad form, but not a PHP error.. it was more trouble to eliminate it, than to leave it (lazy, I guess).  It does not matter in PHP to have the trailing ',' in the array, but in JavaScript, it is a no-no and will cast a JavaScript error.

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL
« Reply #64 on: November 28, 2011, 02:20:47 PM »
Updated the find-metar utility page to sort the $MetarList entries in ascending distance order .. thanks for the suggestion, John :)

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL
« Reply #65 on: November 28, 2011, 04:23:41 PM »
Nice, John!  I like the explanation at the page top.

Thank you.

Since you're running Weather-Display, you don't really need the $SITE['conditionsMETAR'] entry as the WD-plugin doesn't use it at all.. Weather-Display itself is doing your Metar fetch, but there's no harm in leaving it there; it would be used only if your switch from Weather-Display to a different weather software package (which I DO NOT recommend, as WD has the best tags set available).

Don't plan on switching, assuming I can keep the station.

Yes, the trailing comma is a bit of bad form, but not a PHP error.. it was more trouble to eliminate it, than to leave it (lazy, I guess).  It does not matter in PHP to have the trailing ',' in the array, but in JavaScript, it is a no-no and will cast a JavaScript error.

Got it. Thanks for the explanation.
John
W7JKG

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL
« Reply #66 on: November 28, 2011, 04:27:53 PM »
Updated the find-metar utility page to sort the $MetarList entries in ascending distance order .. thanks for the suggestion, John :)

Started looking for the sort code for that in the local files. Finally remembered those arrays came from your page. Duh...

Maybe one of these days I'll catch up.

Thanks much for the update! It's Mah-v-lous!  :grin:
John
W7JKG

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL
« Reply #67 on: November 29, 2011, 12:45:52 PM »
Updates available at http://saratoga-weather.org/wxtemplates/updates.php (29-Nov-2011)

For the metar processing, the wind 'varies' fix is done, and a cloud-details area added.

For metar, ajax-dashboard, ajax-gizmo, and ajaxWDwx.js, improved translation capability added for conditions/cloud displays.

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline n3ouc

  • Contributor
  • ***
  • Posts: 123
    • Air Products Campus Weather
Re: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL
« Reply #68 on: November 29, 2011, 03:14:21 PM »
Hey Ken,
I have tried the find-metar utility on your website multiple times this afternoon and I do not see any output of listed files. Is it down for some reason?

Thanks,
Mike
Mike Stanton
Air Products Campus Weather

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL
« Reply #69 on: November 29, 2011, 04:01:53 PM »
Sorry about that... one of the source websites for the data was not responding.  I've got it working again :)
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline kered

  • Senior Member
  • **
  • Posts: 64
    • Laracha-Meteo Multilingual Website with PHP & AJAX
Re: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL
« Reply #70 on: December 01, 2011, 04:07:39 PM »
Hi Ken, nice edition to your scripts, is this one USA only or will it work for all.
Thanks

 ](*,) found the answer, should have looked first
tks
« Last Edit: December 01, 2011, 04:22:14 PM by kered »
.     Updated every 15 minutes                                            Updated every 5 seconds


If its not broke don't try to fix it.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL
« Reply #71 on: December 01, 2011, 04:23:20 PM »
The metar list is for world-wide available METARs, so should work for everyone.  The list only has METARs that are actively reporting (and so available on the NOAA site for processing).

BTW.. I switched to having cron update the two lists (UCAR list of worldwide METAR ICAO, NOAA list of available METAR reports) 4 times a day, so we shouldn't have any big delay working the find-metar query page.. all the data files are 'current' and locally cached on my webserver .. I'm even monitoring it on my status page  :)

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline jay_hoehn

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 656
    • Jay's Woodcrafts
Re: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL
« Reply #72 on: December 02, 2011, 06:35:37 PM »
Ken,  I have two issues.

1. The text on the current conditions always says cool.  See screen capture 1.  What have I missed?

2. The moonset says 12:50am (30-Nov-1999) on the sun and moon page. Is this the default if the moon does not set on a particular day?  See screenshot 2.

Thanks,  Jay

http://www.jayswoodfurniture.com/wx/index.php
Davis Vantage Pro2 Plus
VVP
Weather Display


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL
« Reply #73 on: December 02, 2011, 07:17:19 PM »
Hi Jay,

Since you're using VWS, the source for the data (as mapped by VWS-defs.php) is
Code: [Select]
$heatcolourword = $WX['vst137'];
which your current VWStags.php?sce=dump shows:
Code: [Select]
$WX['vst137'] = 'Cool'; // Comfort Level

So your dashboard says 'Cool' due to what VWS says in ^vst137^ .. I think there's a setup screen for that in VWS so you can specify the conditions/words to use. 

The Moon info is a bit more complicated.  In wxastronomy.php, for all WX software except Weather-Display, the get-USNO-soonmoon.php script is invoked, and it's return values (From the US Naval Observatory) are placed in variables with code
Code: [Select]
   if(isset($USNOdata['moonrise']))                {$moonrise =    $USNOdata['moonrise']; } 
   if(isset($USNOdata['moonrisedate']))            {$moonrisedate= $USNOdata['moonrisedate']; } 
   if(isset($USNOdata['moonset']))                 {$moonset =     $USNOdata['moonset']; } 
   if(isset($USNOdata['moonsetdate']))             {$moonsetdate = $USNOdata['moonsetdate']; } 
 } 

Running your wxastronomy.php?debug=yes shows
Quote
<!-- get-USNO-sunmoon.php - Version 1.01 - 23-Mar-2011 -->
<!-- using Cached version of ./cache/USNO-moondata.txt -->
<!-- find pre slice

    [1] =>
        Begin civil twilight      06:35                 
        Sunrise                   07:02                 
        Sun transit               12:05                 
        Sunset                    17:09                 
        End civil twilight        17:36                 

                         <strong>MOON</strong>
        Moonset                   23:55 on preceding day
        Moonrise                  12:30                 
        Moon transit              18:37                 
        Moonset                   00:50 on following day

 
)

<!-- moonset missing.. using moonsetnext -->
<!-- USNOdata
Array
(
    [beginciviltwilight] => 06:35
    [beginciviltwilightdate] => 12/02/2011
    [sunrise] => 07:02
    [sunrisedate] => 12/02/2011
    [suntransit] => 12:05
    [suntransitdate] => 12/02/2011
    [sunset] => 17:09
    [sunsetdate] => 12/02/2011
    [endciviltwilight] => 17:36
    [endciviltwilightdate] => 12/02/2011
    [moonsetprior] => 23:55
    [moonsetpriordate] => 12/01/2011
    [moonrise] => 12:30
    [moonrisedate] => 12/02/2011
    [moontransit] => 18:37
    [moontransitdate] => 12/02/2011
    [moonsetnext] => 00:50
    [moonsetnextdate] => 12/03/2011
    [hoursofpossibledaylight] => 10:07
    [moonset] => 00:50
    [moonsetdate] => 00:50
)
 -->
then the wxastronomy.php code
Code: [Select]
  <tr>
      <td width="50%" align="center"><?php langtrans('Sunrise'); ?>: <?php print adjustWDtime($sunrise); ?><br />
  <?php langtrans('Sunset'); ?>: <?php print adjustWDtime($sunset); ?><br />
  <?php langtrans('Daylight'); ?>: <?php print $hoursofpossibledaylight?></td>
      <td width="50%" align="center">
  <?php langtrans('Moonrise'); ?>: <?php print adjustWDtime($moonrise);
  if(isset($moonrisedate)) { print ' (' adjustWDdate($moonrisedate) . ')';} ?>
<br />
  <?php langtrans('Moonset'); ?>: <?php print adjustWDtime($moonset);
  if(isset($moonsetdate)) { print ' (' adjustWDdate($moonsetdate) . ')';} ?>
<br />
  <?php echo langtrans($moonphasename); ?><br/>
  <?php print $moonphase?> <?php langtrans('Illuminated'); ?></td>
  </tr>
is used to print the data to the page.

the get-USNO-sunmoon.php has a bug in it (V1.01) where the date is not copied correctly.  The current code is
Code: [Select]
if( !isset($Data['moonset']) and isset($Data['moonsetnext']) ) {
$Debug .= "<!-- moonset missing.. using moonsetnext -->\n";
$Data['moonset'] = $Data['moonsetnext'];
$Data['moonsetdate'] = $Data['moonsetnext'];
}
and should be
Code: [Select]
if( !isset($Data['moonset']) and isset($Data['moonsetnext']) ) {
$Debug .= "<!-- moonset missing.. using moonsetnext -->\n";
$Data['moonset'] = $Data['moonsetnext'];
$Data['moonsetdate'] = $Data['moonsetnextdate'];
}

I'll do an update for that error.. sorry.

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline jay_hoehn

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 656
    • Jay's Woodcrafts
Re: Released: PHP/AJAX multilingual website templates for Cumulus, VWS, WD, WL
« Reply #74 on: December 02, 2011, 10:05:52 PM »
Thanks, Ken, 

I checked in the documentation for VWS and I can't see where the comfort index can be changed.  I guess I will have to wait until Tuesday morning when we will be getting down to the low single digits to see if it changes like it should.

I fixed the get-USNO-sunmoon.php file and it worked great.  Thanks for all the work you do on this project.

Jay
Davis Vantage Pro2 Plus
VVP
Weather Display