Ignore:
Timestamp:
Jun 15, 2004, 6:54:12 PM (21 years ago)
Author:
cmv
Message:

nouvelle version de xephem/libastro (3.6) cmv 15/6/04

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaExt/XephemAstroLib/twobody.c

    r1719 r2551  
    2222 
    2323/* Constants used when solving Kepler's equation */
     24#undef  EPSILON
    2425#define EPSILON   3E-8
     26#undef  INFINITY
    2527#define INFINITY  1E+10
    2628 
    2729/* Math constants */
     30#undef  PI
    2831#define PI      3.14159265358979323846
    2932#define RADEG   ( 180.0 / PI )
     
    125128 
    126129 
    127 void vrc( double *v, double *r, double tp, double e, double q )
     130/* return 0 if ok, else -1 */
     131int vrc( double *v, double *r, double tp, double e, double q )
    128132/*
    129133 * Elliptic, hyperbolic and near-parabolic orbits:
     
    145149        *v = 0.0;
    146150        *r = q;
    147         return;
     151        return 0;
    148152    }
    149153 
     
    176180                printf( "\nNear-parabolic orbit: inaccurate result."
    177181                        "\n  e = %f, lambda = %f, w = %f", e, lambda, w );
    178                 exit(1);
     182                return -1;
    179183            }
    180184            else
     
    202206        *v = 2.0 * atand(w);
    203207        *r = q * (1+w2) / ( 1.0 + w2*lambda );
    204         return;  /* Near-parabolic orbit */
     208        return 0;  /* Near-parabolic orbit */
    205209    }
    206210 
     
    232236        *r = q * (1.0+e) / ( 1.0 + e*cosd(*v) );
    233237    }
     238    return 0;
    234239 
    235240} /* vrc */
    236241
    237242/* For RCS Only -- Do Not Edit */
    238 static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: twobody.c,v $ $Date: 2001-10-22 12:08:28 $ $Revision: 1.1 $ $Name: not supported by cvs2svn $"};
     243static 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.