Index: /trunk/psLib/pslib.kdevelop
===================================================================
--- /trunk/psLib/pslib.kdevelop	(revision 5305)
+++ /trunk/psLib/pslib.kdevelop	(revision 5306)
@@ -49,9 +49,4 @@
         <envvar value="1" name="WANT_AUTOMAKE_1_6" />
       </envvars>
-      <abortonerror>false</abortonerror>
-      <numberofjobs>3</numberofjobs>
-      <dontact>false</dontact>
-      <makebin/>
-      <prio>0</prio>
     </make>
   </kdevautoproject>
Index: /trunk/psLib/src/astro/psEarthOrientation.h
===================================================================
--- /trunk/psLib/src/astro/psEarthOrientation.h	(revision 5305)
+++ /trunk/psLib/src/astro/psEarthOrientation.h	(revision 5306)
@@ -8,6 +8,6 @@
 *  @author Robert Daniel DeSonia, MHPCC
 *
-*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-09-13 00:50:04 $
+*  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-10-13 20:23:57 $
 *
 *  Copyright 2005 Maui High Performance Computing Center, University of Hawaii
@@ -21,68 +21,124 @@
 #include "psSphereOps.h"
 
+/**
+ *
+ *
+ */
 typedef struct
 {
-    double x;
-    double y;
-    double s;
+    double x;                          ///<
+    double y;                          ///<
+    double s;                          ///<
 }
 psEarthPole;
 
+/**
+ *
+ *
+ */
 typedef enum {
-    PS_PRECESS_ROUGH,
-    PS_PRECESS_COMPLETE,
-    PS_PRECESS_IAU2000A,
+    PS_PRECESS_ROUGH,                  ///<
+    PS_PRECESS_COMPLETE,               ///<
+    PS_PRECESS_IAU2000A,               ///<
 } psPrecessMethod;
 
+/**
+ *
+ *
+ *
+ */
 psSphere *psAberration(
-    psSphere *apparent,
-    const psSphere *actual,
-    const psSphere *direction,
-    double speed
+    psSphere *apparent,                ///<
+    const psSphere *actual,            ///<
+    const psSphere *direction,         ///<
+    double speed                       ///<
 );
 
+/**
+ *
+ *
+ *
+ */
 psSphere *psGravityDeflection(
-    psSphere *apparent,
-    psSphere *actual,
-    psSphere *sun
+    psSphere *apparent,                ///<
+    psSphere *actual,                  ///<
+    psSphere *sun                      ///<
 );
 
+/**
+ *
+ *
+ */
 double psEOC_ParallaxFactor(
-    const psSphere *coords,
-    const psTime *time
+    const psSphere *coords,            ///<
+    const psTime *time                 ///<
 );
 
+/**
+ *
+ *
+ */
 psEarthPole *psEOC_PrecessionModel(
-    const psTime *time
+    const psTime *time                 ///<
 );
 
+/**
+ *
+ *
+ */
 psEarthPole *psEOC_PrecessionCorr(
-    const psTime *time,
-    psTimeBulletin bulletin
+    const psTime *time,                ///<
+    psTimeBulletin bulletin            ///<
 );
 
+/**
+ *
+ *
+ */
 psSphereRot *psSphereRot_CEOtoGCRS(
-    const psEarthPole *pole
+    const psEarthPole *pole            ///<
 );
 
+/**
+ *
+ *
+ */
 psSphereRot *psSphereRot_TEOtoCEO(
-    const psTime *time
+    const psTime *time                 ///<
 );
 
+/**
+ *
+ *
+ */
 psEarthPole *psEOC_GetPolarMotion(
-    const psTime *time,
-    psTimeBulletin bulletin
+    const psTime *time,                ///<
+    psTimeBulletin bulletin            ///<
 );
 
+/**
+ *
+ *
+ */
 psEarthPole *psEOC_PolarTideCorr(
-    const psTime *time
+    const psTime *time                 ///<
 );
 
+/**
+ *
+ *
+ *
+ */
 psEarthPole *psEOC_NutationCorr(
-    psTime *time
+    psTime *time                       ///<
 );
 
+/**
+ *
+ *
+ *
+ */
 psSphereRot *psSphereRot_ITRStoTEO(
-    const psEarthPole *motion
+    const psEarthPole *motion          ///<
 );
 
Index: /trunk/psLib/src/astro/psSphereOps.c
===================================================================
--- /trunk/psLib/src/astro/psSphereOps.c	(revision 5305)
+++ /trunk/psLib/src/astro/psSphereOps.c	(revision 5306)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-08-30 01:14:10 $
+ *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-10-13 20:23:57 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -153,8 +153,12 @@
 
     // following came from ADD
-    out->q0 = b3*a0 + b2*a1 - b1*a2 + b0*a3;
-    out->q1 = b3*a1 - b2*a0 + b1*a3 + b0*a2;
-    out->q2 = b3*a2 + b2*a3 + b1*a0 - b0*a1;
-    out->q3 = b3*a3 - b3*a2 - b1*a1 - b0*a0;
+    //    out->q0 = b3*a0 + b2*a1 - b1*a2 + b0*a3;
+    //    out->q1 = b3*a1 - b2*a0 + b1*a3 + b0*a2;
+    //    out->q2 = b3*a2 + b2*a3 + b1*a0 - b0*a1;
+    out->q0 = a3*b0 + a0*b3 + a1*b2 - a2*b1;
+    out->q1 = a3*b1 - a0*b2 + a1*b3 + a2*b0;
+    out->q2 = a3*b2 + a0*b1 - a1*b0 + a2*b3;
+
+    out->q3 = b3*a3 - b2*a2 - b1*a1 - b0*a0;
 
     return out;
Index: /trunk/psLib/src/astro/psSphereOps.h
===================================================================
--- /trunk/psLib/src/astro/psSphereOps.h	(revision 5305)
+++ /trunk/psLib/src/astro/psSphereOps.h	(revision 5306)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-08-31 22:28:35 $
+ *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-10-13 20:23:57 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -73,4 +73,46 @@
 );
 
+psSphereRot* psSphereRotAlloc2(
+    double alphaP,                      ///< north pole latitude
+    double deltaP,                      ///< north pole longitude
+    double phiP                         ///< defines the longitude in the input system of the equatorial intersection between the two systems (e.g, the first point of Ares).
+);
+
+psSphereRot* psSphereRotAlloc3(
+    double alphaP,                      ///< north pole latitude
+    double deltaP,                      ///< north pole longitude
+    double phiP                         ///< defines the longitude in the input system of the equatorial intersection between the two systems (e.g, the first point of Ares).
+);
+
+psSphereRot* psSphereRotAlloc4(
+    double alphaP,                      ///< north pole latitude
+    double deltaP,                      ///< north pole longitude
+    double phiP                         ///< defines the longitude in the input system of the equatorial intersection between the two systems (e.g, the first point of Ares).
+);
+
+psSphereRot* psSphereRotAlloc5(
+    double alphaP,                      ///< north pole latitude
+    double deltaP,                      ///< north pole longitude
+    double phiP                         ///< defines the longitude in the input system of the equatorial intersection between the two systems (e.g, the first point of Ares).
+);
+
+psSphereRot* psSphereRotAlloc6(
+    double alphaP,                      ///< north pole latitude
+    double deltaP,                      ///< north pole longitude
+    double phiP                         ///< defines the longitude in the input system of the equatorial intersection between the two systems (e.g, the first point of Ares).
+);
+
+psSphereRot* psSphereRotAlloc7(
+    double alphaP,                      ///< north pole latitude
+    double deltaP,                      ///< north pole longitude
+    double phiP                         ///< defines the longitude in the input system of the equatorial intersection between the two systems (e.g, the first point of Ares).
+);
+
+psSphereRot* psSphereRotAlloc8(
+    double alphaP,                      ///< north pole latitude
+    double deltaP,                      ///< north pole longitude
+    double phiP                         ///< defines the longitude in the input system of the equatorial intersection between the two systems (e.g, the first point of Ares).
+);
+
 
 /** Checks the type of a particular pointer.
Index: /trunk/psLib/test/astro/tst_psEarthOrientation.c
===================================================================
--- /trunk/psLib/test/astro/tst_psEarthOrientation.c	(revision 5305)
+++ /trunk/psLib/test/astro/tst_psEarthOrientation.c	(revision 5306)
@@ -1,3 +1,3 @@
-/** @file  tst_psCoord.c
+/** @file  tst_psEarthOrientation.c
 *
 *  @brief The code will go on ...
@@ -6,6 +6,6 @@
 *  @author d-Rob, MHPCC
 *
-*  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-10-07 21:27:50 $
+*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-10-13 20:23:57 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
Index: /trunk/psLib/test/astro/tst_psSphereOps.c
===================================================================
--- /trunk/psLib/test/astro/tst_psSphereOps.c	(revision 5305)
+++ /trunk/psLib/test/astro/tst_psSphereOps.c	(revision 5306)
@@ -6,6 +6,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-10-08 03:51:20 $
+*  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-10-13 20:23:57 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -48,7 +48,7 @@
 #define ERROR_TOL   0.0001
 
-#define ALPHA_P 0.5 * M_PI
-#define DELTA_P 1.0 * M_PI
-#define PHI_P 1.5 * M_PI
+#define ALPHA_P M_PI/6
+#define DELTA_P M_PI/4
+#define PHI_P M_PI/2
 
 psS32 testSphereRotAlloc( void )
@@ -62,21 +62,19 @@
         return 1;
     }
-    // Verify sin member is updated
-    double vx = cos(DELTA_P)*cos(ALPHA_P);
-    double vy = cos(DELTA_P)*sin(ALPHA_P);
-    double vz = sin(DELTA_P);
-    double q0 = vx * sin(PHI_P/2.0);
-    double q1 = vy * sin(PHI_P/2.0);
-    double q2 = vz * sin(PHI_P/2.0);
-    double q3 = cos(PHI_P/2.0);
-    double len = sqrt(q0*q0 + q1*q1 + q2*q2 + q3*q3);
-    printf("\nvz = %lf\n", vz);
-    q0 = q0/len;
-    q1 = q1/len;
-    q2 = q2/len;
-    q3 = q3/len;
-
+
+    double a0 = (ALPHA_P - PHI_P)/2.0;
+    double a1 = (ALPHA_P - PHI_P)/2.0;
+    double a2 = (ALPHA_P + PHI_P)/2.0;
+    double a3 = (ALPHA_P + PHI_P)/2.0;
+
+    double q3 = cos(a3)*cos(DELTA_P/2);
+    double q0 = sin(a0)*sin(DELTA_P/2);
+    double q1 = cos(a1)*sin(DELTA_P/2);
+    double q2 = sin(a2)*cos(DELTA_P/2);
+
+    printf("\n q0=%lf, q1=%lf, q2=%lf, q3=%lf,\n", q0, q1, q2, q3);
+    printf("myq0=%lf, myq1=%lf, myq2=%lf, myq3=%lf\n", myST->q0, myST->q1, myST->q2, myST->q3);
     if (FLT_EPSILON < fabs(q0 - myST->q0)) {
-        psError(PS_ERR_UNKNOWN,true,"myST->q0 is %f, should be %f\n", myST->q0, q0);
+        psError(PS_ERR_UNKNOWN,true,"myST->q0 is %lf, should be %lf\n", myST->q0, q0);
         return 2;
     }
Index: /trunk/psLib/test/astro/verified/tst_psSphereOps.stdout
===================================================================
--- /trunk/psLib/test/astro/verified/tst_psSphereOps.stdout	(revision 5305)
+++ /trunk/psLib/test/astro/verified/tst_psSphereOps.stdout	(revision 5306)
@@ -0,0 +1,3 @@
+
+ q0=-0.191342, q1=0.331414, q2=0.800103, q3=0.461940,
+myq0=-0.191342, myq1=0.331414, myq2=0.800103, myq3=0.461940
