Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.9.1 (build 3096) - 31 October 2020 (please see announcement regarding releases since 3.5.0)
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of the NOAA report and Snow Index drop-down menus to 2030)

Use this Wiki link to Download the Software (Cumulus MX / Cumulus 1 and other related items).

Moon phases Cumulus 1 v CumulusMX

Discussion and support for 3rd-party (non-Sandaysoft) tools for Cumulus
User avatar
HansR
Posts: 1552
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: Davis Vantage Pro 2+
Operating System: Raspbian GNU/Linux 10 (Buster)
Location: Wagenborgen (NL)
Contact:

Re: Moon phases Cumulus 1 v CumulusMX

Post by HansR »

The actual visual of the light of the moon is a complex issue but by the visualisation I include makes it a bit more comprehensible. Point is, that the angle, and as such the actual position of the moon defines what you see. Moonage is more difficult because of the difference between the actual rotation and that we observe with the rotation of the earth. The angle can be calculated though so that should be your driving parameter.
200405 Moon.png
You can deduct an equation but that quickly becomes very complex (though it can be done). However after some research, the projection of the moonlight fraction as seen by us can be fairly approximated by an elliptic part (where light and darkness meet). That ellipse is defined by the radius of the moon (vertical) and the radius of the lighted part (horizontal). The horizontal part is defined by 'ellipse x-radius' = 'Moon radius' * cos( theta ). At least, that is what I use in a continuous simulation (visual here).

So in summary: I think you should use angle (or percentage) i.s.o. moon age.
You do not have the required permissions to view the files attached to this post.
Last edited by HansR on Sun 05 Apr 2020 4:31 pm, edited 1 time in total.
https://meteo-wagenborgen.nl / Cumulus 3.9.1 (build: 3096)
Davis Vantage Pro 2+ / Raspberry Pi 3 Model B Plus Rev 1.3
Raspbian Buster / 5.4.51-v7+ armv7l
Mono JIT compiler version 6.12.0.90 (tarball Fri Sep 4 14:21:54 UTC 2020)

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

Re: Moon phases Cumulus 1 v CumulusMX

Post by beteljuice »

the beteljuice again states the obvious !!!

Moonage is time count from New Moon .. simple :)
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
mcrossley
Posts: 7219
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Buster Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Moon phases Cumulus 1 v CumulusMX

Post by mcrossley »

beteljuice wrote:
Sun 05 Apr 2020 2:20 pm
the beteljuice again states the obvious !!!

Moonage is time count from New Moon .. simple :)
Yep! Nothing to do with phase - well only loosely, the only time you can guarantee they match is when age = 0 :D

Anyway, I've sorted it, the CMX moon phase/illumination calculation is already accurate*. The moon age is not, it will be out by a constant value for each lunar cycle. How far out? Approximately +/- 6.5 hours.

The next release will have accurate an moon age. It will also have the ability to generate an accurate phase image, so hopefully that will resolve all the issues.

* Accurate enough for a weather program anyway!

BCJKiwi
Posts: 1015
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Moon phases Cumulus 1 v CumulusMX

Post by BCJKiwi »

Good news,

Saves me the effort of reworking all the images I have from a days to a % basis.
I was going to rework the cloudbase images based on the above images and also convert them to %.
The present UI based website images are .png files 96 x 96 px on a transparent background.
The cloudbase images are .gif files 25 x 25 px on a dark blue background.
I think I will be stuck with a set of fixed images based on % for cloudbase as I presume you will have no interest in generating those and I would not expect you to. There is an additional issue with them in that they must be gifs and gifs do not support a transparent background which is why they are on a dark blue background to match the night images background.

I presume the images generated:-
1. Will have a transparent background so it looks OK on any website theme?
2. Are generated at every interval
3. Are at least around 100 x 100 px so they can be readily scaled as required.

User avatar
mcrossley
Posts: 7219
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Buster Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Moon phases Cumulus 1 v CumulusMX

Post by mcrossley »

Responded off-line.

water01
Posts: 2004
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Moon phases Cumulus 1 v CumulusMX

Post by water01 »

Is it a secret then Mark?
David
Image

User avatar
mcrossley
Posts: 7219
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Buster Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Moon phases Cumulus 1 v CumulusMX

Post by mcrossley »

Hi David, no Brian emailed me with this and other aspects he would like to see implemented, it was easier to reply to the email.

As above, the next version of CMX will support image output, it's customisable too, so you can use whatever base image and output size you want.

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

Re: Moon phases Cumulus 1 v CumulusMX

Post by beteljuice »

@BGJK ..
they must be gifs and gifs do not support a transparent background
??? gifs were the first graphic to allow transparency !
Image
......................Imagine, what you will KNOW tomorrow !

BCJKiwi
Posts: 1015
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Moon phases Cumulus 1 v CumulusMX

Post by BCJKiwi »

@ beteljuice
Hmmm,
None of the tools I have will save an image with a transparent background as a .gif

Have since managed to modify the cloudbase file to use a .png moon image file.

Mapantz
Posts: 863
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 10 x64
Location: Dorset - UK
Contact:

Re: Moon phases Cumulus 1 v CumulusMX

Post by Mapantz »

BCJKiwi wrote:
Mon 06 Apr 2020 8:30 pm
@ beteljuice
Hmmm,
None of the tools I have will save an image with a transparent background as a .gif

Have since managed to modify the cloudbase file to use a .png moon image file.
I use GIMP for transparency in GIFS. Although, you can do pretty much everything to a PNG and more.
Image

User avatar
laulau
Posts: 640
Joined: Tue 13 Oct 2009 10:52 pm
Weather Station: WeatherDuino Pro2
Operating System: Win 7
Location: Meyenheim, Alsace, FR
Contact:

Re: Moon phases Cumulus 1 v CumulusMX

Post by laulau »

BCJKiwi wrote:
Mon 06 Apr 2020 8:30 pm
@ beteljuice
Hmmm,
None of the tools I have will save an image with a transparent background as a .gif

Have since managed to modify the cloudbase file to use a .png moon image file.
Sorry to have started it all :oops:
Laurent

Image

BCJKiwi
Posts: 1015
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Moon phases Cumulus 1 v CumulusMX

Post by BCJKiwi »

@laulau
No problem, something good is coming in build 3071 as a result (or maybe it was coming anyway?) - Moon images generated by CumulusMX, updated hourly and based on the real situation, not on moonage.

Working on updates to MX templates - Sorry C1 users this is not for you - go on update to MX, I dare you! ;) ;)
Hope to have this ready for release of build 3071
Requires changes to index, cloudbase and possibly other files to cope with different versions of MX that users may be running.

BCJKiwi
Posts: 1015
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Moon phases Cumulus 1 v CumulusMX

Post by BCJKiwi »

MX UI Style websites
MX build 3071 moon image
index.php and
cloudbaseCUmx.php

Updated 2020 Apr 10
See first post main thread viewtopic.php?f=18&t=17845#p138283

Post Reply