From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ulrich Mueller Newsgroups: gmane.emacs.bugs Subject: bug#61460: 30.0.50; Calendar shows eclipse for quarter moon Date: Mon, 13 Feb 2023 07:21:43 +0100 Message-ID: References: <87sffab61y.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7489"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cc: 61460@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 13 07:22:20 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pRSEG-0001i3-Ml for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 13 Feb 2023 07:22:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRSE0-0002Qp-IH; Mon, 13 Feb 2023 01:22:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRSDy-0002QO-JE for bug-gnu-emacs@gnu.org; Mon, 13 Feb 2023 01:22:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRSDy-000135-9p for bug-gnu-emacs@gnu.org; Mon, 13 Feb 2023 01:22:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pRSDx-0003vi-Tc for bug-gnu-emacs@gnu.org; Mon, 13 Feb 2023 01:22:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ulrich Mueller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Feb 2023 06:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61460 X-GNU-PR-Package: emacs Original-Received: via spool by 61460-submit@debbugs.gnu.org id=B61460.167626931715096 (code B ref 61460); Mon, 13 Feb 2023 06:22:01 +0000 Original-Received: (at 61460) by debbugs.gnu.org; 13 Feb 2023 06:21:57 +0000 Original-Received: from localhost ([127.0.0.1]:47488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRSDt-0003vO-FE for submit@debbugs.gnu.org; Mon, 13 Feb 2023 01:21:57 -0500 Original-Received: from woodpecker.gentoo.org ([140.211.166.183]:47180 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRSDs-0003v7-3x for 61460@debbugs.gnu.org; Mon, 13 Feb 2023 01:21:56 -0500 In-Reply-To: <87sffab61y.fsf@web.de> (Michael Heerdegen's message of "Mon, 13 Feb 2023 04:25:13 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255465 Archived-At: >>>>> 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.