Index: trunk/psLib/test/astro/tst_psEarthOrientation.c
===================================================================
--- trunk/psLib/test/astro/tst_psEarthOrientation.c	(revision 5450)
+++ trunk/psLib/test/astro/tst_psEarthOrientation.c	(revision 5455)
@@ -1,11 +1,10 @@
 /** @file  tst_psEarthOrientation.c
 *
-*  @brief The code will go on ...
-*
+*  @brief The code will perform earth orientation calculations and sphere rotations.
 *
 *  @author d-Rob, MHPCC
 *
-*  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-10-28 02:25:22 $
+*  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-11-02 01:07:25 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -43,21 +42,21 @@
 psS32 testAberration(void)
 {
-    psSphere *actual = NULL;
-    psSphere *apparent = psSphereAlloc();
+    psSphere *apparent = NULL;
+    psSphere *actual = psSphereAlloc();
     psSphere *direction = psSphereAlloc();
     psSphere *empty = NULL;
 
-    apparent->r = 0.2;
-    apparent->d = 0.2;
+    actual->r = 0.2;
+    actual->d = 0.2;
     direction->r = 0.2035;
     direction->d = 0.2035;
 
-    empty = psAberration(empty, actual, direction, 0.1);
+    empty = psAberration(empty, apparent, direction, 0.1);
     if (empty != NULL) {
         psError(PS_ERR_BAD_PARAMETER_NULL, false,
-                "psAberration failed to return NULL for NULL apparent input.\n");
+                "psAberration failed to return NULL for NULL actual input.\n");
         return 1;
     }
-    empty = psAberration(empty, apparent, actual, 0.1);
+    empty = psAberration(empty, actual, apparent, 0.1);
     if (empty != NULL) {
         psError(PS_ERR_BAD_PARAMETER_NULL, false,
@@ -66,9 +65,9 @@
     }
 
-    actual = psAberration(actual, apparent, direction, 0.4);
-    printf("\nactual = r,d  = %.8g, %.8g\n", actual->r, actual->d);
+    apparent = psAberration(apparent, actual, direction, 0.4);
+    printf("\napparent = r,d  = %.8g, %.8g\n", apparent->r, apparent->d);
 
+    psFree(apparent);
     psFree(actual);
-    psFree(apparent);
     psFree(direction);
 
@@ -79,6 +78,6 @@
 {
 
-    psSphere *actual = NULL;
-    psSphere *apparent = psSphereAlloc();
+    psSphere *actual = psSphereAlloc();
+    psSphere *apparent = NULL;
     psSphere *sun = psSphereAlloc();
     psSphere *empty = NULL;
@@ -86,14 +85,14 @@
     sun->r = 0.2;
     sun->d = 0.2;
-    apparent->r = 0.2035;
-    apparent->d = 0.2035;
+    actual->r = 0.2035;
+    actual->d = 0.2035;
 
-    empty = psGravityDeflection(empty, actual, sun);
+    empty = psGravityDeflection(apparent, empty, sun);
     if (empty != NULL) {
         psError(PS_ERR_BAD_PARAMETER_NULL, true,
-                "psGravityDeflection Failed to return NULL for NULL apparent input sphere.\n");
+                "psGravityDeflection Failed to return NULL for NULL actual input sphere.\n");
         return 1;
     }
-    empty = psGravityDeflection(empty, apparent, actual);
+    empty = psGravityDeflection(apparent, actual, empty);
     if (empty != NULL) {
         psError(PS_ERR_BAD_PARAMETER_NULL, true,
@@ -102,8 +101,8 @@
     }
 
-    actual = psGravityDeflection(actual, apparent, sun);
-    psSphere *result = psSphereSetOffset(apparent, actual, PS_SPHERICAL, PS_RADIAN);
-    printf("\nApparent r,d = %.13g,%.13g    Actual r,d = %.13g, %.13g \n",
-           apparent->r, apparent->d, result->r, result->d);
+    apparent = psGravityDeflection(apparent, actual, sun);
+    psSphere *result = psSphereSetOffset(actual, apparent, PS_SPHERICAL, PS_RADIAN);
+    printf("\nActual r,d = %.13g,%.13g    Apparent r,d = %.13g, %.13g \n",
+           actual->r, actual->d, result->r, result->d);
     psFree(result);
     psFree(actual);
