Gujin lüli kao 古今律曆考 is a comprehensive overview of the history of Chinese astronomy. The book of 72 juan length was compiled during the late Ming period 明 (1368-1644) by Xing Yunlu 邢雲路 (b. 1549), courtesy name Shideng 士登, from Ansu 安肅 (today's Xushui 徐水, Hebei). Xing was assistant provincial surveillance commissioner (qianshi 僉事) of Henan, and later surveillance vice commissioner (ancha fushi 按察副使) of Shaanxi.
Xing's book, finished after 1621, can be called the oldest, comprehensive and critical history of Chinese astronomy. Fascicles 1-8 give an account of the astronomy as reflected in the Classics of old and in the writings of the Neo-Confucian thinkers of the Song period 宋 (960-1279). Xing observes that a constant adaption of calculations and prognostication methods was necessary to achieve exact information about the position of astronomical objects. He criticizes Zhu Xi's 朱熹 (1130-1200) statement that the ancient, simple calendars had been better than the complex newer calculation models.
The next part of the book, juan 9-19, analyses information on astronomy as found in historiographical books, for instance, the respective treatises in the official dynastic histories (lüli zhi 律曆志). Xing concludes that the amendments of Zu Chongzhi 祖冲之 (429–500) for the Daming Calendar (Daming li 大明曆) were excellent.
The third part (juan 20-27) talks about eclipses of the sun through the ages and discusses how the approximations to determine the occurrence of eclipses became better, as can be seen in Guo Shoujing's 郭守敬 (1231–1316) Shoushi Calendar (shoushi li 授時曆) from the Yuan period 元 (1279-1368). Fascicle 28 (Zangjing kao 藏經考) is quite remarkable because it is one of only a few researches on the Buddhist Calendar. Traditionally, the calculation of celestial phaenomena was seen as related to the calculation of the lengths and volumes of musical instruments. The fifth part of Xing's book therefore discusses the science of musical pitches (lülü 律呂), and corrects some misunderstandings in the calculation of the length of pitch pipes.
The core part of the book (juan 36-59) analyses the details of the Shoushi and Datong (datong li 大統曆) calendars. Xing reveals shortcomings, but also points out the strengths of these two astronomical models. The chapters Liyi 曆議 (juan 60-65) constitute a theoretical discussion of calendric calculations, but also present concrete numerical values of celestial degrees (zhoutian sudu 周天宿度) and talk about astronomical tools (yixiang yiqi 儀象儀器), the evolution of calendar systems, the sixty-year cycle (linian jiazi 曆年甲子), atmospheric observations (yanqi 驗氣), the discrepancy in the solar year and precession (suiyu suicha 歲餘歲差), the "motion" of the sun motion (richan 日躔) on the ecliptic (huangdao 黃道) or the "distances" of the moon (yueli 月離) on his path (baidao 白道). Chapter 66 (Lili 曆理) explains the principles of calendric calculations. These are emulated in the last part of the book (67-72 Liyuan 曆原), with the conclusion that calculated figures have to be constantly checked for inconsistencies and be corrected in case of differences.
Xing creates an objective balance between accounts of the achievements of astronomers of the past and justified criticism of their shortcomings. Quite outstanding is his observation that the movements of the "stars and the moon" are influenced by the "unified energy of the sun" (taiyang yi qi 太陽一氣) which is a simple anticipation of the laws of planetary motion formulated by Johannes Kepler (1541–1630). In any case, the astronomical writings of Xing Yunlu and Zhu Zaiyu 朱載堉 (1536–1611; Shengshou wannian li 聖壽萬年曆) show that towards the end of the Ming period, there were new thoughts in Chinese astronomy that prepared the reception of Western astronomy brought to China by Jesuit missionaries.
The book is found in the series Jifu congshu 畿輔叢書, Siku quanshu 四庫全書 and Congshu jicheng chubian 叢書集成初編.