Annotation of researchv10no/cmd/sky/aberr.c, revision 1.1.1.1

1.1       root        1: #include "sky.h"
                      2: 
                      3: aberr()
                      4: {
                      5: 
                      6:        double lsun, ljup, lsat;
                      7:        double msun, mven, mjup, msat;
                      8:        double dmoon;
                      9:        double c,d,k,e;
                     10: 
                     11: /*
                     12:        To find the aberration, it is necessary to compute
                     13:        the velocity of the observer in an inertial frame.
                     14: 
                     15:        This program does the computation for the center
                     16:        of the earth w/r the center of mass of the Solar System
                     17:        and includes enough terms to limit the error to
                     18:        about 0".003.
                     19: 
                     20:        uses capt, eday
                     21:        sets xdot, ydot, zdot
                     22: */
                     23: 
                     24:        lsun = 279.696678 + 0.9856473354*eday + .000300*capt2;
                     25:        ljup = 237.942344 + .083129433*eday;
                     26:        lsat = 266.56527 + 0.03351336*eday;
                     27: 
                     28:        msun = 358.475845 + .9856002670*eday - .000150*capt2;
                     29:        mven = 212.603219 + 1.602130154*eday;
                     30:        mjup = 225.22165 + .083085369*eday;
                     31:        msat = 175.47630 + 0.03345972*eday;
                     32:        dmoon = 350.737681+12.1907491914*eday-.001436*capt2;
                     33: 
                     34:        lsun = lsun * radian;
                     35:        ljup = ljup*radian;
                     36:        lsat = lsat*radian;
                     37:        msun = msun*radian;
                     38:        mven = mven*radian;
                     39:        mjup = mjup*radian;
                     40:        msat = msat*radian;
                     41:        dmoon = fmod(dmoon,360.)*radian;
                     42: 
                     43: /*
                     44:        Discover the velocity of the Earth around the Sun.
                     45: */
                     46: 
                     47:        xdot =
                     48:         -20.4916*sin(lsun)
                     49:         - 0.3433*sin(lsun+msun)
                     50:         + 0.0009*capt*sin(lsun+msun)
                     51:         - 0.0065*sin(lsun+2.*msun)
                     52:         - 0.0007*sin(4.159+2.*mven-2.*msun+lsun)
                     53:         - 0.0007*sin(4.7042+msun-mjup+lsun);
                     54: 
                     55:        ydot =
                     56:         20.4901*cos(lsun)
                     57:         + 0.3433*cos(lsun+msun)
                     58:         - 0.0009*capt*cos(lsun+msun)
                     59:         + 0.0065*cos(lsun+2.*msun)
                     60:         + 0.0007*cos(4.159+2.*mven-2.*msun+lsun)
                     61:         + 0.0007*cos(4.7042+msun-mjup+lsun);
                     62: 
                     63: /*
                     64:        Discover the velocity of the Earth around the center
                     65:        of the Earth-Moon system.
                     66: */
                     67: 
                     68:        xdot = xdot
                     69:        - 0.0079*sin(lsun+dmoon);
                     70: 
                     71:        ydot = ydot
                     72:         + 0.0079*cos(lsun+dmoon);
                     73: 
                     74: /*
                     75:  *     Discover the velocity of the sun about the center of mass.
                     76:  */
                     77: 
                     78:        xdot = xdot
                     79:         - 0.0086*sin(ljup)
                     80:         - 0.0004*sin(ljup+mjup)
                     81:         - 0.0019*sin(lsat)
                     82:         - 0.0001*sin(lsat+msat);
                     83: 
                     84:        ydot = ydot
                     85:         + 0.0086*cos(ljup)
                     86:         + 0.0004*cos(ljup+mjup)
                     87:         + 0.0019*cos(lsat)
                     88:         + 0.0001*cos(lsat+msat);
                     89: 
                     90: /*
                     91:  *     Compute aberrational day numbers just for fun.
                     92:  */
                     93: 
                     94:        k = 20.496;
                     95:        e = .01675104 - 4.180e-5*capt - 1.26e-7*capt2;
                     96:        c = -ydot*cos(obliq) - k*e*cos(lsun-msun+pi)*cos(obliq);
                     97:        d = xdot - k*e*sin(lsun-msun+pi);
                     98: 
                     99:        if(flags&GOOBIE){
                    100:                printf("C: %.4f  D: %.4f\n", c, d);
                    101:        }
                    102: 
                    103: /*
                    104:        Convert to absolute velocity (v/c).
                    105: */
                    106: 
                    107:        xdot = xdot * radsec;
                    108:        ydot = ydot * radsec;
                    109:        zdot = 0.;
                    110: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.