Ignore:
Timestamp:
Oct 22, 2001, 2:08:28 PM (24 years ago)
Author:
cmv
Message:

Adapted to version 3.5 xephem cmv 22/10/2001

File:
1 edited

Legend:

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

    r1457 r1719  
    5151        static double lastmjd = -10000; /* last mjd calculated */
    5252        static double seps, ceps;       /* sin and cos of mean obliquity */
    53         double sx, cx, sy, cy, ty;
     53        double sx, cx, sy, cy, ty, sq;
    5454
    5555        if (mjd != lastmjd) {
     
    6767        cx = cos(x);
    6868        sx = sin(x);
    69         /* modifs CMV *q = asin((sy*ceps)-(cy*seps*sx*sw)); */
    70         *q = (sy*ceps)-(cy*seps*sx*sw);
    71         if(*q<-1.) *q = -PI/2.; else if(*q>1.) *q = PI/2.; else *q = asin(*q);
     69        sq = (sy*ceps)-(cy*seps*sx*sw);
     70        if (sq < -1) sq = -1;
     71        if (sq >  1) sq =  1;
     72        *q = asin(sq);
    7273        *p = atan(((sx*ceps)+(ty*seps*sw))/cx);
    7374        if (cx<0) *p += PI;             /* account for atan quad ambiguity */
     
    7677
    7778/* For RCS Only -- Do Not Edit */
    78 static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: eq_ecl.c,v $ $Date: 2001-04-10 14:40:46 $ $Revision: 1.1.1.1 $ $Name: not supported by cvs2svn $"};
     79static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: eq_ecl.c,v $ $Date: 2001-10-22 12:08:27 $ $Revision: 1.2 $ $Name: not supported by cvs2svn $"};
Note: See TracChangeset for help on using the changeset viewer.