tdb.c
来自「c源码」· C语言 代码 · 共 51 行
C
51 行
/* Find Barycentric Dynamical Time from Terrestrial Dynamical Time. Reference: Astronomical Almanac, page B5. *//* radians per arc second */#define STR 4.8481368110953599359e-6/* 2000 January 1.5 */#define J2000 2451545.0#if __STDC__double sin (double);double floor (double);#elsedouble sin(), floor();#endif/* Argument JED is a Julian date, in TDT. Output is the corresponding date in TDB. */double tdb(JED)double JED;{double M, T;/* Find time T in Julian centuries from J2000. */T = (JED - J2000)/36525.0;/* Mean anomaly of sun = l' (J. Laskar) */M = 129596581.038354 * T + 1287104.76154;/* Reduce arc seconds mod 360 degrees. */M = M - 1296000.0 * floor( M/1296000.0 );M += (((((((( 1.62e-20 * T- 1.0390e-17 ) * T- 3.83508e-15 ) * T+ 4.237343e-13 ) * T+ 8.8555011e-11 ) * T- 4.77258489e-8 ) * T- 1.1297037031e-5 ) * T+ 1.4732069041e-4 ) * T- 0.552891801772 ) * T * T;M *= STR;/* TDB - TDT, in seconds. */T = 0.001658 * sin(M) + 0.000014 * sin(M+M);T = JED + T / 86400.0;return(T);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?