Changeset 2551 in Sophya for trunk/SophyaExt/XephemAstroLib/reduce.c
- Timestamp:
- Jun 15, 2004, 6:54:12 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaExt/XephemAstroLib/reduce.c
r1719 r2551 1 1 #include <math.h> 2 2 3 #include "P_.h" 3 #include <stdio.h> 4 4 5 #include "astro.h" 5 6 6 /* convert those orbital elements that change from epoch mj d0 to epoch mjd.7 /* convert those orbital elements that change from epoch mj0 to epoch mj. 7 8 */ 8 9 void 9 reduce_elements ( mjd0, mjd, inc0, ap0, om0, inc, ap, om)10 double mj d0;/* initial epoch */11 double mj d;/* desired epoch */12 double inc0 ;/* initial inclination, rads */13 double ap0 ; /* initial argument of perihelion, as an mjd*/14 double om0 ;/* initial long of ascending node, rads */15 double *inc ; /* desiredinclination, rads */16 double *ap ; /* desired epoch of perihelion, as an mjd*/17 double *om ; /* desiredlong of ascending node, rads */10 reduce_elements ( 11 double mj0, /* initial epoch */ 12 double mj, /* desired epoch */ 13 double inc0, /* initial inclination, rads */ 14 double ap0, /* initial argument of perihelion, as an mj */ 15 double om0, /* initial long of ascending node, rads */ 16 double *inc, /* resultant inclination, rads */ 17 double *ap, /* resultant arg of perihelion, as an mj */ 18 double *om) /* resultant long of ascending node, rads */ 18 19 { 19 20 double t0, t1; … … 26 27 double seta, ceta; 27 28 28 if (fabs(mj d - mjd0) < 1e-5) {29 if (fabs(mj - mj0) < 1e-5) { 29 30 /* sin(eta) blows for inc < 10 degrees -- anyway, no need */ 30 31 *inc = inc0; … … 34 35 } 35 36 36 t0 = mj d0/365250.0;37 t1 = mj d/365250.0;37 t0 = mj0/365250.0; 38 t1 = mj/365250.0; 38 39 39 40 tt = t1-t0; … … 75 76 76 77 /* For RCS Only -- Do Not Edit */ 77 static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: reduce.c,v $ $Date: 200 1-10-22 12:08:27 $ $Revision: 1.2$ $Name: not supported by cvs2svn $"};78 static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: reduce.c,v $ $Date: 2004-06-15 16:52:40 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
Note:
See TracChangeset
for help on using the changeset viewer.