Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 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

Moon Age ???

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Moon Age ???

Post by beteljuice »

Whilst looking at some sites I noticed that Moon Age was being reported as 30 days, and no moon image (30) available.
The next appearing data says moonage 1 day.

Surely it is day 0 in the cycle, and the images are numbered 0 > 29

Is this in 'the release', or am I looking at some customised sites ?
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
mcrossley
Posts: 12766
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 Age ???

Post by mcrossley »

It's a rounding 'thing' anything over and including 29.5 will show as 30 of you use an integer value. The average lunar cycle is 29.53 days, and the calculation used is an approximation, so using integer values you will see day 30 every so often. You could use a decimal place or two and trunc the value for the image?
User avatar
mcrossley
Posts: 12766
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 Age ???

Post by mcrossley »

Ah not what you were saying, 0-29 vs. 1-30. Not sure, the code hasn't changed, I'll take a look at it when I get home next week.
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Moon Age ???

Post by beteljuice »

.... and also .. as I posted:

I didn't see age = 0. (less than 1 day old)
Went from 30 > 1
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
mcrossley
Posts: 12766
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 Age ???

Post by mcrossley »

If it does zero, it will last for less than half a day of course.
User avatar
mcrossley
Posts: 12766
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 Age ???

Post by mcrossley »

OK, the current code is very approximate, but I just ran CMX in a VM to see what happened this month.

New Moon was on the 24th at 21:42

The CMX MoonAge rolled over on the 25th at 04:30

It went from 29.52 to zero (using 2 dp), and 30 to 0 (using 0 dp) at that time.

So the code is working as expected, but it isn't very accurate.

EDIT: The actual interval between New Moons is subject to perturbation by the Sun (and other minor bodies), and actually varies between approximately 29.27 and 29.83 days. Using the mean value of 29.53 means that the approximate calculation is likely to have the age rolling over too early or too late compared with the actual phase.

EDIT2: I could add an tag option to truncate the value? Then it would always be in the range 0-29. At the cost of even less "accuracy" of course.
e.g. <#MoonAge tc=y>
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Moon Age ???

Post by beteljuice »

Excuse my persistence, but I have no kit nor software ...

The figures I see on site(s) are integers.
It went from 29.52 to zero (using 2 dp), and 30 to 0 (using 0 dp) at that time.
From those figures 'day' 30 should have only lasted 0.12 of a day, but it was much longer, and of course 30 days 'old' does not exist ! - presumably why the missing graphic (0 > 29)
I still do not think I saw 0.

The presentation I am observing is a 'dashboard' style, Is that a standard distro or someone's '"value add" ?

Thank you for your patience :oops:

Late Edit: Shouldn't the Moon age be rounded down ?
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
mcrossley
Posts: 12766
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 Age ???

Post by mcrossley »

Hi beteljuice - I think I may have edited my message above whilst you were replying (bad boy!)

The standard files do not make use of the MoonAge tag.

When I used to have the Cumulus template I believe I duplicated the 29 day file to 30 to cope. As you say it should only happen for 0.12 of a day, plus whatever the logging and FTP intervals are.

The MoonAge is very approximate - and I have people moaning that the phase angle is a few minutes out from the phase name!
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Moon Age ???

Post by beteljuice »

EDIT2: I could add an tag option to truncate the value? Then it would always be in the range 0-29. At the cost of even less "accuracy" of course.
e.g. <#MoonAge tc=y>
The beteljuice had a senior moment in his edit above :roll:
What I really should have said is:
"Shouldn't the Moon age be ....truncate the value" :clap:
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
mcrossley
Posts: 12766
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 Age ???

Post by mcrossley »

Done, 'twill be in the next release.
Post Reply