Changeset 2551 in Sophya for trunk/SophyaExt/XephemAstroLib/deltat.c
- Timestamp:
- Jun 15, 2004, 6:54:12 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaExt/XephemAstroLib/deltat.c
r1719 r2551 29 29 * in 2130. 30 30 * 31 * Input is mj d(modified julian date from MJD0 on). [stern]32 * Note that xephem uses a different epoch for this "mj d" than the31 * Input is mj (modified julian date from MJD0 on). [stern] 32 * Note that xephem uses a different epoch for this "mj" than the 33 33 * normal value of JD=240000.5. 34 34 * See AA page B4. 35 35 * 36 * Output double deltat(mj d) is ET-UT1 in seconds.36 * Output double deltat(mj) is ET-UT1 in seconds. 37 37 * 38 38 * … … 67 67 * - adopted #include's for xephem 68 68 * - made dt[] static 69 * - made mj dthe time argument [was: year Y].69 * - made mj the time argument [was: year Y]. 70 70 * - updated observed and extrapolated data from tables at 71 71 * ftp://maia.usno.navy.mil/ser7/ -- data deviated by up to 0.8 s … … 74 74 * - replaced treatment after TABEND by linear extrapolation instead 75 75 * of second order version 76 * - installed lastmj dcache (made ans static)76 * - installed lastmj cache (made ans static) 77 77 * 78 78 * - no changes to table interpolation scheme and past extrapolations */ 79 79 80 #include "P_.h" 80 #include <math.h> 81 81 82 #include "astro.h" 82 83 … … 161 162 * of the Earth rotation rate in the ET time scale. 162 163 */ 163 double deltat(mjd) 164 double mjd; 164 double deltat(double mj) 165 165 { 166 166 double Y; … … 168 168 int d[6]; 169 169 int i, iy, k; 170 double floor();171 170 static double ans; 172 static double lastmj d= -10000;173 174 if (mj d == lastmjd) {171 static double lastmj = -10000; 172 173 if (mj == lastmj) { 175 174 return(ans); 176 175 } 177 lastmj d = mjd;178 179 Y = 2000.0 + (mj d- J2000)/365.25;176 lastmj = mj; 177 178 Y = 2000.0 + (mj - J2000)/365.25; 180 179 181 180 if( Y > TABEND && Y < 2130.0 ) { … … 305 304 306 305 /* For RCS Only -- Do Not Edit */ 307 static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: deltat.c,v $ $Date: 200 1-10-22 12:08:26 $ $Revision: 1.2$ $Name: not supported by cvs2svn $"};306 static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: deltat.c,v $ $Date: 2004-06-15 16:52:38 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
Note:
See TracChangeset
for help on using the changeset viewer.