中华农历论坛知识讨论区历法知识 → 我自己制作的万年历


  共有251079人关注过本帖树形打印

主题:我自己制作的万年历

帅哥哟,离线,有人找我吗?
xjw01
  11楼 个性首页 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:蝙蝠侠 帖子:866 积分:3804 威望:3 精华:20 注册:2008/3/20 22:14:00
  发帖心情 Post By:2008/3/20 22:23:00

我写了一个基于JavaScript的精准农历计算程序,供你参考。

程序中进行了力学时与UTC时的转换,光行差、光行时修正,岁差改正,章动改正等

精度很高,程序也不长。共有两个版本,一个是VSOP87+ELP2000-82B的,精度与"日梭万年历"相同,另一个是VSOP87+ELP/MPP02的,其中ELP/MPP02远期精度高于“日梭万年历”,程序中提供了一些坐标变换函数,日月位置计算函数,农历计算算法等

地址如下:http://www.fjptsz.com/xxjs/xjw/rj/113.htm

如有疑问可与我联系 xunmeng04@163.com

 


支持(1中立(0反对(0单帖管理 | 引用 | 回复 回到顶部
帅哥哟,离线,有人找我吗?
jyarmy
  12楼 个性首页 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:论坛游民 帖子:54 积分:1008 威望:0 精华:0 注册:2007/6/16 13:30:00
  发帖心情 Post By:2008/3/21 19:51:00

楼上的可以啊,呵呵,支持!

支持(0中立(0反对(0单帖管理 | 引用 | 回复 回到顶部
帅哥哟,离线,有人找我吗?
jyarmy
  13楼 个性首页 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:论坛游民 帖子:54 积分:1008 威望:0 精华:0 注册:2007/6/16 13:30:00
  发帖心情 Post By:2008/3/21 19:54:00

以下是引用ilovelassie在2008-3-19 18:15:00的发言: 

你的那个万年历听说是用查表法,一定很费功夫吧。

功夫倒是不费,主要是费空间,存储一万多年的朔、望和节气的精确时间就用了4M多,还没想到更好的办法


支持(0中立(0反对(0单帖管理 | 引用 | 回复 回到顶部
帅哥哟,离线,有人找我吗?
xjw01
  14楼 个性首页 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:蝙蝠侠 帖子:866 积分:3804 威望:3 精华:20 注册:2008/3/20 22:14:00
  发帖心情 Post By:2008/3/21 20:28:00

不会占空间啊,去除文字说明部分,总共35k左右,如果象"日梭万年历"那么进行加密压缩处理,只需15k-20k就够了,不会占空间,如果适当降低精度,做到15k以下也是可以的,不过压缩以后,程序的可读性变差。

前面几位也提供了其它的算法,我想也是可行的,不过应补上章动及光行差及协调世界时与力学时的差,不然是得不到正确结果的。这几个坐标修正及时间修正主要属于运动学范畴,不难理解。但要想得到正确结果就必须处理这些问题,我的程序中花费了大量代码解决这些问题,所以程序稍长了一些。


支持(0中立(0反对(0单帖管理 | 引用 | 回复 回到顶部
帅哥哟,离线,有人找我吗?
jyarmy
  15楼 个性首页 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:论坛游民 帖子:54 积分:1008 威望:0 精华:0 注册:2007/6/16 13:30:00
  发帖心情 Post By:2008/3/21 20:39:00

楼上的高手,能不能搞一个好一点的C或者C++代码啊,那样看着方便一点

支持(0中立(0反对(0单帖管理 | 引用 | 回复 回到顶部
帅哥哟,离线,有人找我吗?
jyarmy
  16楼 个性首页 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:论坛游民 帖子:54 积分:1008 威望:0 精华:0 注册:2007/6/16 13:30:00
  发帖心情 Post By:2008/3/21 23:35:00

我的一年的信息用了400个字节,每个精确的时间用长整型表示(8个字节):

    0 ~ 191:8*24,24节气信息,从冬至开始
  192 ~ 295:8*13,朔时刻,若12个朔,则第一个位置存0.000
  296 ~ 399:8*13,望时刻,若12个望,则第一个位置存0.000

这样一万多年不就是4M多吗

有没有什么更好的办法?


支持(0中立(0反对(0单帖管理 | 引用 | 回复 回到顶部
帅哥哟,离线,有人找我吗?
春光
  17楼 个性首页 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:917 积分:7567 威望:10 精华:1 注册:2005/3/17 11:37:00
  发帖心情 Post By:2008/3/22 0:03:00

jyarmy 兄,您真够累的,10000多年。您辛苦了。望我们更加努力,让我们的农历更加准确,超过已加密的《日棱万年历》。

xjw01兄,您的日历也真够准确的,佩服。 

 

其实,我也很侗服ilovelassie兄。


支持(0中立(0反对(0单帖管理 | 引用 | 回复 回到顶部
帅哥哟,离线,有人找我吗?
xjw01
  18楼 个性首页 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:蝙蝠侠 帖子:866 积分:3804 威望:3 精华:20 注册:2008/3/20 22:14:00
  发帖心情 Post By:2008/3/22 17:20:00


把精度控制在10秒的节气查表法(春分为例):
(1)计算出2000年范围内所有春风真实时刻,所有春分时刻用类似儒略计数的方式表达,各年春风记作Zn
(2)利用最小二乘法计算出这些春风时刻的最佳的多项式表达式:
chunFen=A+B*t+C*t*t+D*t*t*t,这样chunFen与真春分时刻En的误差在半小时之内
(3)算出En=Zn-chunFen,把每年的En保存在表中,En占用1个字节,单位是10秒,那用En所表达的时间范围是256*10=2560秒=42分
通过以上算法,每年的节气数据占用24字节
(4)查表过程:Zn = chunFen+En = A+B*t+C*t*t+D*t*t*t+En
(5)朔望的算法也可参考已上算法


支持(1中立(0反对(0单帖管理 | 引用 | 回复 回到顶部
帅哥哟,离线,有人找我吗?
guoren
  19楼 个性首页 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:17 积分:311 威望:0 精华:0 注册:2008/3/19 0:36:00
  发帖心情 Post By:2008/3/22 21:09:00

有一个小瑕疵:

很多<万年历>除了公元,干支纪年外,都附有中国朝代年号纪年,你这个没有.

最好连日本,越南的年号纪年也附上,连佛历,伊斯兰历都有了,为何没有中国年号纪年?


支持(0中立(0反对(0单帖管理 | 引用 | 回复 回到顶部
帅哥哟,离线,有人找我吗?
春光
  20楼 个性首页 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:917 积分:7567 威望:10 精华:1 注册:2005/3/17 11:37:00
  发帖心情 Post By:2008/3/26 11:11:00

以下是经典计算星历表的书目(都是外文版的):

Low-Precision Formulae for Planetary Position , TCVan Flandern and KFPulkkinen , Willmann-Bell,Inc, 1979.

  • Astronomical Formulae for Calculators , Jean Meeus , Willmann-Bell,Inc, 1985. Astronomical Formulae for Calculators , Jean Meeus , Willmann-Bell,Inc, 1985.
  • Planetary Programs and Tables from -4000 to +2800 , Pterre Bretagnon and Jean-Louis Simon , Willmann-Bell,Inc, 1986. Planetary Programs and Tables from -4000 to +2800 , Pterre Bretagnon and Jean-Louis Simon , Willmann-Bell,Inc, 1986.
  • Fifty Year Canon of Solar Eclipses : 1986-2035 , Fred Espenak , Sky Publishing, 1987. Fifty Year Canon of Solar Eclipses : 1986-2035 , Fred Espenak , Sky Publishing, 1987.
  • Orbital Motion , AERoy , Adam Hilger, 1988. (C) Orbital Motion , AERoy , Adam Hilger, 1988. (C)

  • The Motion of the Moon , Alan Cook , Adam Hilger, 1988. The Motion of the Moon , Alan Cook , Adam Hilger, 1988.
  • Practical Ephemeris Calculation , Oliver Montenbruck , Springer-Verlag, 1989. (C) Practical Ephemeris Calculation , Oliver Montenbruck , Springer-Verlag, 1989. (C)
  • Elements of Solar Eclipse , Jean Meeus , Willmann-Bell,Inc, 1989. Elements of Solar Eclipse , Jean Meeus , Willmann-Bell,Inc, 1989.
  • Fifty Year Canon of Lunar Eclipses : 1986-2035 , Fred Espenak , Sky Publishing, 1989. Fifty Year Canon of Lunar Eclipses : 1986-2035 , Fred Espenak , Sky Publishing, 1989.
  • Transits , Jean Meeus , Willmann-Bell,Inc, 1989. Transits , Jean Meeus , Willmann-Bell,Inc, 1989.

  • Introductory Orbit Dynamics , FPJRimrott , Vieweg, 1989. (C) Introductory Orbit Dynamics , FPJRimrott , Vieweg, 1989. (C)
  • Astronomical Algorithms , Jean Meeus , Willmann-Bell,Inc, 1991. Astronomical Algorithms , Jean Meeus , Willmann-Bell,Inc, 1991.
  • Lunar Tables and Programs from 4000 BC to AD 8000 , Michelle Chapront-Touze and Jean Chapront , Willmann-Bell,Inc, 1991. Lunar Tables and Programs from 4000 BC to AD 8000 , Michelle Chapront-Touze and Jean Chapront , Willmann-Bell,Inc, 1991.
  • Methods of Orbit Determination for the MicroComputer , Dan Boulet , Willmann-Bell,Inc, 1991. Methods of Orbit Determination for the MicroComputer , Dan Boulet , Willmann-Bell,Inc, 1991.
  • Canon of Lunar Eclipses 1500 BC - AD 3000 , Bao-Lin Liu and Alan D.Fiala , Willmann-Bell,Inc, 1992. Canon of Lunar Eclipses 1500 BC - AD 3000 , Bao-Lin Liu and Alan D.Fiala , Willmann-Bell,Inc, 1992.

  • Explanatory Supplement to the Astronomical Alamanac , P.Kenneth Seidelmann , University Science Books, 1992. Explanatory Supplement to the Astronomical Alamanac , P.Kenneth Seidelmann , University Science Books, 1992.
  • Fundamentals of Celestial Mechanics , JMADanby , Willmann-Bell,Inc, 1992. Fundamentals of Celestial Mechanics , JMADanby , Willmann-Bell,Inc, 1992.
  • Solving Kepler's Equation over Three Centuries , Peter Colwell , Willmann-Bell,Inc, 1993. Solving Kepler's Equation over Three Centuries , Peter Colwell , Willmann-Bell,Inc, 1993.
  • Analytical Techniques of Celestial Mechanics , Victor A.Brumberg , Springer-Verlag, 1995. Analytical Techniques of Celestial Mechanics , Victor A.Brumberg , Springer-Verlag, 1995.
  • Astronomical Tables of the Sun, Moon and Planets , Jean Meeus , Willmann-Bell,Inc, 1995. Astronomical Tables of the Sun, Moon and Planets , Jean Meeus , Willmann-Bell,Inc, 1995.

  • Calendrical Calculations , Nachum Dershowitz and Edward M.Reingold , Cambridge University Press, 1997. Calendrical Calculations , Nachum Dershowitz and Edward M.Reingold , Cambridge University Press, 1997.
  • Mathematical Astronomy Morsels , Jean Meeus , Willmann-Bell,Inc, 1997. Mathematical Astronomy Morsels , Jean Meeus , Willmann-Bell,Inc, 1997.
  • Textbook on Spherical Astronomy , WMSmart , Cambridge University Press, 1997. Textbook on Spherical Astronomy , WMSmart , Cambridge University Press, 1997.
  • The Hipparcos and Tycho Catalogues : Volume 1 : Introduction and Guide to the Data ,European Space Agency, 1997. The Hipparcos and Tycho Catalogues : Volume 1 : Introduction and Guide to the Data ,European Space Agency, 1997.
  • Spaceflight Dynamics , William E.Wiesel , McGraw-Hill, 1997. Spaceflight Dynamics , William E.Wiesel , McGraw-Hill, 1997.

  • Astronomy on the Personal Computer , Oliver Montenbruck and Thomas Pfleger , Springer-Verlag, 1998. Astronomy on the Personal Computer , Oliver Montenbruck and Thomas Pfleger , Springer-Verlag, 1998.
  • Standard C Date/Time Library: Programming the World's Calendars and Clocks , Lance Latham , R&D Books, 1998. Standard C Date/Time Library: Programming the World's Calendars and Clocks , Lance Latham , R&D Books, 1998.
  • Solar System Dynamics , CDMurray and SFDermott , Cambridge University Press, 1999. Solar System Dynamics , CDMurray and SFDermott , Cambridge University Press, 1999.
  • Fundamental Ephemeris Computations : For use with JPL Data , Paul J.Heafner , Willmann-Bell,Inc, 1999. Fundamental Ephemeris Computations : For use with JPL Data , Paul J.Heafner , Willmann-Bell,Inc, 1999.
  • The Orrery : Computer Models of Astronomical Systems , Caxton C.Foster , Willmann-Bell,Inc, 1999. The Orrery : Computer Models of Astronomical Systems , Caxton C.Foster , Willmann-Bell,Inc, 1999.

  • Astrometry of Fundamental Catalogues : The Evolution from Optical to Radio Reference Frames , Hans G.Walter and Ojars J.Sovers , Springer-Verlag, 2000. Astrometry of Fundamental Catalogues : The Evolution from Optical to Radio Reference Frames , Hans G.Walter and Ojars J.Sovers , Springer-Verlag, 2000.
  • Einfuhrung in die Himmelsmechanik und Ephemeridenrechung. Theorie, Algorithmen, Numerik , Andreas Guthmann , Spektrum Akademischer Verlag, 2000. (Deutsch) Einfuhrung in die Himmelsmechanik und Ephemeridenrechung. Theorie, Algorithmen, Numerik , Andreas Guthmann , Spektrum Akademischer Verlag, 2000. (Deutsch)
  • Practical Astronomy with your calculator , Peter Duffett-Smith , Cambridge University Press, 2001. Practical Astronomy with your calculator , Peter Duffett-Smith , Cambridge University Press, 2001.
  • More Mathematical Astronomy Morsels , Jean Meeus , Willmann-Bell,Inc, 2002. More Mathematical Astronomy Morsels , Jean Meeus , Willmann-Bell,Inc, 2002.
  • Space Dynamics , GAGurzadyan , Taylor & Francis, 2002. Space Dynamics , GAGurzadyan , Taylor & Francis, 2002.

  • Astronomy on the Personal Computer , Oliver Montenbruck and Thomas Pfleger , 4th Edition, Springer-Verlag, 2002. Astronomy on the Personal Computer , Oliver Montenbruck and Thomas Pfleger , 4th Edition, Springer-Verlag, 2002.
  • The Gravitational Million-Body Problem , Douglas Heggie , Piet Hut , Cambridge University Press, 2003. The Gravitational Million-Body Problem , Douglas Heggie , Piet Hut , Cambridge University Press, 2003.
  • Mathematical Astronomy Morsels III , Jean Meeus , Willmann-Bell,Inc, 2004. Mathematical Astronomy Morsels III , Jean Meeus , Willmann-Bell,Inc, 2004.
     
  • Fundamentals of Astrometry , Jean Kovalevsky, P.Kenneth Seidelmann , Cambridge University Press, 2004. Fundamentals of Astrometry , Jean Kovalevsky, P.Kenneth Seidelmann , Cambridge University Press, 2004.
  • Statistical Orbit Determination , Byron D.Tapley, Bob E.Schutz, George H.Born , Elsevier Academic Press, 2004. Statistical Orbit Determination , Byron D.Tapley, Bob E.Schutz, George H.Born , Elsevier Academic Press, 2004.

  • Methods of Celestial Mechanics Volume 1 : Physical, Mathematical, and Numerical Principles , JGerhard Beutler , Springer-Verlag, 2005. Methods of Celestial Mechanics Volume 1 : Physical, Mathematical, and Numerical Principles , JGerhard Beutler , Springer-Verlag, 2005.
  • Methods of Celestial Mechanics Volume 2 : Application to Planetary System, Geodynamics and Satellite Geodesy , JGerhard Beutler , Springer-Verlag, 2005. Methods of Celestial Mechanics Volume 2 : Application to Planetary System, Geodynamics and Satellite Geodesy , JGerhard Beutler , Springer-Verlag, 2005. 
       本人评论:在当今中国,这方面的好书真是太难找了,尤其星历表计算方面的书(历书天文学),这是书目是在一个网站上转来的,但是上面所列的书都非常的难找啊。
  •     我至今还只有一本“Astronomical Algorithms”,即《天文算法》,从网上下载到的。

       其实我认为计算星历表方法的书比较好是:

        1)  Astronomical Algorithms :, Jean Meeus , Willmann-Bell,Inc, 1991. Astronomical Algorithms , Jean Meeus , Willmann-Bell,Inc, 1991.    (本人已有)

        2)Fundamental Ephemeris Computations : For use with JPL Data , Paul J.Heafner , Willmann-Bell,Inc, 1999.(这本书可以说是星历表程序编制的“圣经”级的专著,可惜我还没有找到)

       3)Calendrical Calculations: The Millennium Edition :  Pages: 460 ,Year of Publication: 2001 ,ISBN:0-521-77752-6 , Cambridge University Press  New York, NY, USA (本人没找到)

     


    支持(0中立(0反对(0单帖管理 | 引用 | 回复 回到顶部
    总数 106 上一页 1 2 3 4 5 6 7 8 9 10 下一页 ..11

    返回版面帖子列表

    我自己制作的万年历








    签名