Subject: Re: bug#61460: 30.0.50; Calendar shows eclipse for quarter moon

From: Michael Heerdegen <[email-masked]>
Date: Mon, 13 Feb 2023 06:13:49 +0100

Michael Heerdegen <[email-masked]> writes:

> My questions: [...]

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?

Michael.