GNU bug report logs -
#61460
30.0.50; Calendar shows eclipse for quarter moon
Previous Next
Reported by: Ulrich Mueller <ulm <at> gentoo.org>
Date: Sun, 12 Feb 2023 19:58:02 UTC
Severity: normal
Found in version 30.0.50
Fixed in version 30.1
Done: Ulrich Müller <ulm <at> gentoo.org>
Bug is archived. No further changes may be made.
Full log
Message #38 received at 61460 <at> debbugs.gnu.org (full text, mbox):
>>>>> 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° -> 0°
10° -> 10°
...
170° -> 10°
180° -> 0°
190° -> 10°
...
350° -> 10°
The only thing that I don't understand is the constant 0.37. I would
have expected pi/2 (= 90°) 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°...90° 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° and 360°.
This bug report was last modified 2 years and 88 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.