unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ulrich Mueller <ulm@gentoo.org>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: 61460@debbugs.gnu.org
Subject: bug#61460: 30.0.50; Calendar shows eclipse for quarter moon
Date: Mon, 13 Feb 2023 07:21:43 +0100	[thread overview]
Message-ID: <ubklyccg8@gentoo.org> (raw)
In-Reply-To: <87sffab61y.fsf@web.de> (Michael Heerdegen's message of "Mon, 13 Feb 2023 04:25:13 +0100")

>>>>> On Mon, 13 Feb 2023, Michael Heerdegen wrote:

> Sorry if I am misunderstanding, but is this good enough?  Then I don't
> understand.  This doesn't go specifically to you only.

> What I understand is: there are two conditions that have to be met at
> the same time, and these are more or less independent over time: (1) the
> latitude of the moon has to be smaller than a certain angle, and (2) it
> has to be new moon or full moon.  Correct?

Yes.

> My questions:

> (1) AFAIU, the "phase name" is derived from one of four values of the
> moon "phase".  Is this really good enough to decide whether it is new
> moon or full moon?  AFAIU the four moon phases all have the same length.
> So AFAIU the test you added is not strong enough, we must first test
> whether it is full moon or new moon, only at these days can an eclipse
> happen, and only for these exact dates we need to check the moon's
> latitude for whether it is small enough for an eclipse.

The phase is passed to eclipse-check as an argument from lunar-phase:

| (lunar-phase INDEX)
|
| Local date and time of lunar phase INDEX.
| Integer below INDEX/4 gives the lunation number, counting from Jan 1, 1900;
| remainder mod 4 gives the phase: 0 new moon, 1 first quarter, 2 full moon,
| 3 last quarter.  Returns a list (DATE TIME PHASE).

eclipse-check is only called for the actual dates/times of the lunar
phases, and then checks for phase 0 ("Solar") or phase 2 ("Lunar").
IIUC this should guarantee that it is the exact date and time of new
moon or full moon.

> (2) https://en.wikipedia.org/wiki/Lunar_node tells that the limit for
> the longitude of the moon is different for lunar vs. solar eclipses.
> The same will be the case when we test the latitude.  The test we
> currently use doesn't reflect that.  Should it?

Probably. Also, the moon's orbit is elliptic, so one would expect the
latitude angles at perigee to be different from those at apogee.

Anyway, let's not the better be the enemy of the good. I've pushed the
patch to the emacs-29 branch (with updated tests, thanks Eli for
reminding me). Fixing the other issues would require much more work.

Are more precise prediction of eclipses within the scope of Calendar?
If yes, then this bug should be left open for a followup patch.





  parent reply	other threads:[~2023-02-13  6:21 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-12 19:57 bug#61460: 30.0.50; Calendar shows eclipse for quarter moon Ulrich Mueller
2023-02-12 20:07 ` Ulrich Müller
2023-02-12 20:19   ` Eli Zaretskii
2023-02-12 21:13     ` Ulrich Mueller
2023-02-13  3:24       ` Eli Zaretskii
2023-02-13  3:25   ` Michael Heerdegen
2023-02-13  4:52     ` Michael Heerdegen
2023-02-13  5:13     ` Michael Heerdegen
2023-02-13  6:01       ` Michael Heerdegen
2023-02-13  7:28       ` Ulrich Mueller
2023-02-13  8:13         ` Michael Heerdegen
2023-02-13  8:52           ` Michael Heerdegen
2023-02-13  9:34             ` Ulrich Mueller
2023-02-13 10:04               ` Michael Heerdegen
2023-02-13 13:03                 ` Eli Zaretskii
2023-02-13 13:30                   ` Ulrich Mueller
2023-02-13 14:05                     ` Eli Zaretskii
2023-02-14  5:30               ` Michael Heerdegen
2023-02-14  7:59                 ` Ulrich Mueller
2023-02-14  9:15                   ` Michael Heerdegen
2023-02-14 10:22                     ` Ulrich Müller
2023-02-14 10:56                       ` Michael Heerdegen
2023-02-16 20:26                         ` Ulrich Müller
2023-02-17  5:25                           ` Michael Heerdegen
2023-02-17  7:03                             ` Ulrich Müller
2023-02-17  7:20                               ` Michael Heerdegen
2023-02-18  5:53                                 ` Michael Heerdegen
2023-02-18  8:56                                   ` Ulrich Mueller
2023-02-18  9:16                                     ` Michael Heerdegen
2023-02-21 15:15                                       ` Michael Heerdegen
2023-02-22  9:00                                         ` Ulrich Mueller
2023-02-22  9:45                                           ` Andreas Schwab
2023-02-22 10:03                                           ` Michael Heerdegen
2023-02-22 11:32                                             ` Ulrich Mueller
2023-02-22 14:19                                               ` Michael Heerdegen
2023-02-22 15:46                                                 ` Ulrich Mueller
2023-02-22 16:26                                                   ` Michael Heerdegen
2023-02-25 16:13                                                     ` Michael Heerdegen
2023-02-14 13:31                       ` Eli Zaretskii
2023-02-14 10:49                     ` Ulrich Mueller
2023-02-13  6:21     ` Ulrich Mueller [this message]
2023-02-13  7:08       ` Michael Heerdegen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ubklyccg8@gentoo.org \
    --to=ulm@gentoo.org \
    --cc=61460@debbugs.gnu.org \
    --cc=michael_heerdegen@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).