IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 1, 2005, 6:40:00 PM (21 years ago)
Author:
drobbin
Message:

Debugging/Test code updates. Aberration, Gravity, and CEOtoTEO mainly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/astro/psEarthOrientation.c

    r5642 r5657  
    88 *  @author Robert Daniel DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-11-30 23:50:40 $
     10 *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-12-02 04:40:00 $
    1212 *
    1313 *  Copyright 2005 Maui High Performance Computing Center, University of Hawaii
     
    302302    // calculating the apparent angle from the actual angle and the sun position
    303303
    304     // first, calculate the angle between the sun vector and the actual vector
    305 
    306     // Moving to cartesian first:  XXX -- is this required?
    307304    psCube* sunVector = psSphereToCube(sun);
    308305    psCube* actualVector = psSphereToCube(actual);
    309     printf("\n Actual sphere = %.13g, %.13g", actual->r, actual->d);
    310     printf("\n Actual cube = %.13g, %.13g, %.13g \n", actualVector->x, actualVector->y, actualVector->z);
    311     printf("\n SUN sphere = %.13g, %.13g", sun->r, sun->d);
    312     printf("\n SUN cube = %.13g, %.13g, %.13g \n", sunVector->x, sunVector->y, sunVector->z);
    313     psSphere *new = psCubeToSphere(actualVector);
    314     printf(" New sphere = %.13g, %.13g", new->r, new->d);
    315     psFree(new);
     306
    316307    // use dot product to calculate the angle of separation
    317308    // N.B., assuming the psSphereToCube function returns a unit vector.
     
    320311                    sunVector->y*actualVector->y +
    321312                    sunVector->z*actualVector->z);
    322     printf("\n Theta = %.13g ", theta);
    323313    double r0 = PS_AU * tan(theta);
    324     printf("   r0 = %.13g", r0);
    325314    double deflection = 4.0*PS_G*PS_M/(PS_C0*PS_C0*r0);
    326     printf("   deflection = %.13g \n", deflection);
     315
    327316    // make sure the deflection is not greater than 1.75 arcsec
    328317    double limit = SEC_TO_RAD(1.75);
     
    352341    deflection = SEC_TO_RAD(deflection);
    353342    theta = atan(r0/PS_AU) * tan(deflection);
    354     printf("        deflection = %.13g  Theta=%.13g ", deflection, theta);
    355343    //    phi = sqrt( deflection*deflection - theta*theta );
    356344    phi = deflection * cos(asin(theta/deflection));
    357     printf("   Phi = %.13g \n", phi);
    358345    apparent->r = theta;
    359346    apparent->d = phi;
     
    726713        in = psTimeConvert(in, PS_TIME_UT1);
    727714    }
    728     double T = (double)(in->sec) + (double)(in->nsec / 1e9);
    729     printf("\nThe Value of T is = %.19g\n", T);
     715    //    double T = (double)(in->sec) + (double)(in->nsec / 1e9);
     716    double T = psTimeToJD(in);
    730717    T += -2451545.0;
    731718    double theta = 2.0 * M_PI * (0.7790572732640 + 1.00273781191135448 * T);
    732     printf("\nThe Value of theta is = %.13g\n", theta);
     719    psSphereRot *out = psSphereRotAlloc(theta, 0.0, 0.0);
    733720    //    psSphereRot *out = psSphereRotInvert(theta, 0.0, 0.0);
    734     psSphereRot *out = psSphereRotInvert(theta, 0.0, 0.0);
    735721
    736722    psFree(in);
Note: See TracChangeset for help on using the changeset viewer.