aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/calendar/solar.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el
index 406107ba483..f88dcbf73c9 100644
--- a/lisp/calendar/solar.el
+++ b/lisp/calendar/solar.el
@@ -88,7 +88,7 @@ sufficient), + north, - south, such as 40.7 for New York City, or the value
88can be a vector [degrees minutes north/south] such as [40 50 north] for New 88can be a vector [degrees minutes north/south] such as [40 50 north] for New
89York City. 89York City.
90 90
91This variable should be set in site-local.el.") 91This variable should be set in `site-start'.el.")
92 92
93;;;###autoload 93;;;###autoload
94(defvar calendar-longitude nil 94(defvar calendar-longitude nil
@@ -99,7 +99,7 @@ sufficient), + east, - west, such as -73.9 for New York City, or the value
99can be a vector [degrees minutes east/west] such as [73 55 west] for New 99can be a vector [degrees minutes east/west] such as [73 55 west] for New
100York City. 100York City.
101 101
102This variable should be set in site-start.el.") 102This variable should be set in `site-start'.el.")
103 103
104(defsubst calendar-latitude () 104(defsubst calendar-latitude ()
105 "Convert calendar-latitude to a signed decimal fraction, if needed." 105 "Convert calendar-latitude to a signed decimal fraction, if needed."
@@ -143,7 +143,7 @@ This variable should be set in site-start.el.")
143For example, \"New York City\". Default value is just the latitude, longitude 143For example, \"New York City\". Default value is just the latitude, longitude
144pair. 144pair.
145 145
146This variable should be set in site-start.el.") 146This variable should be set in `site-start'.el.")
147 147
148(defvar solar-error 0.5 148(defvar solar-error 0.5
149"*Tolerance (in minutes) for sunrise/sunset calculations. 149"*Tolerance (in minutes) for sunrise/sunset calculations.
@@ -276,7 +276,7 @@ Parameters are the midday TIME and the LATITUDE, LONGITUDE of the location.
276TIME is a pair with the first component being the number of Julian centuries 276TIME is a pair with the first component being the number of Julian centuries
277elapsed at 0 Universal Time, and the second component being the universal 277elapsed at 0 Universal Time, and the second component being the universal
278time. For instance, the pair corresponding to November 28, 1995 at 16 UT is 278time. For instance, the pair corresponding to November 28, 1995 at 16 UT is
279(-0.040945 16), -0.040945 being the number of julian centuries elapsed between 279\(-0.040945 16), -0.040945 being the number of julian centuries elapsed between
280Jan 1, 2000 at 12 UT and November 28, 1995 at 0 UT. 280Jan 1, 2000 at 12 UT and November 28, 1995 at 0 UT.
281 281
282Coordinates are included because this function is called with latitude=10 282Coordinates are included because this function is called with latitude=10
@@ -364,7 +364,7 @@ Format used is given by `calendar-time-display-form'."
364The date may be different from the one asked for, but it will be the right 364The date may be different from the one asked for, but it will be the right
365local date. The second component of date should be an integer." 365local date. The second component of date should be an integer."
366 (let* ((nd date) 366 (let* ((nd date)
367 (ut (- 12.0 (/ calendar-longitude 15))) 367 (ut (- 12.0 (/ (calendar-longitude) 15)))
368 (te (solar-time-equation date ut))) 368 (te (solar-time-equation date ut)))
369 (setq ut (- ut te)) 369 (setq ut (- ut te))
370 (if (>= ut 24) 370 (if (>= ut 24)
@@ -398,7 +398,7 @@ Corresponding value is nil if there is no sunrise/sunset."
398 (solar-sunrise-and-sunset 398 (solar-sunrise-and-sunset
399 (list t0 (car (cdr exact-local-noon))) 399 (list t0 (car (cdr exact-local-noon)))
400 10.0 400 10.0
401 calendar-longitude))) 401 (calendar-longitude))))
402 ; store the spring/summer information, 402 ; store the spring/summer information,
403 ; compute sunrise and sunset (two first components of rise-set). 403 ; compute sunrise and sunset (two first components of rise-set).
404 ; length of day is the third component (it is only the difference 404 ; length of day is the third component (it is only the difference
@@ -409,8 +409,8 @@ Corresponding value is nil if there is no sunrise/sunset."
409 (if (> (car (cdr (cdr equator-rise-set))) 12) 1 0)) 409 (if (> (car (cdr (cdr equator-rise-set))) 12) 1 0))
410 (solar-sunrise-and-sunset 410 (solar-sunrise-and-sunset
411 (list t0 (car (cdr exact-local-noon))) 411 (list t0 (car (cdr exact-local-noon)))
412 calendar-latitude 412 (calendar-latitude)
413 calendar-longitude))) 413 (calendar-longitude))))
414 (rise (car rise-set)) 414 (rise (car rise-set))
415 (adj-rise (if rise (dst-adjust-time date rise) nil)) 415 (adj-rise (if rise (dst-adjust-time date rise) nil))
416 (set (car (cdr rise-set))) 416 (set (car (cdr rise-set)))
@@ -509,7 +509,7 @@ The azimuth is given in degrees as well as the height (between -180 and 180)."
509 (ec (solar-equatorial-coordinates time for-sunrise-sunset)) 509 (ec (solar-equatorial-coordinates time for-sunrise-sunset))
510 (st (+ solar-sidereal-time-greenwich-midnight 510 (st (+ solar-sidereal-time-greenwich-midnight
511 (* ut 1.00273790935))) 511 (* ut 1.00273790935)))
512 (ah (- (* st 15) (* 15 (car ec)) (* -1 calendar-longitude))) 512 (ah (- (* st 15) (* 15 (car ec)) (* -1 (calendar-longitude))))
513 ; hour angle (in degrees) 513 ; hour angle (in degrees)
514 (de (car (cdr ec))) 514 (de (car (cdr ec)))
515 (azimuth (solar-atn2 (solar-sin-degrees ah) 515 (azimuth (solar-atn2 (solar-sin-degrees ah)