/[emacs]/emacs/lisp/calendar/solar.el
ViewVC logotype

Diff of /emacs/lisp/calendar/solar.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.48 by lektu, Tue Feb 4 12:49:33 2003 UTC revision 1.49 by gm, Sun Aug 3 13:58:01 2003 UTC
# Line 1  Line 1 
1  ;;; solar.el --- calendar functions for solar events  ;;; solar.el --- calendar functions for solar events
2    
3  ;; Copyright (C) 1992, 1993, 1995, 1997 Free Software Foundation, Inc.  ;; Copyright (C) 1992, 1993, 1995, 1997, 2003 Free Software Foundation, Inc.
4    
5  ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>  ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
6  ;;      Denis B. Roegel <Denis.Roegel@loria.fr>  ;;      Denis B. Roegel <Denis.Roegel@loria.fr>
# Line 59  Line 59 
59    
60  ;;; Code:  ;;; Code:
61    
62    (defvar displayed-month)
63    (defvar displayed-year)
64    
65  (if (fboundp 'atan)  (if (fboundp 'atan)
66      (require 'lisp-float-type)      (require 'lisp-float-type)
67    (error "Solar/lunar calculations impossible since floating point is unavailable"))    (error "Solar/lunar calculations impossible since floating point is unavailable"))
# Line 939  use when highlighting the day in the cal Line 942  use when highlighting the day in the cal
942                    (format "%s Sabbath candle lighting"                    (format "%s Sabbath candle lighting"
943                      (apply 'solar-time-string light)))))))                      (apply 'solar-time-string light)))))))
944    
945    ; from Meeus, 1991, page 167
946    (defconst solar-seasons-data
947      '((485 324.96 1934.136)
948        (203 337.23 32964.467)
949        (199 342.08 20.186)
950        (182 27.85 445267.112)
951        (156 73.14 45036.886)
952        (136 171.52 22518.443)
953        (77 222.54 65928.934)
954        (74 296.72 3034.906)
955        (70 243.58 9037.513)
956        (58 119.81 33718.147)
957        (52 297.17 150.678)
958        (50 21.02 2281.226)
959        (45 247.54 29929.562)
960        (44 325.15 31555.956)
961        (29 60.93 4443.417)
962        (18 155.12 67555.328)
963        (17 288.79 4562.452)
964        (16 198.04 62894.029)
965        (14 199.76 31436.921)
966        (12 95.39 14577.848)
967        (12 287.11 31931.756)
968        (12 320.81 34777.259)
969        (9 227.73 1222.114)
970        (8 15.45 16859.074)))
971    
972  (defun solar-equinoxes/solstices (k year)  (defun solar-equinoxes/solstices (k year)
973    "Date of equinox/solstice K for YEAR.    "Date of equinox/solstice K for YEAR.
974  K=0, spring equinox; K=1, summer solstice; K=2, fall equinox;  K=0, spring equinox; K=1, summer solstice; K=2, fall equinox;
# Line 1017  solstice.  These formulas are only to be Line 1047  solstice.  These formulas are only to be
1047                                     (* -0.00823 z z z)                                     (* -0.00823 z z z)
1048                                     (* 0.00032 z z z z)))))))                                     (* 0.00032 z z z z)))))))
1049    
 ; from Meeus, 1991, page 167  
 (defconst solar-seasons-data  
   '((485 324.96 1934.136)  
     (203 337.23 32964.467)  
     (199 342.08 20.186)  
     (182 27.85 445267.112)  
     (156 73.14 45036.886)  
     (136 171.52 22518.443)  
     (77 222.54 65928.934)  
     (74 296.72 3034.906)  
     (70 243.58 9037.513)  
     (58 119.81 33718.147)  
     (52 297.17 150.678)  
     (50 21.02 2281.226)  
     (45 247.54 29929.562)  
     (44 325.15 31555.956)  
     (29 60.93 4443.417)  
     (18 155.12 67555.328)  
     (17 288.79 4562.452)  
     (16 198.04 62894.029)  
     (14 199.76 31436.921)  
     (12 95.39 14577.848)  
     (12 287.11 31931.756)  
     (12 320.81 34777.259)  
     (9 227.73 1222.114)  
     (8 15.45 16859.074)))  
   
1050  ;;;###autoload  ;;;###autoload
1051  (defun solar-equinoxes-solstices ()  (defun solar-equinoxes-solstices ()
1052    "*local* date and time of equinoxes and solstices, if visible in the calendar window.    "*local* date and time of equinoxes and solstices, if visible in the calendar window.

Legend:
Removed from v.1.48  
changed lines
  Added in v.1.49

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26