NolanKingdon / MMM-MoonPhase

Magic Mirror Module that displays the current moon phase
MIT License
54 stars 23 forks source link

Error in the calculation of the days about phase #36

Closed Egnos87 closed 1 year ago

Egnos87 commented 1 year ago

RPI 4 4GB O.S. Buster MM version "2.23.0" MMM-MoonPhase latest version

ISSUE: For some phases the calculation of the days is wrong. In the follow example a screen shot that show 21 days for the phase "waning gibbous", instead it should last about 7 days.

image

Could you fix this problem? Can I help you with some tests?

Below my config:

{
            module: "MMM-MoonPhase",
            position: "bottom_right",
            config: {
                updateInterval: 43200000,
                hemisphere: "N",
                resolution: "detailed",
                basicColor: "white",
                title: true,
                phase: true,
                size: 250,
                moonAlign: "center",
                textAlign: "center",
                //x: 100,
                //y: 100,
                alpha: 0.7,
                age: true,
                riseAndSet: {
                            display: true,
                            lon: 7.5,
                            lat: 45.0,
                            gmtOffset: +2.0
                        }
            }
        },

Thanks.

NolanKingdon commented 1 year ago

Looks like I got the README for age is wrong. Looking at the code, age is meant to display the number of days into a cycle the current moon is. Since the phase on the 21st day after a new moon is a waning gibbous, this looks to be working correctly.

However I added phaseAge in #37 so that can be used for something that behaves more like you expected, and optionally phaseAgeTotal if you want to see how many days the app would consider the the moon a part of the current phase.

Thanks for raising this!

Egnos87 commented 1 year ago

Great Job! Thank you to maintain this splendid module.

Problem SOLVED!