Index: /trunk/psLib/src/astro/psCoord.c
===================================================================
--- /trunk/psLib/src/astro/psCoord.c	(revision 2940)
+++ /trunk/psLib/src/astro/psCoord.c	(revision 2941)
@@ -10,6 +10,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-01-08 00:13:07 $
+*  @version $Revision: 1.44 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-01-10 19:47:10 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -426,6 +426,13 @@
         proj.type = PS_PROJ_TAN;
 
+        printf("------------ position 1 is (%f, %f)\n", position1->r, position1->d);
+        printf("------------ position 2 is (%f, %f)\n", position2->r, position2->d);
+        lin = psProject(position1, &proj);
+        printf("------------ projected position 1 is (%f, %f)\n", lin->y, lin->x);
         lin = psProject(position2, &proj);
+        printf("------------ projected position 2 is (%f, %f)\n", lin->y, lin->x);
         tmp = psDeproject(lin, &proj);
+        printf("------------ deprojected position 2 is (%f, %f)\n", tmp->r, tmp->d);
+
         psFree(lin);
 
Index: /trunk/psLib/src/astronomy/psCoord.c
===================================================================
--- /trunk/psLib/src/astronomy/psCoord.c	(revision 2940)
+++ /trunk/psLib/src/astronomy/psCoord.c	(revision 2941)
@@ -10,6 +10,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-01-08 00:13:07 $
+*  @version $Revision: 1.44 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-01-10 19:47:10 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -426,6 +426,13 @@
         proj.type = PS_PROJ_TAN;
 
+        printf("------------ position 1 is (%f, %f)\n", position1->r, position1->d);
+        printf("------------ position 2 is (%f, %f)\n", position2->r, position2->d);
+        lin = psProject(position1, &proj);
+        printf("------------ projected position 1 is (%f, %f)\n", lin->y, lin->x);
         lin = psProject(position2, &proj);
+        printf("------------ projected position 2 is (%f, %f)\n", lin->y, lin->x);
         tmp = psDeproject(lin, &proj);
+        printf("------------ deprojected position 2 is (%f, %f)\n", tmp->r, tmp->d);
+
         psFree(lin);
 
Index: /trunk/psLib/src/dataManip/psConstants.h
===================================================================
--- /trunk/psLib/src/dataManip/psConstants.h	(revision 2940)
+++ /trunk/psLib/src/dataManip/psConstants.h	(revision 2941)
@@ -6,6 +6,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.52 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-01-03 21:58:52 $
+ *  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-01-10 19:47:11 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -35,4 +35,12 @@
 #define PS_1_PI 0.3183098861837906715377675267450287  /* 1/pi */
 #define PS_2_PI 0.6366197723675813430755350534900574  /* 2/pi */
+
+#define PS_COT(X) (1.0 / atan(X))
+#define DEG_TO_RAD(DEGREES) ((DEGREES) * M_PI / 180.0)
+#define MIN_TO_RAD(MINUTES) ((MINUTES) * M_PI / (180.0 * 60.0))
+#define SEC_TO_RAD(SECONDS) ((SECONDS) * M_PI / (180.0 * 60.0 * 60.0))
+#define RAD_TO_DEG(RADIANS) ((RADIANS) * 180.0 / M_PI)
+#define RAD_TO_MIN(RADIANS) ((RADIANS) * 180.0 * 60.0 / M_PI)
+#define RAD_TO_SEC(RADIANS) ((RADIANS) * 180.0 * 60.0 * 60.0 / M_PI)
 
 /*****************************************************************************
Index: /trunk/psLib/src/dataManip/psFunctions.c
===================================================================
--- /trunk/psLib/src/dataManip/psFunctions.c	(revision 2940)
+++ /trunk/psLib/src/dataManip/psFunctions.c	(revision 2941)
@@ -7,6 +7,6 @@
  *  polynomials.  It also contains a Gaussian functions.
  *
- *  @version $Revision: 1.78 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-12-29 22:15:51 $
+ *  @version $Revision: 1.79 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-01-10 19:47:11 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -1944,6 +1944,6 @@
     if (x < bins[0]) { \
         psLogMsg(__func__, PS_LOG_WARN, \
-                 "vectorBinDisect##TYPE(): ordinate %f is outside vector range (%f - %f).", \
-                 x, bins[0], bins[numBins-1]); \
+                 "vectorBinDisect%s(): ordinate %f is outside vector range (%f - %f).", \
+                 #TYPE, x, bins[0], bins[numBins-1]); \
         return(-2); \
     } \
@@ -1951,6 +1951,6 @@
     if (x > bins[numBins-1]) { \
         psLogMsg(__func__, PS_LOG_WARN, \
-                 "vectorBinDisect##TYPE(): ordinate %f is outside vector range (%f - %f).", \
-                 x, bins[0], bins[numBins-1]); \
+                 "vectorBinDisect%s(): ordinate %f is outside vector range (%f - %f).", \
+                 #TYPE, x, bins[0], bins[numBins-1]); \
         return(-1); \
     } \
Index: /trunk/psLib/src/math/psConstants.h
===================================================================
--- /trunk/psLib/src/math/psConstants.h	(revision 2940)
+++ /trunk/psLib/src/math/psConstants.h	(revision 2941)
@@ -6,6 +6,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.52 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-01-03 21:58:52 $
+ *  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-01-10 19:47:11 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -35,4 +35,12 @@
 #define PS_1_PI 0.3183098861837906715377675267450287  /* 1/pi */
 #define PS_2_PI 0.6366197723675813430755350534900574  /* 2/pi */
+
+#define PS_COT(X) (1.0 / atan(X))
+#define DEG_TO_RAD(DEGREES) ((DEGREES) * M_PI / 180.0)
+#define MIN_TO_RAD(MINUTES) ((MINUTES) * M_PI / (180.0 * 60.0))
+#define SEC_TO_RAD(SECONDS) ((SECONDS) * M_PI / (180.0 * 60.0 * 60.0))
+#define RAD_TO_DEG(RADIANS) ((RADIANS) * 180.0 / M_PI)
+#define RAD_TO_MIN(RADIANS) ((RADIANS) * 180.0 * 60.0 / M_PI)
+#define RAD_TO_SEC(RADIANS) ((RADIANS) * 180.0 * 60.0 * 60.0 / M_PI)
 
 /*****************************************************************************
Index: /trunk/psLib/src/math/psPolynomial.c
===================================================================
--- /trunk/psLib/src/math/psPolynomial.c	(revision 2940)
+++ /trunk/psLib/src/math/psPolynomial.c	(revision 2941)
@@ -7,6 +7,6 @@
  *  polynomials.  It also contains a Gaussian functions.
  *
- *  @version $Revision: 1.78 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-12-29 22:15:51 $
+ *  @version $Revision: 1.79 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-01-10 19:47:11 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -1944,6 +1944,6 @@
     if (x < bins[0]) { \
         psLogMsg(__func__, PS_LOG_WARN, \
-                 "vectorBinDisect##TYPE(): ordinate %f is outside vector range (%f - %f).", \
-                 x, bins[0], bins[numBins-1]); \
+                 "vectorBinDisect%s(): ordinate %f is outside vector range (%f - %f).", \
+                 #TYPE, x, bins[0], bins[numBins-1]); \
         return(-2); \
     } \
@@ -1951,6 +1951,6 @@
     if (x > bins[numBins-1]) { \
         psLogMsg(__func__, PS_LOG_WARN, \
-                 "vectorBinDisect##TYPE(): ordinate %f is outside vector range (%f - %f).", \
-                 x, bins[0], bins[numBins-1]); \
+                 "vectorBinDisect%s(): ordinate %f is outside vector range (%f - %f).", \
+                 #TYPE, x, bins[0], bins[numBins-1]); \
         return(-1); \
     } \
Index: /trunk/psLib/src/math/psSpline.c
===================================================================
--- /trunk/psLib/src/math/psSpline.c	(revision 2940)
+++ /trunk/psLib/src/math/psSpline.c	(revision 2941)
@@ -7,6 +7,6 @@
  *  polynomials.  It also contains a Gaussian functions.
  *
- *  @version $Revision: 1.78 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-12-29 22:15:51 $
+ *  @version $Revision: 1.79 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-01-10 19:47:11 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -1944,6 +1944,6 @@
     if (x < bins[0]) { \
         psLogMsg(__func__, PS_LOG_WARN, \
-                 "vectorBinDisect##TYPE(): ordinate %f is outside vector range (%f - %f).", \
-                 x, bins[0], bins[numBins-1]); \
+                 "vectorBinDisect%s(): ordinate %f is outside vector range (%f - %f).", \
+                 #TYPE, x, bins[0], bins[numBins-1]); \
         return(-2); \
     } \
@@ -1951,6 +1951,6 @@
     if (x > bins[numBins-1]) { \
         psLogMsg(__func__, PS_LOG_WARN, \
-                 "vectorBinDisect##TYPE(): ordinate %f is outside vector range (%f - %f).", \
-                 x, bins[0], bins[numBins-1]); \
+                 "vectorBinDisect%s(): ordinate %f is outside vector range (%f - %f).", \
+                 #TYPE, x, bins[0], bins[numBins-1]); \
         return(-1); \
     } \
