Hi guy's
I have my own web site working
http://www.ellcheepoweather.webspace.vi ... /index.htm
It is still under development for the text and I intent to change some of the gauges to a different colour and so on.
But I am having issues with the Moon Phases as mine is staying on Waxing Gibbious.
I want to change it so that it follows the phases of the moon correctly. As you can see I have a new picture but I must be missing in my head or somewhere else the code that allows the moon to change phases.
Anyone got any idea's to help me out on this.
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
How does Cumulus work out the Phases of the Moon
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: How does Cumulus work out the Phases of the Moon
The Cumulus descriptions are based on the percentage age of the moon. It obtains the age from a third-party component, and it uses the following code to determine the phase (positive percentages are waxing and negative percentages are waning):
The current percentage is 57%, so the phase is "Waxing Gibbous". If you disagree with the phases that Cumulus generates, you can use the <#MoonPercent> web tag and generate your own. If you disagree with the percentage figure that Cumulus provides, you'll have to generate your own somehow.
Code: Select all
if (MoonPercent > 1) and (MoonPercent < 49) then
MoonPhaseString := WaxingCrescent
else if (MoonPercent >= 49) and (MoonPercent <= 51) then
MoonPhaseString := FirstQuarter
else if (MoonPercent > 51) and (MoonPercent < 99) then
MoonPhaseString := WaxingGibbous
else if (MoonPercent >= 99) or (MoonPercent <= -99) then
MoonPhaseString := Fullmoon
else if (MoonPercent < -51) and (MoonPercent > -99) then
MoonPhaseString := WaningGibbous
else if (MoonPercent <= -49) and (MoonPercent >= -51) then
MoonPhaseString := LastQuarter
else if (MoonPercent > -49) and (MoonPercent < -1) then
MoonPhaseString := WaningCrescent
else
MoonPhaseString := Newmoon;Steve
-
ellcheepo
- Posts: 2
- Joined: Wed 11 Jul 2012 8:28 am
- Weather Station: Offset HR81
- Operating System: Windows 7
- Location: Wakefield
Re: How does Cumulus work out the Phases of the Moon
Steve,
Thanks for that.
The issue I have is that the phase the moon is in, is not showing on my website in terms of say a half moon, the image is still showing the whole moon. I was wondering that because I have changed the moon image to a .gif and use one I wanted it has stopped the shading from working. I was wondering what part of your web app controlled that so I could check what I have missed.
Regards
Philip
Thanks for that.
The issue I have is that the phase the moon is in, is not showing on my website in terms of say a half moon, the image is still showing the whole moon. I was wondering that because I have changed the moon image to a .gif and use one I wanted it has stopped the shading from working. I was wondering what part of your web app controlled that so I could check what I have missed.
Regards
Philip
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: How does Cumulus work out the Phases of the Moon
The moon image that Cumulus makes available is just a 'grab' of the image on the main Cumulus screen. That image is generated by a third-party component.
If you want to use a different image, then you will also have to devise a way of displaying the correct image according to the current moon phase, e.g. by using a set of images and selecting the correct one based on the <#MoonPercent> web tag. Some people have done this; you might be able to find something with a search on the forum, or perhaps someone who has done it will reply with some pointers.
If you want to use a different image, then you will also have to devise a way of displaying the correct image according to the current moon phase, e.g. by using a set of images and selecting the correct one based on the <#MoonPercent> web tag. Some people have done this; you might be able to find something with a search on the forum, or perhaps someone who has done it will reply with some pointers.
Steve