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
Moon Phases
Moderator: mcrossley
-
Big Daddy
- Posts: 270
- Joined: Tue 10 Sep 2013 8:40 pm
- Weather Station: Ecowitt GW1000 / various sensors
- Operating System: Raspbian 12 Bookworm (X64)
- Location: Freiston, Lincolnshire, UK
- Contact:
Moon Phases
I see on the "issues list" that moon phases was due to be fixed in 3024 but its not crossed off yet so I assume it has not yet been resolved.
My moon phase was showing First Quarter from around 32% to 64% and then changed to Waxing Gibbous. It is not an issue if it is not fixed yet but just wondered if I should be looking for the problem elsewhere.
Andy
My moon phase was showing First Quarter from around 32% to 64% and then changed to Waxing Gibbous. It is not an issue if it is not fixed yet but just wondered if I should be looking for the problem elsewhere.
Andy
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Moon Phases
I corrected the reported problem in 3024. I cross problems off when I have confirmation that the problem that was reported has actually been fixed by the change that I did. The reported problem was that MX was giving 'waxing' when it should have been giving 'waning'. I believe that I have fixed that problem.
MX gives 'first quarter' when the moon age is between 5.53699 and 9.22831 days and 'waxing gibbous' from 9.22831 to 12.91963. It should change to 'full moon' from 12.91963 to 20.30228. It uses library routines to determine the age; I can't remember where I got those cutoff values for the phases.
It's currently giving 91% illuminated and 'waxing gibbous', which I believe are (approximately) correct. If there is a problem somewhere it's difficult to investigate unless I am told about it at the time of the problem. Do you believe there is currently a problem?
Edit: It looks to me like the figures I've quoted above for 'first quarter' roughly correspond to 32% to 64% illuminated, so it's not clear to me where you think the problem is. Are you just disagreeing with the cutoff values that I've used? I'm not an astronomer so I have to rely on library routines and information I find on the internet. There are a number of places on the internet where the cutoff values I've used are quoted - https://www.google.co.uk/search?q=9.22831+moon. It looks like it simply divides the lunar month into 8 equal phases. Is that not a reasonable approach?
MX gives 'first quarter' when the moon age is between 5.53699 and 9.22831 days and 'waxing gibbous' from 9.22831 to 12.91963. It should change to 'full moon' from 12.91963 to 20.30228. It uses library routines to determine the age; I can't remember where I got those cutoff values for the phases.
It's currently giving 91% illuminated and 'waxing gibbous', which I believe are (approximately) correct. If there is a problem somewhere it's difficult to investigate unless I am told about it at the time of the problem. Do you believe there is currently a problem?
Edit: It looks to me like the figures I've quoted above for 'first quarter' roughly correspond to 32% to 64% illuminated, so it's not clear to me where you think the problem is. Are you just disagreeing with the cutoff values that I've used? I'm not an astronomer so I have to rely on library routines and information I find on the internet. There are a number of places on the internet where the cutoff values I've used are quoted - https://www.google.co.uk/search?q=9.22831+moon. It looks like it simply divides the lunar month into 8 equal phases. Is that not a reasonable approach?
Steve
-
Big Daddy
- Posts: 270
- Joined: Tue 10 Sep 2013 8:40 pm
- Weather Station: Ecowitt GW1000 / various sensors
- Operating System: Raspbian 12 Bookworm (X64)
- Location: Freiston, Lincolnshire, UK
- Contact:
Re: Moon Phases
Hi Steve,
Thanks for the reply, I'm not an astronomer either.
When I was using Cumulus 1 I created 200+ images for the moon phases which used the webtags for the moon phase and the visible percentage provided by Cumulus to pull in the correct image using php e.g. Waxing_Gibbous_78, Full_Moon_100 etc.This seemed to work and the boundaries appear to have been set as follows.
New Moon 0% - 1%
Waxing Crescent 1% - 49%
First Quarter 49% - 50%
Waxing Gibbous 51% - 99%
Full Moon 99% to 100%
Waning Gibbous 99% to 51%
Last Quarter 50% to 49%
Waning Crescent 49% to 1%
Don't know if this helps or if the original cut off points are "technically correct".
Maybe there is an astronomer out there that can give some input.
Thanks
Andy
Thanks for the reply, I'm not an astronomer either.
When I was using Cumulus 1 I created 200+ images for the moon phases which used the webtags for the moon phase and the visible percentage provided by Cumulus to pull in the correct image using php e.g. Waxing_Gibbous_78, Full_Moon_100 etc.This seemed to work and the boundaries appear to have been set as follows.
New Moon 0% - 1%
Waxing Crescent 1% - 49%
First Quarter 49% - 50%
Waxing Gibbous 51% - 99%
Full Moon 99% to 100%
Waning Gibbous 99% to 51%
Last Quarter 50% to 49%
Waning Crescent 49% to 1%
Don't know if this helps or if the original cut off points are "technically correct".
Maybe there is an astronomer out there that can give some input.
Thanks
Andy
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Moon Phases
MX uses the moon age to determine the phase rather than the percent illuminated, it just worked out easier that way. I don't think there are any technically correct boundaries defined; the four main phases are 'instantaneous' anyway, but it doesn't make much sense for them to be treated as such, as they would never actually be seen. The effect of the algorithm in MX is that the arbitrary period assigned to the four main phases is slightly longer than in Cumulus 1. I may look at changing it in MX at some point if the way it does it currently is a serious problem to anyone.
Perhaps Mark would like to comment?
Perhaps Mark would like to comment?
Steve
-
Big Daddy
- Posts: 270
- Joined: Tue 10 Sep 2013 8:40 pm
- Weather Station: Ecowitt GW1000 / various sensors
- Operating System: Raspbian 12 Bookworm (X64)
- Location: Freiston, Lincolnshire, UK
- Contact:
Re: Moon Phases
Thanks Steve,
Maybe I will take a look at a way of using my images by means of a php calculation based on moon age and percentage, that would be a potential workaround for my particular needs.
Appreciate your time.
Andy
Maybe I will take a look at a way of using my images by means of a php calculation based on moon age and percentage, that would be a potential workaround for my particular needs.
Appreciate your time.
Andy
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Moon Phases
I've realised what's happened. I originally had the same code in MX as in Cumulus 1. But this was causing the 'waxing instead of waning' problem, so I changed it to use the moon age instead. I think that the problem is that the calculated percent doesn't go negative in MX when the moon is waning, as it's supposed to. I'll see if I can fix that and revert to the original code.
Steve
- mcrossley
- Posts: 14388
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Moon Phases
Don't ask me! I do not know of any official definitions. A general practice is to call a full/new etc Moon for the full calendar day on which it occurs.
Now what happens if the event is close to midnight? I'd be tempted to make both days labelled with the event.
Now what happens if the event is close to midnight? I'd be tempted to make both days labelled with the event.
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Moon Phases
I think I'm going to stick with the way Cumulus 1 did it, now that I've got it working the same way in MX. At least that's consistent. I think the result is that it says New Moon etc for about 24 hours.
Steve
-
Big Daddy
- Posts: 270
- Joined: Tue 10 Sep 2013 8:40 pm
- Weather Station: Ecowitt GW1000 / various sensors
- Operating System: Raspbian 12 Bookworm (X64)
- Location: Freiston, Lincolnshire, UK
- Contact:
Re: Moon Phases
Steve,
Thats brilliant. Thanks, I will wait for the next beta release.
Again, appreciate your work.
Andy
Thats brilliant. Thanks, I will wait for the next beta release.
Again, appreciate your work.
Andy
-
BCJKiwi
- Posts: 1259
- Joined: Mon 09 Jul 2012 8:40 pm
- Weather Station: Davis VP2 Cabled
- Operating System: Windows 10 Pro
- Location: Auckland, New Zealand
- Contact:
Re: Moon Phases
FYI;
The Saratoga scripts use two methods for this - both sourced from USNO.
One has derived tables of the Unix time for each quarter thru to 2023 by extracting this data from USNO - (used on the "dashboard").
The other gets sun and moon data each daily for your location.
This gives the following data (edited); So these outputs are based on the actual time of the events.
An example use of this data can be seen here http://silveracorn.nz/weather/wxalmanac.php.
The Saratoga scripts use two methods for this - both sourced from USNO.
One has derived tables of the Unix time for each quarter thru to 2023 by extracting this data from USNO - (used on the "dashboard").
The other gets sun and moon data each daily for your location.
This gives the following data (edited);
Code: Select all
The following information is provided for Royal Oak, Auckland New Zealand
(longitude E174.8, latitude S36.9):
Wednesday
1 July 2015 Universal Time + 12h
SUN
Begin civil twilight 07:06
Sunrise 07:35
Sun transit 12:25
Sunset 17:15
End civil twilight 17:44
MOON
Moonrise 15:45 on preceding day
Moonset 06:08
Moonrise 16:37
Moon transit 23:50
Moonset 07:04 on following day
Phase of the Moon on 1 July: waxing gibbous
with 98% of the Moon's visible disk illuminated.
Full Moon on 2 July 2015 at 14:20
(Universal Time + 12h).An example use of this data can be seen here http://silveracorn.nz/weather/wxalmanac.php.
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Moon Phases
But is it the script or the USNO data which decides the name of the current phase? And whichever one it is, what algorithm do they use to decide that?
Steve
-
BCJKiwi
- Posts: 1259
- Joined: Mon 09 Jul 2012 8:40 pm
- Weather Station: Davis VP2 Cabled
- Operating System: Windows 10 Pro
- Location: Auckland, New Zealand
- Contact:
Re: Moon Phases
The chunk of data inside the code tags in my previous post is in the form that USNO delivers it.
So that includes the phase:- Really just included this to indicate an alternate source - not to suggest that MX should use it.
If you did wish to use USNO data, then the table - actually arrays of times - method might be useful as it is static and would not require getting new info from USNO all the time.
Looking at the script based on the arrays, it works from the time of the next new moon and derives;
phases, and their start and end times,
moon age,
% illumination,
and,
picture number
from there.
Have attached the section of the code from the file so you can see how it is done. as you can see it has been a collaborative effort and been used for some time - present script first released in 2011 and updated since.
So that includes the phase:-
Code: Select all
Phase of the Moon on 1 July: waxing gibbous
with 98% of the Moon's visible disk illuminated.
Full Moon on 2 July 2015 at 14:20
(Universal Time + 12h).If you did wish to use USNO data, then the table - actually arrays of times - method might be useful as it is static and would not require getting new info from USNO all the time.
Looking at the script based on the arrays, it works from the time of the next new moon and derives;
phases, and their start and end times,
moon age,
% illumination,
and,
picture number
from there.
Have attached the section of the code from the file so you can see how it is done. as you can see it has been a collaborative effort and been used for some time - present script first released in 2011 and updated since.
You do not have the required permissions to view the files attached to this post.
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Moon Phases
It looks like it assigns a period of 1/28th of the lunar cycle to the major phases, which is approximately the same effect as the calculation in Cumulus 1 and builds of MX apart from 3024 and 3025, just done by a different method - but Cumulus assigns slightly more, somewhere between 24 and 48 hours. I think I'm happy with that; the code in 3024 and 3025 is too crude and assigns too long a period to the major phases (1/8th of the cycle).
Steve
-
BCJKiwi
- Posts: 1259
- Joined: Mon 09 Jul 2012 8:40 pm
- Weather Station: Davis VP2 Cabled
- Operating System: Windows 10 Pro
- Location: Auckland, New Zealand
- Contact:
Re: Moon Phases
Right now MX is saying Full moon and age 99% where USNO still has Waxing Gibbous and an age of 98%.
I don't recall C1 being that different so a change back to C1 code sounds like a good move.
I don't recall C1 being that different so a change back to C1 code sounds like a good move.