Index: trunk/psLib/src/astro/psEarthOrientation.c
===================================================================
--- trunk/psLib/src/astro/psEarthOrientation.c	(revision 5533)
+++ trunk/psLib/src/astro/psEarthOrientation.c	(revision 5626)
@@ -8,6 +8,6 @@
  *  @author Robert Daniel DeSonia, MHPCC
  *
- *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-11-17 03:59:05 $
+ *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-11-30 02:17:17 $
  *
  *  Copyright 2005 Maui High Performance Computing Center, University of Hawaii
@@ -307,5 +307,11 @@
     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.
@@ -314,8 +320,9 @@
                     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);
@@ -345,6 +352,8 @@
     deflection = SEC_TO_RAD(deflection);
     theta = atan(r0/PS_AU) * tan(deflection);
-    phi = sqrt( deflection*deflection - theta*theta );
-    //    phi = deflection * cos(asin(theta/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;
@@ -950,5 +959,4 @@
     Y = psPolynomial1DEval(yPoly,t);
     for (int i = 0; i < 10; i++) {
-        //        tj = SEC_TO_RAD(pow(t, i));
         tj = pow(t, i);
         arg = w_l[i]*F[0] + w_l_p[i]*F[1] + w_F[i]*F[2] + w_D[i]*F[3] + w_Omega[i]*F[4];
@@ -960,5 +968,5 @@
     pole->x = X;
     pole->y = Y;
-    pole->s = SEC_TO_RAD(4.7e-5) * t;   //XXX:  This conv. should include t?
+    pole->s = SEC_TO_RAD(4.7e-5) * t;
 
     return pole;
