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 08:28:29 +0100 Message-ID: References: <87sffab61y.fsf@web.de> <87cz6eb10y.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7136"; 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 08:29:34 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 1pRTHK-0001j4-8t for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 13 Feb 2023 08:29:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRTGs-0002bL-T7; Mon, 13 Feb 2023 02:29:07 -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 1pRTGo-0002am-PN for bug-gnu-emacs@gnu.org; Mon, 13 Feb 2023 02:29: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 1pRTGo-0007Jj-GV for bug-gnu-emacs@gnu.org; Mon, 13 Feb 2023 02:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pRTGo-0005xL-CW for bug-gnu-emacs@gnu.org; Mon, 13 Feb 2023 02:29:02 -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 07:29:02 +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.167627332322867 (code B ref 61460); Mon, 13 Feb 2023 07:29:02 +0000 Original-Received: (at 61460) by debbugs.gnu.org; 13 Feb 2023 07:28:43 +0000 Original-Received: from localhost ([127.0.0.1]:47547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRTGU-0005wk-T9 for submit@debbugs.gnu.org; Mon, 13 Feb 2023 02:28:43 -0500 Original-Received: from woodpecker.gentoo.org ([140.211.166.183]:53602 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRTGT-0005wS-15 for 61460@debbugs.gnu.org; Mon, 13 Feb 2023 02:28:41 -0500 In-Reply-To: <87cz6eb10y.fsf@web.de> (Michael Heerdegen's message of "Mon, 13 Feb 2023 06:13:49 +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:255467 Archived-At: >>>>> On Mon, 13 Feb 2023, Michael Heerdegen wrote: > BTW (3), I also don't understand those conversions of the latitude: > #+begin_src emacs-lisp > (defun eclipse-check (moon-lat phase) > (let* ((moon-lat (* (/ float-pi 180) moon-lat)) > (moon-lat (abs (- moon-lat (* (floor (/ moon-lat float-pi)) > float-pi)))) > (moon-lat (if (> moon-lat 0.37) > (- float-pi moon-lat) > moon-lat)) > (...)) > (...))) > #+end_src > What does this do? Don't we just want to convert a value in [0 360) to > one in [-pi pi] and use the absolute value of that, or so? That would > look like > (abs (* (/ float-pi 180) (- moon-lat 180))) > Why is our calculation so complicated? IIUC, the goal is to calculate the angular distance from the ascending or descending node, whichever is closer. So one wants this: 0=C2=B0 -> 0=C2=B0 10=C2=B0 -> 10=C2=B0 ... 170=C2=B0 -> 10=C2=B0 180=C2=B0 -> 0=C2=B0 190=C2=B0 -> 10=C2=B0 ... 350=C2=B0 -> 10=C2=B0 The only thing that I don't understand is the constant 0.37. I would have expected pi/2 (=3D 90=C2=B0) there. Probably it doesn't matter, because below it checks for (< moon-lat 0.37), so any larger value will be ignored. >>>>> On Mon, 13 Feb 2023, Michael Heerdegen wrote: > Why the is latitude of the moon: > #+begin_src emacs-lisp > (moon-lat (mod > (+ 21.2964 > (* 390.67050646 index) > (* -0.0016528 time time) > (* -0.00000239 time time time)) > 360.0)) > #+end_src > calculated as a mod 360.0 value? I would expect this for the longitude, > latitude should be in -90=C2=B0...90=C2=B0 AFAIU. Is it a typo? No, the argument of latitude is the angle of the body measured from the ascending node of its orbit. So its values are expected to be between 0=C2=B0 and 360=C2=B0.