Function: solar-ecliptic-coordinates

solar-ecliptic-coordinates is a byte-compiled function defined in solar.el.gz.

Signature

(solar-ecliptic-coordinates TIME SUNRISE-FLAG)

Documentation

Return solar longitude, ecliptic inclination, equation of time, nutation.

Values are for TIME in Julian centuries of Ephemeris Time since January 1st, 2000, at 12 ET. Longitude and inclination are in degrees, equation of time in hours, and nutation in seconds of longitude. If SUNRISE-FLAG is non-nil, only calculate longitude and inclination.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/solar.el.gz
(defun solar-ecliptic-coordinates (time sunrise-flag)
  "Return solar longitude, ecliptic inclination, equation of time, nutation.
Values are for TIME in Julian centuries of Ephemeris Time since
January 1st, 2000, at 12 ET.  Longitude and inclination are in
degrees, equation of time in hours, and nutation in seconds of longitude.
If SUNRISE-FLAG is non-nil, only calculate longitude and inclination."
  (let* ((l (+ 280.46645
               (* 36000.76983 time)
               (* 0.0003032 time time))) ; sun mean longitude
         (ml (+ 218.3165
                (* 481267.8813 time)))  ; moon mean longitude
         (m (+ 357.52910
               (* 35999.05030 time)
               (* -0.0001559 time time)
               (* -0.00000048 time time time))) ; sun mean anomaly
         (i (+ 23.43929111 (* -0.013004167 time)
               (* -0.00000016389 time time)
               (* 0.0000005036 time time time))) ; mean inclination
         (c (+ (* (+ 1.914600
                     (* -0.004817 time)
                     (* -0.000014 time time))
                  (solar-sin-degrees m))
               (* (+ 0.019993 (* -0.000101 time))
                  (solar-sin-degrees (* 2 m)))
               (* 0.000290
                  (solar-sin-degrees (* 3 m))))) ; center equation
         (L (+ l c))                             ; total longitude
         ;; Longitude of moon's ascending node on the ecliptic.
         (omega (+ 125.04
                   (* -1934.136 time)))
         ;; nut = nutation in longitude, measured in seconds of angle.
         (nut (unless sunrise-flag
                (+ (* -17.20 (solar-sin-degrees omega))
                   (* -1.32 (solar-sin-degrees (* 2 l)))
                   (* -0.23 (solar-sin-degrees (* 2 ml)))
                   (* 0.21 (solar-sin-degrees (* 2 omega))))))
         (ecc (unless sunrise-flag     ; eccentricity of earth's orbit
                (+ 0.016708617
                   (* -0.000042037 time)
                   (* -0.0000001236 time time))))
         (app (+ L                      ; apparent longitude of sun
                 -0.00569
                 (* -0.00478
                    (solar-sin-degrees omega))))
         (y (unless sunrise-flag
              (* (solar-tangent-degrees (/ i 2))
                 (solar-tangent-degrees (/ i 2)))))
         ;; Equation of time, in hours.
         (time-eq (unless sunrise-flag
                    (/ (* 12 (+ (* y (solar-sin-degrees (* 2 l)))
                                (* -2 ecc (solar-sin-degrees m))
                                (* 4 ecc y (solar-sin-degrees m)
                                   (solar-cosine-degrees (* 2 l)))
                                (* -0.5 y y  (solar-sin-degrees (* 4 l)))
                                (* -1.25 ecc ecc (solar-sin-degrees (* 2 m)))))
                       float-pi))))
    (list app i time-eq nut)))