Index: trunk/psLib/test/astro/tst_psEarthOrientation.c
===================================================================
--- trunk/psLib/test/astro/tst_psEarthOrientation.c	(revision 5814)
+++ trunk/psLib/test/astro/tst_psEarthOrientation.c	(revision 5824)
@@ -5,6 +5,6 @@
 *  @author d-Rob, MHPCC
 *
-*  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-12-20 05:05:37 $
+*  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-12-21 06:15:58 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -363,4 +363,49 @@
     }
 
+    pcorr->x = 2.857175590089105e-4;
+    pcorr->y = 2.3968739377734732e-5;
+    pcorr->s = -1.3970066457904322e-8;
+    //    pcorr->x += 3.05224300720406e-7;
+    //    pcorr->y += -1.39441339235822e-7;
+    double q0, q1, q2;
+    q0 = -1.1984522406756289e-5;
+    q1 = 1.4285893358610674e-4;
+    q2 = 1.2191193518914336e-10;
+    psSphereRot *pni = psSphereRot_CEOtoGCRS(pcorr);
+    if (fabs(pni->q0-q0) > FLT_EPSILON || fabs(pni->q1-q1) > FLT_EPSILON ||
+            fabs(pni->q2-q2) > FLT_EPSILON ) {
+        printf("\n Error at CEOtoGCRS, output psSphereRot doesn't match expected.\n");
+    }
+    printf("\n  Output sphere rotation   = %.13g,%.13g,%.13g,%.13g\n",
+           pni->q0, pni->q1, pni->q2, pni->q3);
+    printf("  Expected sphere rotation = %.13g,%.13g,%.13g\n", q0,q1,q2);
+    psCube *objC = psCubeAlloc();
+    //    objC->x = -3.5963388069046304;
+    //    objC->y = 0.5555192509816625;
+    //    objC->z = 0.7497078321908413;
+    objSetup();
+    psSphereRot *pn = psSphereRotConjugate(NULL, pni);
+    //    psSphere *sphere = psCubeToSphere(objC);
+    psSphere *sphere = psSphereAlloc();
+    *sphere = *obj;
+    psFree(obj);
+    psSphere *result = psSphereRotApply(NULL, pn, sphere);
+    objC->x = -0.3598480726985338;
+    objC->y = 0.5555012823608123;
+    objC->z = 0.7496183628158023;
+    psFree(sphere);
+    sphere = psCubeToSphere(objC);
+    psFree(objC);
+    printf("\n Spheres:  out = %.13g, %.13g,    expect = %.13g, %.13g\n",
+           result->r, result->d, sphere->r, sphere->d);
+    double xx = acos(cos(result->r)*cos(sphere->r)*cos(result->d - sphere->d) + sin(result->r)*sin(sphere->r));
+    printf("GREAT CIRCLE DIFFERENCE = %.13g \n\n", xx);
+
+    psFree(sphere);
+    psFree(result);
+    psFree(pn);
+    //    psFree(obj);
+    psFree(pni);
+
     psFree(pcorr);
 
