天文算法--力学时与世界时

这篇文章介绍了Java类DeltaT,它包含了计算世界时UT与力学时TD之间差值DeltaT的方法,包括不同历史时期的估算公式,如Stephenson-Morrison表达式和Schmadel-Zech多项式。这些函数用于处理天文和历法计算中不均匀的时间转换。
摘要由CSDN通过智能技术生成
package cn.ancony.chinese_calendar;

/**
 * UT: 世界时,不均匀。基于地球自转。涉及地方时角,对于日常生活及与天文计算必需用到 UT。
 * 均匀时间系统:
 * 发展:ET(历书时),基于行星运动。-> 1984年被力学时(由原子钟定义)取代。
 * <p>
 * TD:力学时。严格来说,TD分为TDB(太阳系质心力学时)和TDT(地心力学时),
 * TDB和TDT最多相差0.0017秒。这里忽略,将TDB和TDT统称为TD。
 * TD和UT之间的精确值(ΔT = TD - UT)只能由天文观测值推算。
 * <p>
 * 1620-现在 是有观测值的。除此之外,需要推测近似值。
 */
public class DeltaT {

    /**
     * 对于 {@code deltaT} 以外的历元,使用如下表达式计算deltaT的近似值。
     * Stephenson 和 Morrison 给出的推算以往年代ΔT的表达式,用于计算deltaT。
     * <p>
     * 也可以写为:ΔT = -15 + 0.00325(year-1810)^2 (year可以带小数)
     * 或者 ΔT = -15 + (JD-2382148)^2/41048480 (JD为儒略日)
     *
     * @param t 自 2000.0 起算的世纪数。注意不是儒略世纪数。
     * @return deltaT, 单位秒
     */
    public static double evaluate(double t) {
        return 102.3 + t * (123.5 + 32.5 * t);
    }

    /**
     * Stephenson 和 Morrison 给出的推算以往年代ΔT的表达式(1984年),用于计算deltaT。
     * <p>
     * -390 年至 +948 年。ΔT 的单位是秒。
     *
     * @param t 自 1800.0 起算的儒略世纪数。
     * @return deltaT, 单位秒
     */
    public static double shFromNeg390To948(double t) {
        return 1360 + t * (320 + t * 44.3);
    }

    /**
     * Stephenson 和 Morrison 给出的推算以往年代ΔT的表达式(1984年),用于计算deltaT。
     * <p>
     * +948 年至 +1600 年。ΔT 的单位是秒。
     *
     * @param t 自 1800.0 起算的儒略世纪数。
     * @return deltaT, 单位秒
     */
    public static double shFromPos948To1600(double t) {
        return 25.5 * t * t;
    }

    /**
     * 1986年,Stephenson 和 Houlden 给出的推算以往年代ΔT的表达式,用于计算deltaT。
     * <p>
     * 公元 948 年以前。ΔT 的单位是秒。
     * 除了代码中的公式,还可以写为:ΔT = 1830 - E*(405 - 46.5*E),(E 为从公元
     * 948 年算起的世纪数)
     *
     * @param t 自 2000.0 起算的儒略世纪数。t<0
     * @return deltaT, 单位秒。
     */
    public static double shBefore948(double t) {
        return 2715.6 + t * (573.36 + t * 46.6);
    }

    /**
     * 1986年,Stephenson 和 Houlden 给出的推算以往年代ΔT的表达式,用于计算deltaT。
     * <p>
     * 公元 948 年至 1600 年。ΔT 的单位是秒。
     * 除了代码中的公式,还可以写为:ΔT = 22.5 * t * t,(t为从公元 1850 年算起的世纪数)
     *
     * @param t 自 2000.0 起算的儒略世纪数。t<0
     * @return deltaT, 单位秒。
     */
    public static double shFrom948To1600(double t) {
        return 50.6 + t * (67.5 + t * 22.5);
    }

    /**
     * Schmadel与Zech的多项表达式,用于计算deltaT。
     * <p>
     * 1800-1988 年范围内有效.ΔT 的单位是天, 与 {@code  deltaT} 最大误差 1.9 秒
     *
     * @param theta 自 1900.0 起算的儒略世纪数。
     * @return deltaT, 单位天。
     */
    public static double szFrom1800To1988(double theta) {
        return -0.000014
                + theta * (0.001148
                + theta * (0.003357
                - theta * (0.012462
                - theta * (0.022542
                + theta * (0.062971
                + theta * (0.079441
                - theta * (0.146960
                - theta * (0.149279
                + theta * (0.161416
                + theta * (0.145932
                - theta * (0.067471
                - theta * 0.058091)))))))))));
    }

    /**
     * Schmadel与Zech提供的较短时间范围的表达式(一)
     * <p>
     * 1800-1899 年范围内有效.ΔT 的单位是天, 与 {@code  deltaT} 最大误差 1.0 秒
     *
     * @param theta 自 1900.0 起算的儒略世纪数。
     * @return deltaT, 单位天。
     */
    public static double szFrom1800To1899(double theta) {
        return -0.000009
                + theta * (0.003844
                + theta * (0.083563
                + theta * (0.865736
                + theta * (4.867575
                + theta * (15.845535
                + theta * (31.332267
                + theta * (38.291999
                + theta * (28.316289
                + theta * (11.636204
                + theta * 2.043794)))))))));
    }

    /**
     * Schmadel与Zech提供的较短时间范围的表达式(二)
     * <p>
     * 1900-1987 年范围内有效.ΔT 的单位是天,与 {@code  deltaT} 最大误差 1.0 秒
     *
     * @param theta 自 1900.0 起算的儒略世纪数。
     * @return deltaT, 单位天
     */
    public static double szFrom1900To1987(double theta) {
        return -0.000020
                + theta * (0.000297
                + theta * (0.025184
                - theta * (0.181133
                + theta * (0.553040
                - theta * (0.861938
                + theta * (0.677066
                - theta * 0.212591))))));
    }

    /**
     * 力学时与世界时之间的精确差值ΔT=TD-UT,以下是从1620年年首~1992年年首的ΔT值,
     * 间隔两年,第一个值代表1620年年首的,第二个值代表1622年年首的,...
     * 除最后两个值外,其他的均取自1988年的《天文年历》。每行20个值。共187个值。
     * 对应《天文算法》中的表9.A
     * <p>
     * 注意:公元1871~1901年之间的ΔT值为负。值得注意的是,无论对遥远的过去还是遥远
     * 的将来,ΔT的值都是正的。
     * <p>
     * 除了1871~1901年,世界时总是落后于相同的数值力学时。比如 1990 年 1 月 27 日
     * 0 时 UT,比 1990 年 1 月 27 日 TD 落后 57 秒,那么,我们有 UT = TD –ΔT。
     */
    public static double[] deltaT = {
            124, 115, 106, 98, 91, 85, 79, 74, 70, 65, 62, 58, 55, 53, 50, 48, 46, 44, 42, 40,
            37, 35, 33, 31, 28, 26, 24, 22, 20, 18, 16, 14, 13, 12, 11, 10, 9, 9, 9, 9,
            9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12,
            12, 12, 13, 13, 13, 13, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17,
            17, 17, 17, 17, 17, 17, 16, 16, 15, 14, 13.7, 13.1, 12.7, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.3,
            12, 11.4, 10.6, 9.6, 8.6, 7.5, 6.6, 6, 5.7, 5.6, 5.7, 5.9, 6.2, 6.5, 6.8, 7.1, 7.3, 7.5, 7.7, 7.8,
            7.9, 7.5, 6.4, 5.4, 2.9, 1.6, -1, -2.7, -3.6, -4.7, -5.4, -5.2, -5.5, -5.6, -5.8, -5.9, -6.2, -6.4, -6.1, -4.7,
            -2.7, 0, 2.6, 5.4, 7.7, 10.5, 13.4, 16, 18.2, 20.2, 21.2, 22.4, 23.5, 23.9, 24.3, 24, 23.9, 23.9, 23.7, 24,
            24.3, 25.3, 26.2, 27.3, 28.2, 29.1, 30, 30.7, 31.4, 32.2, 33.1, 34, 35, 36.5, 38.3, 40.2, 42.2, 44.5, 46.5, 48.5,
            50.5, 52.2, 53.8, 54.9, 55.8, 56.9, 58.3};
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值