Function: solar-ephemeris-correction
solar-ephemeris-correction is a byte-compiled function defined in
solar.el.gz.
Signature
(solar-ephemeris-correction YEAR)
Documentation
Ephemeris time minus Universal Time during Gregorian YEAR.
Result is in days. For the years 1800-1987, the maximum error is
1.9 seconds. For the other years, the maximum error is about 30 seconds.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/solar.el.gz
(defun solar-ephemeris-correction (year)
"Ephemeris time minus Universal Time during Gregorian YEAR.
Result is in days. For the years 1800-1987, the maximum error is
1.9 seconds. For the other years, the maximum error is about 30 seconds."
(cond ((and (<= 1988 year) (< year 2020))
(/ (+ year -2000 67.0) 60.0 60.0 24.0))
((and (<= 1900 year) (< year 1988))
(let* ((theta (/ (- (calendar-astro-from-absolute
(calendar-absolute-from-gregorian
(list 7 1 year)))
(calendar-astro-from-absolute
(calendar-absolute-from-gregorian
'(1 1 1900))))
36525.0))
(theta2 (* theta theta))
(theta3 (* theta2 theta))
(theta4 (* theta2 theta2))
(theta5 (* theta3 theta2)))
(+ -0.00002
(* 0.000297 theta)
(* 0.025184 theta2)
(* -0.181133 theta3)
(* 0.553040 theta4)
(* -0.861938 theta5)
(* 0.677066 theta3 theta3)
(* -0.212591 theta4 theta3))))
((and (<= 1800 year) (< year 1900))
(let* ((theta (/ (- (calendar-astro-from-absolute
(calendar-absolute-from-gregorian
(list 7 1 year)))
(calendar-astro-from-absolute
(calendar-absolute-from-gregorian
'(1 1 1900))))
36525.0))
(theta2 (* theta theta))
(theta3 (* theta2 theta))
(theta4 (* theta2 theta2))
(theta5 (* theta3 theta2)))
(+ -0.000009
(* 0.003844 theta)
(* 0.083563 theta2)
(* 0.865736 theta3)
(* 4.867575 theta4)
(* 15.845535 theta5)
(* 31.332267 theta3 theta3)
(* 38.291999 theta4 theta3)
(* 28.316289 theta4 theta4)
(* 11.636204 theta4 theta5)
(* 2.043794 theta5 theta5))))
((and (<= 1620 year) (< year 1800))
(let ((x (/ (- year 1600) 10.0)))
(/ (+ (* 2.19167 x x) (* -40.675 x) 196.58333) 60.0 60.0 24.0)))
(t (let* ((tmp (- (calendar-astro-from-absolute
(calendar-absolute-from-gregorian
(list 1 1 year)))
2382148))
(second (- (/ (* tmp tmp) 41048480.0) 15)))
(/ second 60.0 60.0 24.0)))))