Index: trunk/psLib/src/astro/psEarthOrientation.c
===================================================================
--- trunk/psLib/src/astro/psEarthOrientation.c	(revision 5642)
+++ trunk/psLib/src/astro/psEarthOrientation.c	(revision 5657)
@@ -8,6 +8,6 @@
  *  @author Robert Daniel DeSonia, MHPCC
  *
- *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-11-30 23:50:40 $
+ *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-12-02 04:40:00 $
  *
  *  Copyright 2005 Maui High Performance Computing Center, University of Hawaii
@@ -302,16 +302,7 @@
     // calculating the apparent angle from the actual angle and the sun position
 
-    // first, calculate the angle between the sun vector and the actual vector
-
-    // Moving to cartesian first:  XXX -- is this required?
     psCube* sunVector = psSphereToCube(sun);
     psCube* actualVector = psSphereToCube(actual);
-    printf("\n Actual sphere = %.13g, %.13g", actual->r, actual->d);
-    printf("\n Actual cube = %.13g, %.13g, %.13g \n", actualVector->x, actualVector->y, actualVector->z);
-    printf("\n SUN sphere = %.13g, %.13g", sun->r, sun->d);
-    printf("\n SUN cube = %.13g, %.13g, %.13g \n", sunVector->x, sunVector->y, sunVector->z);
-    psSphere *new = psCubeToSphere(actualVector);
-    printf(" New sphere = %.13g, %.13g", new->r, new->d);
-    psFree(new);
+
     // use dot product to calculate the angle of separation
     // N.B., assuming the psSphereToCube function returns a unit vector.
@@ -320,9 +311,7 @@
                     sunVector->y*actualVector->y +
                     sunVector->z*actualVector->z);
-    printf("\n Theta = %.13g ", theta);
     double r0 = PS_AU * tan(theta);
-    printf("   r0 = %.13g", r0);
     double deflection = 4.0*PS_G*PS_M/(PS_C0*PS_C0*r0);
-    printf("   deflection = %.13g \n", deflection);
+
     // make sure the deflection is not greater than 1.75 arcsec
     double limit = SEC_TO_RAD(1.75);
@@ -352,8 +341,6 @@
     deflection = SEC_TO_RAD(deflection);
     theta = atan(r0/PS_AU) * tan(deflection);
-    printf("        deflection = %.13g  Theta=%.13g ", deflection, theta);
     //    phi = sqrt( deflection*deflection - theta*theta );
     phi = deflection * cos(asin(theta/deflection));
-    printf("   Phi = %.13g \n", phi);
     apparent->r = theta;
     apparent->d = phi;
@@ -726,11 +713,10 @@
         in = psTimeConvert(in, PS_TIME_UT1);
     }
-    double T = (double)(in->sec) + (double)(in->nsec / 1e9);
-    printf("\nThe Value of T is = %.19g\n", T);
+    //    double T = (double)(in->sec) + (double)(in->nsec / 1e9);
+    double T = psTimeToJD(in);
     T += -2451545.0;
     double theta = 2.0 * M_PI * (0.7790572732640 + 1.00273781191135448 * T);
-    printf("\nThe Value of theta is = %.13g\n", theta);
+    psSphereRot *out = psSphereRotAlloc(theta, 0.0, 0.0);
     //    psSphereRot *out = psSphereRotInvert(theta, 0.0, 0.0);
-    psSphereRot *out = psSphereRotInvert(theta, 0.0, 0.0);
 
     psFree(in);
