Changeset 2551 in Sophya for trunk/SophyaExt/XephemAstroLib/twobody.c
- Timestamp:
- Jun 15, 2004, 6:54:12 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaExt/XephemAstroLib/twobody.c
r1719 r2551 22 22 23 23 /* Constants used when solving Kepler's equation */ 24 #undef EPSILON 24 25 #define EPSILON 3E-8 26 #undef INFINITY 25 27 #define INFINITY 1E+10 26 28 27 29 /* Math constants */ 30 #undef PI 28 31 #define PI 3.14159265358979323846 29 32 #define RADEG ( 180.0 / PI ) … … 125 128 126 129 127 void vrc( double *v, double *r, double tp, double e, double q ) 130 /* return 0 if ok, else -1 */ 131 int vrc( double *v, double *r, double tp, double e, double q ) 128 132 /* 129 133 * Elliptic, hyperbolic and near-parabolic orbits: … … 145 149 *v = 0.0; 146 150 *r = q; 147 return ;151 return 0; 148 152 } 149 153 … … 176 180 printf( "\nNear-parabolic orbit: inaccurate result." 177 181 "\n e = %f, lambda = %f, w = %f", e, lambda, w ); 178 exit(1);182 return -1; 179 183 } 180 184 else … … 202 206 *v = 2.0 * atand(w); 203 207 *r = q * (1+w2) / ( 1.0 + w2*lambda ); 204 return ; /* Near-parabolic orbit */208 return 0; /* Near-parabolic orbit */ 205 209 } 206 210 … … 232 236 *r = q * (1.0+e) / ( 1.0 + e*cosd(*v) ); 233 237 } 238 return 0; 234 239 235 240 } /* vrc */ 236 241 237 242 /* For RCS Only -- Do Not Edit */ 238 static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: twobody.c,v $ $Date: 200 1-10-22 12:08:28 $ $Revision: 1.1$ $Name: not supported by cvs2svn $"};243 static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: twobody.c,v $ $Date: 2004-06-15 16:52:41 $ $Revision: 1.2 $ $Name: not supported by cvs2svn $"};
Note:
See TracChangeset
for help on using the changeset viewer.