Ignore:
Timestamp:
Nov 22, 2006, 2:53:31 PM (19 years ago)
Author:
cmv
Message:

mise en conformite xephem 3.7.2 cmv 22/11/2006

File:
1 edited

Legend:

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

    r2818 r3111  
    3535ab_eq (double mj, double lsn, double *ra, double *dec)
    3636{
     37#if defined(USE_MEEUS_AB_EQ)
     38
     39        /* this claims to account for earth orbit excentricity and is also
     40         * smooth clear to dec=90 but it does not work well backwards with
     41         * ap_as()
     42         */
    3743        ab_aux(mj, ra, dec, lsn, AB_EQ_EOD);
     44
     45#else /* use Montenbruck */
     46
     47        /* this agrees with Meeus to within 0.2 arcsec until dec gets larger
     48         * than about 89.9, then grows to 1as at 89.97. but it works very
     49         * smoothly with ap_as
     50         */
     51        double x, y, z;         /* equatorial rectangular coords */
     52        double vx, vy, vz;      /* aberration velocity in rectangular coords */
     53        double L;               /* helio long of earth */
     54        double cL;
     55        double r;
     56
     57
     58        sphcart (*ra, *dec, 1.0, &x, &y, &z);
     59
     60        L = 2*PI*(0.27908 + 100.00214*(mj-J2000)/36525.0);
     61        cL = cos(L);
     62        vx = -0.994e-4*sin(L);
     63        vy = 0.912e-4*cL;
     64        vz = 0.395e-4*cL;
     65        x += vx;
     66        y += vy;
     67        z += vz;
     68
     69        cartsph (x, y, z, ra, dec, &r);
     70
     71#endif
    3872}
    3973
     
    111145               
    112146                *ra += dra;
    113                 range (ra, 2*PI);
    114147                *dec += ddec;
     148                radecrange (ra, dec);
    115149            }
    116150            break;
     
    125159
    126160/* For RCS Only -- Do Not Edit */
    127 static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: aberration.c,v $ $Date: 2005-08-21 10:02:36 $ $Revision: 1.5 $ $Name: not supported by cvs2svn $"};
     161static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: aberration.c,v $ $Date: 2006-11-22 13:53:27 $ $Revision: 1.6 $ $Name: not supported by cvs2svn $"};
Note: See TracChangeset for help on using the changeset viewer.