worldTimeDiff static method
计算世界时与原子时之差,传入年
@param year 年 @return 计算世界时与原子时之差
Implementation
static double worldTimeDiff(double year) {
int i;
for (i = 0; i < 100; i += 5) if (year < DTS[i + 5] || i == 95) break;
double t1 = (year - DTS[i]) / (DTS[i + 5] - DTS[i]) * 10;
double t2 = t1 * t1;
double t3 = t2 * t1;
return DTS[i + 1] + DTS[i + 2] * t1 + DTS[i + 3] * t2 + DTS[i + 4] * t3;
}