solar_terms.js
v0.1.0
Published
solar_terms by js
Downloads
10
Readme
solar_terms.js
二十四节气js实现,采用天文算法,使用VSOP87D进行计算,加入了章动和光行差的修正。
快速使用
const SolarTerms = require("solar_terms.js");
new SolarTerms().getSolarTermsAll(2022).map((UTC) => {
console.log(moment(UTC).format("YYYY-MM-DD HH:mm:ss"));
});
Api
SolarTerms
new SolarTerms({options})
- options.eOp eclipticOptions(参考Ecliptic)
- options.year 指定年,getSolarTermsAll(2022)会覆盖这个配置
- options.deltaT 计算世界时和力学时时是否忽略差值,默认不忽略
- SolarTerms.getSolarTermsAll(year) 获取一年份的节气时间
- SolarTerms.getSolarTerms(year,angel) 获取指定年份,指定黄经对应的儒略日
Ecliptic
new Ecliptic(jd,{options})
- options.nutation nutation配置项,详见nutation.js
- options.integrity VSOP87D数据是否简化,默认是
- options.db VSOP87数据,默认用的是87D.EARTH,可以用别的(用的别的就是算别的天体),计算二十节气用不到别的数据
修正数据说明
VSOP87D-SIMPLE VS VSOP87D-FULL(<> ~ 6S)
<!-- VSOP87D-SIMPLE --> <!-- VSOP87D-FULL -->
2022-01-05 17:13:04 2022-01-05 17:13:00
2022-01-20 10:38:04 2022-01-20 10:38:04
2022-02-04 04:49:43 2022-02-04 04:49:44
2022-02-19 00:41:57 2022-02-19 00:41:58
2022-03-05 22:42:42 2022-03-05 22:42:42
2022-03-20 23:32:21 2022-03-20 23:32:22
2022-04-05 03:19:11 2022-04-05 03:19:11
2022-04-20 10:23:11 2022-04-20 10:23:14
2022-05-05 20:24:53 2022-05-05 20:24:54
2022-05-21 09:21:31 2022-05-21 09:21:32
2022-06-06 00:24:46 2022-06-06 00:24:45
2022-06-21 17:12:51 2022-06-21 17:12:48
2022-07-07 10:37:00 2022-07-07 10:36:57
2022-07-23 04:05:58 2022-07-23 04:05:56
2022-08-07 20:28:08 2022-08-07 20:28:06
2022-08-23 11:15:07 2022-08-23 11:15:07
2022-09-07 23:31:17 2022-09-07 23:31:15
2022-09-23 09:02:42 2022-09-23 09:02:39
2022-10-08 15:21:30 2022-10-08 15:21:24
2022-10-23 18:34:45 2022-10-23 18:34:38
2022-11-07 18:44:30 2022-11-07 18:44:26
2022-11-22 16:19:28 2022-11-22 16:19:26
2022-12-07 11:45:13 2022-12-07 11:45:13
2022-12-22 05:47:09 2022-12-22 05:47:10
IAU1980 VS IAU2000B(< 1s)
<!-- 2000B --> <!-- 1980SIMPLE -->
2022-01-05 17:13:04 2022-01-05 17:13:04
2022-01-20 10:38:04 2022-01-20 10:38:04
2022-02-04 04:49:43 2022-02-04 04:49:43
2022-02-19 00:41:57 2022-02-19 00:41:57
2022-03-05 22:42:42 2022-03-05 22:42:42
2022-03-20 23:32:21 2022-03-20 23:32:21
2022-04-05 03:19:11 2022-04-05 03:19:11
2022-04-20 10:23:11 2022-04-20 10:23:11
2022-05-05 20:24:53 2022-05-05 20:24:53
2022-05-21 09:21:31 2022-05-21 09:21:32
2022-06-06 00:24:46 2022-06-06 00:24:46
2022-06-21 17:12:51 2022-06-21 17:12:51
2022-07-07 10:37:00 2022-07-07 10:37:00
2022-07-23 04:05:58 2022-07-23 04:05:58
2022-08-07 20:28:08 2022-08-07 20:28:08
2022-08-23 11:15:07 2022-08-23 11:15:07
2022-09-07 23:31:17 2022-09-07 23:31:17
2022-09-23 09:02:42 2022-09-23 09:02:42
2022-10-08 15:21:30 2022-10-08 15:21:30
2022-10-23 18:34:45 2022-10-23 18:34:44
2022-11-07 18:44:30 2022-11-07 18:44:30
2022-11-22 16:19:28 2022-11-22 16:19:28
2022-12-07 11:45:13 2022-12-07 11:45:13
2022-12-22 05:47:09 2022-12-22 05:47:08
与官方公布数据差异
基本控制在1~2分钟以内,主要因为世界时和力学时的差值计算公式造成,理论上没有完全合适的公式,差值只能通过观测得到。但是2分钟的差别完全不影响判断节气的日期。