Hello, i have a problem with moon icon at index.php and wxastronomy.php.
I have 41% illuminate and the moon icon shows over 55%.
I have seen that to other pages.
Here is what i get into my local http://www.komokaweather.com/wxastronomy.php
Exactly the same problem.
When i go to cumulus web template the icon of cumulus is correct.At saratoga is wrong. It gives me the moon22.gif.
The same is at saratoga page http://saratoga-weather.org/index.php (moon icon on index)
And when i go to http://saratoga-weather.org/sunmoon.php goes to correct (correct moon icon)
Why happened that?
Thank you
Welcome to the Cumulus Support forum.
Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080
Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080
wxastronomy
Moderator: saratogaWX
- saratogaWX
- Posts: 1238
- Joined: Wed 06 May 2009 5:02 am
- Weather Station: Davis Vantage Pro Plus
- Operating System: Windows 10 Professional
- Location: Saratoga, CA, USA
- Contact:
Re: wxastronomy
It looks like there's been a small change at the USNO website such that queries based on lat/long of site do not return the line like
That line is missing in the the USNO return when a latitude/longitude query is used (and was present before).
The wxastronomy page then uses the built-in tables to approximate what the phase and illumination percent are, and that approximation may differ from what Cumulus (or some other weather software) return based on their built-in calculations.
Unfortunately, I didn't have a good calculation algorithm for moon phase/illumination in PHP that matched the output of the USNO (the 'Gold Standard') or even the built-in versions in some weather software (which did not always agree with each other or with the USNO).
So.. I am sorry that the illumination is a bit off now. I'll see what the USNO has to say about the website change.
I had used the combination of the approximation routines + the USNO query in order to support multiple weather software with astronomical data as some of the supported software with the templates lacked the built-in variables that were needed.
Best regards,
Ken
which is used to determine the percent illumination and phase name.Phase of the Moon on 30 June: waning crescent with 44% of the Moon's visible disk illuminated.
That line is missing in the the USNO return when a latitude/longitude query is used (and was present before).
The wxastronomy page then uses the built-in tables to approximate what the phase and illumination percent are, and that approximation may differ from what Cumulus (or some other weather software) return based on their built-in calculations.
Unfortunately, I didn't have a good calculation algorithm for moon phase/illumination in PHP that matched the output of the USNO (the 'Gold Standard') or even the built-in versions in some weather software (which did not always agree with each other or with the USNO).
So.. I am sorry that the illumination is a bit off now. I'll see what the USNO has to say about the website change.
I had used the combination of the approximation routines + the USNO query in order to support multiple weather software with astronomical data as some of the supported software with the templates lacked the built-in variables that were needed.
Best regards,
Ken
-
SergiosK
- Posts: 24
- Joined: Mon 15 Apr 2013 2:17 pm
- Weather Station: WH8681-Solar
- Operating System: Windows XP SP2
- Location: Greece
Re: wxastronomy
Your illuminitation algorithm is ok and works very well. The problem is the image that loads is wrong.
If you see here http://www.calculatorcat.com/moon_phases/phasenow.php the illuminitation is 38% the same as my page (your algorithm code) but the image that it loads is wrong.See the attach image that load in wxastronomy.(thats not 38%
its more than 50%)
If you see here http://www.calculatorcat.com/moon_phases/phasenow.php the illuminitation is 38% the same as my page (your algorithm code) but the image that it loads is wrong.See the attach image that load in wxastronomy.(thats not 38%
You do not have the required permissions to view the files attached to this post.
-
SergiosK
- Posts: 24
- Joined: Mon 15 Apr 2013 2:17 pm
- Weather Station: WH8681-Solar
- Operating System: Windows XP SP2
- Location: Greece
Re: wxastronomy
Hello again, i have found a code from you Ken and i fix the problem from now. The code is from the weather-watch.
If someone have the same problem with me the code is http://www.weather-watch.com/smf/index. ... .395;imode
Two files must edit, wxastronomy.php and ajax-dashboard.php
I will upload it to help.
Thanks again Ken.
If someone have the same problem with me the code is http://www.weather-watch.com/smf/index. ... .395;imode
Two files must edit, wxastronomy.php and ajax-dashboard.php
I will upload it to help.
Thanks again Ken.
You do not have the required permissions to view the files attached to this post.
- William Grimsley
- Posts: 833
- Joined: Thu 22 Sep 2011 5:22 pm
- Weather Station: Davis Vantage Vue
- Operating System: Windows 7 Home Premium 64-bit
- Location: Latitude: 50.70189285 Longitude: -3.30849957
- Contact:
Re: wxastronomy
Any news, Ken?
- saratogaWX
- Posts: 1238
- Joined: Wed 06 May 2009 5:02 am
- Weather Station: Davis Vantage Pro Plus
- Operating System: Windows 10 Professional
- Location: Saratoga, CA, USA
- Contact:
Re: wxastronomy
I've examined the mods, and I will not be incorporating them into the distribution. The main reasons are two-fold:
1) the moon icon is directly fetched from the USNO website at http://tycho.usno.navy.mil/cgi-bin/phase.gif - it is a very accurate
depiction of the current illumination phase of the moon, but I don't want to needlessly use the external website (USNO) for getting
a near-realtime picture when the 30 local images of the moon in ./ajax-images/ serve the purpose efficiently as static images.
2) the sun image on wxastronomy.php is likewise from NASA http://umbra.nascom.nasa.gov/images/lat ... mbnail.gif and again, I didn't want to default to using an external website image for the page when a static image would suffice. Also, the code checking for current weather station definition seemed to be missing and I needed that for support for all weather stations, not just Cumulus.
You are free to use the modified versions as you like -- I just won't be using those mods for the distribution based on the above reasons.
Best regards,
Ken
1) the moon icon is directly fetched from the USNO website at http://tycho.usno.navy.mil/cgi-bin/phase.gif - it is a very accurate
depiction of the current illumination phase of the moon, but I don't want to needlessly use the external website (USNO) for getting
a near-realtime picture when the 30 local images of the moon in ./ajax-images/ serve the purpose efficiently as static images.
2) the sun image on wxastronomy.php is likewise from NASA http://umbra.nascom.nasa.gov/images/lat ... mbnail.gif and again, I didn't want to default to using an external website image for the page when a static image would suffice. Also, the code checking for current weather station definition seemed to be missing and I needed that for support for all weather stations, not just Cumulus.
You are free to use the modified versions as you like -- I just won't be using those mods for the distribution based on the above reasons.
Best regards,
Ken
- William Grimsley
- Posts: 833
- Joined: Thu 22 Sep 2011 5:22 pm
- Weather Station: Davis Vantage Vue
- Operating System: Windows 7 Home Premium 64-bit
- Location: Latitude: 50.70189285 Longitude: -3.30849957
- Contact:
Re: wxastronomy
Hi Ken,
Ok, thanks for that. I will leave my moon icons and sun icons as they are for now until the next distribution is available.
Best regards,
William
Ok, thanks for that. I will leave my moon icons and sun icons as they are for now until the next distribution is available.
Best regards,
William