Author Topic: wxastronomy.php  (Read 2709 times)

0 Members and 1 Guest are viewing this topic.

Offline rjkantor

  • Member
  • *
  • Posts: 6
    • Parkland Weather
wxastronomy.php
« on: July 09, 2014, 11:42:12 AM »
How can I verify if the data being displayed is correct in the wxastronomy.php?

The moon and sun rise/sets don't seem right. 

Additionally, moonrise and moonset are showing wrong dates.
Moonrise: 11:14am EDT (08/31/2000)
Moonset: 10:45pm EDT (07/31/2000)

my url is www.parklandweather.com/wxastronomy.php

Any help is appreciated.

Rob

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: wxastronomy.php
« Reply #1 on: July 09, 2014, 12:38:44 PM »
Looking at your Settings.php, it shows
Code: [Select]
$SITE['latitude']        = '26.3098927';    //North=positive, South=negative decimal degrees
$SITE['longitude']        = '-80.2200394';  //East=positive, West=negative decimal degrees
and looking at testtags.php?sce=view shows
Code: [Select]
$stationaltitude =  '0'; // Station altitude, feet, as set in the units setup
// this under setup)
$stationlatitude =  '   :  :  '; // Latitude (from the sun moon rise/set setup)
$stationlongitude =  '    :  :  '; // Longtitude (from the sun moon rise/set setup)
so it appears that the latitude/longitude/altitude have not been setup in Weather-Display (which produces all the astronomical data displayed).

Fix those settings in Weather-Display, and the wxastronomy.php page should be corrected.

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 rjkantor

  • Member
  • *
  • Posts: 6
    • Parkland Weather
Re: wxastronomy.php
« Reply #2 on: July 10, 2014, 11:54:41 AM »
Ken -

Thank you for your review and pointing out my misconfiguration.  I have since updated WD and I am still seeing incorrect values.

Code: [Select]
$stationaltitude =  '0'; // Station altitude, feet, as set in the units setup
// this under setup)
$stationlatitude =  '026:18:36'; // Latitude (from the sun moon rise/set setup)
$stationlongitude =  '-080:13:12'; // Longtitude (from the sun moon rise/set setup)

Could you recommend next steps?

Thank you,
  Rob
« Last Edit: July 10, 2014, 11:56:58 AM by rjkantor »

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: wxastronomy.php
« Reply #3 on: July 10, 2014, 12:05:48 PM »
Ken -

Thank you for your review and pointing out my misconfiguration.  I have since updated WD and I am still seeing incorrect values.

Code: [Select]
$stationaltitude =  '0'; // Station altitude, feet, as set in the units setup
// this under setup)
$stationlatitude =  '026:18:36'; // Latitude (from the sun moon rise/set setup)
$stationlongitude =  '-080:13:12'; // Longtitude (from the sun moon rise/set setup)

Could you recommend next steps?

Thank you,
  Rob
Go to WD => control panel => Soloar/lunar&coordinate
Under longitude is says (- for east of GMT)
So this is exactly the other way around as in the other settings.
It should be in WD   80:13:12  so without the minus sign.

Do not change your Settings.php !
There is should be a negative and decimal as you did already.

Wim

Offline rjkantor

  • Member
  • *
  • Posts: 6
    • Parkland Weather
Re: wxastronomy.php
« Reply #4 on: July 28, 2014, 01:46:23 PM »
I have made the updates and my calendar for moonrise and moonset is showing 1969.


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: wxastronomy.php
« Reply #5 on: July 28, 2014, 02:32:00 PM »
The date for the Moon rise/set is not coming in an expected format.

Running wxastronomy.php?debug=y shows
Quote
<!-- adjustDate WDdate='28 July', WDdateUSA='1' new='2000-28-00' -->12/31/1969

The dates come from testtags.php like my sample
Code: [Select]
$moonrisedate =  '07/28/14'; // moon rise date
$moonrise =  '7:51 AM'; // moon rise time
$moonsetdate =  '07/27/14'; // moon set date
$moonset =  '8:32 PM'; // moon set time
Your testtags.php?sce=view has
Code: [Select]
$moonrisedate =  '28 July'; // moon rise date
$moonrise =  '8:07 am'; // moon rise time
$moonsetdate =  '27 July'; // moon set date
$moonset =  '8:27 pm'; // moon set time
where 'mm/dd/yyyy' is expected.

I'm running  Weather-Display (10.37R-(b91)).  The problem is likely in your version of  Weather-Display (10.37R-(b93)) and is something that Brian should fix -- the dates should appear as mm/dd/yyyy (or if selected as dd/mm/yyyy) per the Units setup.  The format 'dd Month' is anomalous.

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 i_fiorentino

  • Forecaster
  • *****
  • Posts: 562
  • Davis Vantage Vue, Boltek Stormtr., Mobotix M22-IT
    • Meteopistoia.it
Re: wxastronomy.php
« Reply #6 on: August 30, 2014, 11:04:26 AM »
Hi Ken,
i've noticed that some date about seasons are not correct on my wxastronomy page: www.meteocarmignano.it/wxastronomy.php
Please, could you give me an eye?
Is it a WD problem or somethig else?
Thanks in advance,


Alessandro

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: wxastronomy.php
« Reply #7 on: August 30, 2014, 11:22:33 AM »
Your display has:

Mar 20, 2014 @ 17:58 20/03/2014 16:58 UTC
Jun 21, 2012 @ 07:46 21/06/2012 05:46 UTC
Sep 22, 2012 @ 23:19 22/09/2012 21:19 UTC
Dec 21, 2012 @ 18:47 21/12/2012 17:47 UTC

On my WD 10.37R-(b81) system I get

03/20/2014 9:58am  20 March 2014 16:58 UTC
06/21/2014 3:52am  21 June 2014 10:52 UTC
09/22/2014 7:30pm  23 September 2014 02:30 UTC
12/21/2014 3:04pm  21 December 2014 23:04 UTC

Using the built-in template calculations (such as for WeatherLink template) I get

03/20/2014 9:57am  20 March 2014 16:57 GMT
06/21/2014 3:51am  21 June 2014 10:51 GMT
09/22/2014 7:29pm  23 September 2014 02:29 GMT
12/21/2014 3:03pm  21 December 2014 23:03 GMT

and those values are from the US Naval Observatory.

Looks like your maybe some other script is interfering with
the values in $marchequinox, $junesolstice, $sepequinox, $decsolstice from Weather-Display.

Your testtags.php?sce=view shows

$marchequinox =  '16:58 UTC 20 marzo 2014';   // March equinox date
$junesolstice =  '10:52 UTC 21 giugno 2014';   // June solstice date
$sepequinox =  '02:30 UTC 23 settembre 2014';   // September equinox date
$decsolstice =  '23:04 UTC 21 dicembre 2014';   // December solstice date

Your Settings.php has
Code: [Select]
$SITE['monthNames'] = array(  // for wxastronomy page .. replace with month names in your language
  'Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno',
  'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'
);
so the dates should be handled correctly.

So.. WD looks clean.  The issue is likely in some other part of the wxastronomy.php page where there is interference with the variable names... you're not running the 'stock' wxastronomy.php page .. you might try uploading the stock page as wxastronomy-orig.php and see if that has the same issue.  If not, then it's some other scripting on your current page.

Best regards,
Ken

« Last Edit: August 30, 2014, 11:39:23 AM by saratogaWX »
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 i_fiorentino

  • Forecaster
  • *****
  • Posts: 562
  • Davis Vantage Vue, Boltek Stormtr., Mobotix M22-IT
    • Meteopistoia.it
Re: wxastronomy.php
« Reply #8 on: August 30, 2014, 04:59:55 PM »
Thanks for your quick reply Ken :)

It seems the issue is in this part of code:

Code: [Select]
// if this happens then testtags.php has not been set up !!
   if ($dateMarEqu===false) $dateMarEqu = strtotime("11:44 UTC 20 March 2012");
   if ($dateJunSol===false) $dateJunSol = strtotime("05:46 UTC 21 June 2012");
   if ($dateSepEqu===false) $dateSepEqu = strtotime("21:19 UTC 22 September 2012");
   if ($dateDecSol===false) $dateDecSol = strtotime("17:47 UTC 21 December 2012");

I don't know why bashewa has created these functions.....for what?!?
I've also tried to commented the above code but without success :(
Thanks anyway Ken.
Regards,

Alessandro

Offline i_fiorentino

  • Forecaster
  • *****
  • Posts: 562
  • Davis Vantage Vue, Boltek Stormtr., Mobotix M22-IT
    • Meteopistoia.it
Re: wxastronomy.php
« Reply #9 on: August 31, 2014, 05:57:22 PM »
Ken,
could this be a possible cause?
http://www.meteocarmignano.it/wxastronomy.php?debug=y
Regards,

Alessandro

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: wxastronomy.php
« Reply #10 on: September 01, 2014, 12:32:29 PM »
Hi Alessandro,

I really have no idea.  Ranier wrote the script you're using.  I don't use it on my site, so I'm not familiar with it's structure or components to help debug it.  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

 

anything