Changeset 1719 in Sophya for trunk/SophyaExt/XephemAstroLib/eq_ecl.c
- Timestamp:
- Oct 22, 2001, 2:08:28 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaExt/XephemAstroLib/eq_ecl.c
r1457 r1719 51 51 static double lastmjd = -10000; /* last mjd calculated */ 52 52 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; 54 54 55 55 if (mjd != lastmjd) { … … 67 67 cx = cos(x); 68 68 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); 72 73 *p = atan(((sx*ceps)+(ty*seps*sw))/cx); 73 74 if (cx<0) *p += PI; /* account for atan quad ambiguity */ … … 76 77 77 78 /* 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 $"};79 static 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.