summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2023-02-13 15:50:47 +0100
committerUlrich Müller <ulm@gentoo.org>2023-02-13 15:50:47 +0100
commit909bd04cf5fd42744ca5f1f34cb42b48b363ee62 (patch)
treec4751c7e861cc4ffdaca53488c955e16eea3bc37
parent10f2aedea9a47a9a12b194344504e418a12b26e5 (diff)
downloademacs-909bd04cf5fd42744ca5f1f34cb42b48b363ee62.tar.gz
emacs-909bd04cf5fd42744ca5f1f34cb42b48b363ee62.tar.bz2
emacs-909bd04cf5fd42744ca5f1f34cb42b48b363ee62.zip
; * lisp/calendar/lunar.el: Add comments. (bug#61460)
-rw-r--r--lisp/calendar/lunar.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/calendar/lunar.el b/lisp/calendar/lunar.el
index 70681f42c90..8ced4144105 100644
--- a/lisp/calendar/lunar.el
+++ b/lisp/calendar/lunar.el
@@ -85,6 +85,9 @@ remainder mod 4 gives the phase: 0 new moon, 1 first quarter, 2 full moon,
(* 0.0107306 time time)
(* 0.00001236 time time time))
360.0))
+ ;; moon-lat is the argument of latitude, which is the angle
+ ;; of the moon measured from the ascending node of its orbit
+ ;; (i.e. argument of perigee + true anomaly).
(moon-lat (mod
(+ 21.2964
(* 390.67050646 index)
@@ -153,9 +156,11 @@ remainder mod 4 gives the phase: 0 new moon, 1 first quarter, 2 full moon,
;; Line 7000 Peter Duffett-Smith Cambridge University Press 1990
(defun eclipse-check (moon-lat phase)
(let* ((moon-lat (* (/ float-pi 180) moon-lat))
+ ;; For positions near the ascending or descending node,
+ ;; calculate the absolute angular distance from that node.
(moon-lat (abs (- moon-lat (* (floor (/ moon-lat float-pi))
float-pi))))
- (moon-lat (if (> moon-lat 0.37)
+ (moon-lat (if (> moon-lat 0.37) ; FIXME (* 0.5 float-pi)
(- float-pi moon-lat)
moon-lat))
(phase-name (cond ((= phase 0) "Solar")