Index: /trunk/psLib/src/astro/psEarthOrientation.c
===================================================================
--- /trunk/psLib/src/astro/psEarthOrientation.c	(revision 5465)
+++ /trunk/psLib/src/astro/psEarthOrientation.c	(revision 5466)
@@ -9,6 +9,6 @@
 *  @author Robert Daniel DeSonia, MHPCC
 *
-*  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-11-02 01:07:25 $
+*  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-11-03 04:31:22 $
 *
 *  Copyright 2005 Maui High Performance Computing Center, University of Hawaii
@@ -288,12 +288,13 @@
 }
 
-
+/*
 double psEOC_ParallaxFactor(const psSphere *coords,
                             const psTime *time)
 {
-
-
+ 
+ 
     return NAN;
 }
+*/
 
 psEarthPole *psEOC_PrecessionModel(const psTime *time)
@@ -455,5 +456,19 @@
 psSphereRot* psSphereRot_TEOtoCEO(const psTime *time)
 {
-    return NULL;
+    PS_ASSERT_PTR_NON_NULL(time,NULL);
+    psTime *in = psTimeAlloc(time->type);
+    *in = *time;
+    if (in->type != PS_TIME_UT1) {
+        in = psTimeConvert(in, PS_TIME_UT1);
+    }
+    double T = (double)(in->sec) + (double)(in->nsec / 1e9);
+    printf("\nThe Value of T is = %.13g\n", T);
+    T += -2451545.0;
+    printf("\nThe Value of T is = %.13g\n", T);
+    double theta = 2.0 * M_PI * (0.7790572732640 + 1.00273781191135448 * T);
+    psSphereRot *out = psSphereRotInvert(theta, 0.0, 0.0);
+
+    psFree(in);
+    return out;
 }
 
Index: /trunk/psLib/src/astro/psEarthOrientation.h
===================================================================
--- /trunk/psLib/src/astro/psEarthOrientation.h	(revision 5465)
+++ /trunk/psLib/src/astro/psEarthOrientation.h	(revision 5466)
@@ -9,6 +9,6 @@
 *  @author Robert Daniel DeSonia, MHPCC
 *
-*  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-11-02 01:07:25 $
+*  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-11-03 04:31:22 $
 *
 *  Copyright 2005 Maui High Performance Computing Center, University of Hawaii
@@ -77,12 +77,15 @@
 );
 
-/** Calculate the parallax factor for the given position and time.
+
+/* Calculate the parallax factor for the given position and time.
  *
  *  @return double:     the calculated parallax factor.
  */
+/*
 double psEOC_ParallaxFactor(
     const psSphere *coords,            ///< specified position
     const psTime *time                 ///< specified time
 );
+*/
 
 /** Calculates the components of the rotation between the CEO and GCRS frames, X, Y,
Index: /trunk/psLib/src/astro/psTime.h
===================================================================
--- /trunk/psLib/src/astro/psTime.h	(revision 5465)
+++ /trunk/psLib/src/astro/psTime.h	(revision 5466)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-09-21 21:37:20 $
+ *  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-11-03 04:31:22 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -139,7 +139,7 @@
 );
 
-/** Convert psTime to UTC or TAI time.
- *
- *  Converts psTime to UTC or TAI time based on the psTimeType argument.
+/** Convert psTime to UTC, TAI, UT1, or TT time.
+ *
+ *  Converts psTime to UTC, TAI, UT1, or TT time based on the psTimeType argument.
  *
  *  @return  psTime*: Pointer to psTime.
Index: /trunk/psLib/test/astro/tst_psEarthOrientation.c
===================================================================
--- /trunk/psLib/test/astro/tst_psEarthOrientation.c	(revision 5465)
+++ /trunk/psLib/test/astro/tst_psEarthOrientation.c	(revision 5466)
@@ -5,6 +5,6 @@
 *  @author d-Rob, MHPCC
 *
-*  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-11-02 01:07:25 $
+*  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-11-03 04:31:22 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -14,5 +14,5 @@
 #include "pslib_strict.h"
 
-static psS32 testEOCParallax(void);
+//static psS32 testEOCParallax(void);
 static psS32 testAberration(void);
 static psS32 testGravityDeflect(void);
@@ -20,14 +20,18 @@
 static psS32 testEOCPolar(void);
 static psS32 testEOCNutation(void);
-static psS32 testSphereRotTransforms(void);
+static psS32 testSphereRot_TEOtoCEO(void);
+static psS32 testSphereRot_CEOtoGCRS(void);
+static psS32 testSphereRot_ITRStoTEO(void);
 
 testDescription tests[] = {
                               {testAberration, 666, "psAberration()", 0, false},
                               {testGravityDeflect, 667, "psGravityDeflect()", 0, false},
-                              {testEOCParallax, 668, "psEOCParallax()", 0, false},
+                              //                              {testEOCParallax, 668, "psEOCParallax()", 0, false},
                               {testEOCPrecession, 669, "psEOCPrecession()", 0, false},
                               {testEOCPolar, 670, "psEOCPolar()", 0, false},
                               {testEOCNutation, 671, "psEOCNutation()", 0, false},
-                              {testSphereRotTransforms, 672, "psSphereRotTransforms()", 0, false},
+                              {testSphereRot_TEOtoCEO, 672, "psSphereRot_TEOtoCEO()", 0, false},
+                              {testSphereRot_CEOtoGCRS, 673, "psSphereRot_CEOtoGCRS()", 0, false},
+                              {testSphereRot_ITRStoTEO, 674, "psSphereRRot_ITRStoTEO()", 0, false},
                               {NULL}
                           };
@@ -37,5 +41,17 @@
     psLogSetLevel( PS_LOG_INFO );
 
-    return ( ! runTestSuite( stderr, "psEarthOrientation", tests, argc, argv ) );
+    // Initialize library internal structures
+    psLibInit("pslib.config");
+
+    if( !runTestSuite(stderr,"psEarthOrientation",tests,argc,argv)) {
+        return 1;
+    }
+
+    // Cleanup library
+    psLibFinalize();
+
+    return 0;
+
+    //    return ( ! runTestSuite( stderr, "psEarthOrientation", tests, argc, argv ) );
 }
 
@@ -113,10 +129,4 @@
 }
 
-psS32 testEOCParallax(void)
-{
-
-    return 0;
-}
-
 psS32 testEOCPrecession(void)
 {
@@ -137,8 +147,26 @@
 }
 
-psS32 testSphereRotTransforms(void)
+psS32 testSphereRot_TEOtoCEO(void)
 {
+    psTime *now = psTimeAlloc(PS_TIME_UT1);
+    now->sec = 1128530000;
+    now->nsec = 931154510;
+    psSphereRot *teoceo = psSphereRot_TEOtoCEO(now);
+    printf("Output sphere rotation = %lf,%lf,%lf,%lf\n",
+           teoceo->q0, teoceo->q1, teoceo->q2, teoceo->q3);
 
+    psFree(now);
+    psFree(teoceo);
     return 0;
 }
 
+psS32 testSphereRot_CEOtoGCRS(void)
+{
+    return 0;
+}
+
+psS32 testSphereRot_ITRStoTEO(void)
+{
+    return 0;
+}
+
