Index: trunk/psLib/test/astro/tst_psEarthOrientation.c
===================================================================
--- trunk/psLib/test/astro/tst_psEarthOrientation.c	(revision 5580)
+++ trunk/psLib/test/astro/tst_psEarthOrientation.c	(revision 5626)
@@ -5,6 +5,6 @@
 *  @author d-Rob, MHPCC
 *
-*  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-11-17 04:04:30 $
+*  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-11-30 02:17:17 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -102,11 +102,24 @@
     psSphere *actual = psSphereAlloc();
     psSphere *apparent = NULL;
-    psSphere *sun = psSphereAlloc();
+    //    psSphere *sun = psSphereAlloc();
     psSphere *empty = NULL;
 
-    sun->r = 0.2;
-    sun->d = 0.2;
-    actual->r = 0.61001;
-    actual->d = 0.01999;
+    //    sun->r = 0.2;
+    //    sun->d = 0.2;
+    //    actual->r = 0.61001;
+    //    actual->d = 0.01999;
+    actual->r = DEG_TO_RAD(122.9153182445501);
+    actual->d = DEG_TO_RAD(48.562968978679194);
+    psCube *sunCube = psCubeAlloc();
+    sunCube->x = 1.467797790127511e11;
+    sunCube->y = 2.5880956908748722e10;
+    sunCube->z = 1.1220046291457653e10;
+    //    double sum = sqrt(sunCube->x*sunCube->x + sunCube->y*sunCube->y + sunCube->z*sunCube->z);
+    //    sunCube->x = sunCube->x/sum;
+    //    sunCube->y = sunCube->y/sum;
+    //    sunCube->z = sunCube->z/sum;
+    //    printf("\n <<<<SUNvec = x,y,z = %.13g, %.13g %.13g", sunCube->x, sunCube->y, sunCube->z);
+    psSphere *sun = psCubeToSphere(sunCube);
+    printf("\n <<<<SUN = r,d = %.13g, %.13g\n", sun->r, sun->d);
 
     empty = psGravityDeflection(apparent, empty, sun);
@@ -123,8 +136,16 @@
     }
 
-    apparent = psGravityDeflection(apparent, actual, sun);
+    apparent = psGravityDeflection(NULL, actual, sun);
     psSphere *result = psSphereSetOffset(actual, apparent, PS_SPHERICAL, PS_RADIAN);
     printf("\nActual r,d = %.13g,%.13g    Apparent r,d = %.16g, %.16g \n",
            actual->r, actual->d, result->r, result->d);
+    psCube *outCube = psSphereToCube(result);
+    printf(" -- outCube = x,y,z = %.13g, %.13g, %.13g  -- \n", outCube->x, outCube->y, outCube->z);
+    psFree(outCube);
+    psCube *outCube2 = psSphereToCube(apparent);
+    printf(" -- outCube = x,y,z = %.13g, %.13g, %.13g  -- \n", outCube2->x, outCube2->y, outCube2->z);
+    psFree(outCube2);
+    psFree(sunCube);
+
     psFree(result);
     psFree(actual);
Index: trunk/psLib/test/astro/tst_psSphereOps.c
===================================================================
--- trunk/psLib/test/astro/tst_psSphereOps.c	(revision 5580)
+++ trunk/psLib/test/astro/tst_psSphereOps.c	(revision 5626)
@@ -5,6 +5,6 @@
 *  @author d-Rob, MHPCC
 *
-*  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-11-15 00:04:30 $
+*  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-11-30 02:17:17 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -494,8 +494,8 @@
         }
     */
-    output->r *= -1.0;
-    output->d *= -1.0;
+    //    output->r *= -1.0;
+    //    output->d *= -1.0;
     empty = psSphereGetOffset(origin, output, PS_LINEAR, PS_RADIAN);
-    if ( fabs(offset->r - empty->r) > 0.0001 || abs(offset->d - empty->r) > 0.0001 ) {
+    if ( fabs(offset->r - empty->r) > 0.0001 || fabs(offset->d - empty->d) > 0.0001 ) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, false,
                 "psSphereGetOffset failed to return correct linear offset values.\n");
Index: trunk/psLib/test/astro/verified/tst_psEarthOrientation.stdout
===================================================================
--- trunk/psLib/test/astro/verified/tst_psEarthOrientation.stdout	(revision 5580)
+++ trunk/psLib/test/astro/verified/tst_psEarthOrientation.stdout	(revision 5626)
@@ -1,6 +1,19 @@
 
-apparent = r,d  = 1.0900423, 0.75502353
+apparent = r,d  = 0.65340071, 0.2463343
 
-Actual r,d = 0.61001,0.01999    Apparent r,d = 0.6100100000001365, 0.01999000000006505 
+ <<<<SUN = r,d = 0.1745310859793, 0.0751383461293
+
+ Actual sphere = 2.145277004504, 0.8475837032218
+ Actual cube = -0.3596195125758, 0.5555613903456, 0.7496834983725 
+
+ SUN sphere = 0.1745310859793, 0.0751383461293
+ SUN cube = 0.9820293796219, 0.1731564131522, 0.0750676637684 
+ New sphere = 2.145277004504, 0.8475837032218
+ Theta = -0.2006809204081    r0 = -30431058247.35   deflection = -1.941413573621e-07 
+        deflection = -9.412238611831e-13  Theta=1.888856707723e-13    Phi = -9.220762225745e-13 
+
+Actual r,d = 2.145277004504,0.8475837032218    Apparent r,d = 2.145277004504245, 0.8475837032208979 
+ -- outCube = x,y,z = -0.3596195125763, 0.5555613903461, 0.7496834983719  -- 
+ -- outCube = x,y,z = 1, 1.888856707723e-13, -9.220762225745e-13  -- 
 Precession Model output = x,y,s = 1.1557751e+08, 8865375.4, -5.1231901e+14
 
