Index: /trunk/archive/pslib/include/psPosition.h
===================================================================
--- /trunk/archive/pslib/include/psPosition.h	(revision 1588)
+++ /trunk/archive/pslib/include/psPosition.h	(revision 1589)
@@ -15,5 +15,4 @@
     PS_PROJ_AIT,                        ///< Aitoff projection
     PS_PROJ_PAR,                        ///< Par projection
-    PS_PROJ_GLS,                        ///< GLS projection
     PS_PROJ_NTYPE                       ///< Number of types; must be last
 } psProjectionType;
@@ -39,6 +38,6 @@
  */
 typedef struct {
-    psDPolynomial2D *x;
-    psDPolynomial2D *y;
+    psDPolynomial2D *x;			///< Transformation for x
+    psDPolynomial2D *y;			///< Transformation for y
 } psPlaneTransform;
 
@@ -47,6 +46,6 @@
  */
 typedef struct {
-    psDPolynomial4D *x;
-    psDPolynomial4D *y;
+    psDPolynomial4D *x;			///< Transformation for x
+    psDPolynomial4D *y;			///< Transformation for y
 } psPlaneDistort;
 
@@ -68,4 +67,16 @@
 } psProjection;
 
+typedef enum {
+    PS_SPHERICAL;			///< Offset on a sphere
+    PS_LINEAR;				///< Linear offset
+} psSphereOffsetMode;
+
+typedef enum {
+    PS_ARCSEC;				///< Arcseconds
+    PS_ARCMIN;				///< Arcminutes
+    PS_DEGREE;				///< Degrees
+    PS_RADIAN;				///< Radians
+} psSphereOffsetUnit;
+
 /** Functions **************************************************************/
 /** \addtogroup AstroGroup Astronomy-Specific Utilities
@@ -75,5 +86,5 @@
 /** apply the coordinate transformation to the given coordinate */
 psPlane *psPlaneTransformApply (psPlane *out, ///< Output coordinates, or NULL
-				const psPlaneTransform *frame, ///< coordinate transformation
+				const psPlaneTransform *transform, ///< coordinate transformation
 				const psPlane *coords) ///< input coordiate
 ;
@@ -81,5 +92,5 @@
 /** apply the optical distortion to the given coordinate, magnitude, color */
 psPlane *psPlaneDistortApply (psPlane *out, ///< Output coordinates, or NULL
-			      const psPlaneDistort *pattern, ///< optical distortion pattern
+			      const psPlaneDistort *distort, ///< optical distortion pattern
 			      const psPlane *coords, ///< input coordinate
 			      float mag, ///< magnitude of object
@@ -91,30 +102,27 @@
 /** Constructor */
 psSphereTransform *
-psSphereTransformAlloc(double pole1, ///< First location of pole
-		       double pole2, ///< Second location of pole
-		       double rotation) ///< Rotation between systems
-;
-
-/** Destructor */
-void psSphereTransformFree(psSphereTransform *trans) ///< Transform to destroy
+psSphereTransformAlloc(double NPlon, ///< Longitude in input system of north pole
+		       double NPlat, ///< Latitude in input system of north pole
+		       double ZP) ///< Zero point (e.g, the first point of Ares)
 ;
 
 /** Apply general spherical transformation */
 psSphere *
-psSphereTransformApply(const psSphere *coord, ///< Coordinates to convert
-		       const psSphereTransform *sys) ///< System to use to convert
+psSphereTransformApply(psSphere *out,	///< Position to output, or NULL
+		       const psSphereTransform *transform ///< transformation to use
+		       const psSphere *coord) ///< Coordinates to convert
 ;
 
 /** Return transformation structure to convert ICRS to Ecliptic */
-psSphereTransform *psSphereTransformItoE(void);
+psSphereTransform *psSphereTransformICRSToEcliptic(void);
 
 /** Return transformation structure to convert Ecliptic to ICRS */
-psSphereTransform *psSphereTransformEtoI(void);
+psSphereTransform *psSphereTransformEclipticToICRS(void);
 
 /** Return transformation structure to convert ICRS to Galactic */
-psSphereTransform *psSphereTransformItoG(void);
+psSphereTransform *psSphereTransformICRSToGalactic(void);
 
 /** Return transformation structure to convert Galactic to ICRS */
-psSphereTransform *psSphereTransformGtoI(void);
+psSphereTransform *psSphereTransformGalacticToICRS(void);
 
 /***********************************************************************************************************/
@@ -123,27 +131,31 @@
 /** Project spherical system onto a plane */
 psPlane *
-psCoordProject(const psSphere *coord, ///< Spherical coordinates to project
-	       const psProjection *projection)	///< Projection to use
+psProject(const psSphere *coord, ///< Spherical coordinates to project
+	  const psProjection *projection) ///< Projection to use
 ;
 
 /** Deproject plane onto spherical system */
 psSphere *
-psCoordDeproject(const psPlane *coord, ///< Plane coordinates to deproject
-		 const psProjection *projection)	///< Projection to use
+psDeproject(const psPlane *coord, ///< Plane coordinates to deproject
+	    const psProjection *projection) ///< Projection to use
 ;
 
 /** Get offset (RA,Dec) on the sky between two positions position1 and position2 may not be identical */
 psSphere *
-psSphereGetOffset(const psSphere *restrict position1, ///< Position 1
-		  const psSphere *restrict position2, ///< Position 2
-		  const char *type)	///< Type of offset: Spherical/Arcsec, Spherical/Degreees etc
+psSphereGetOffset(const psSphere *position1, ///< Position 1
+		  const psSphere *position2, ///< Position 2
+		  psSphereOffsetMode mode, ///< Mode of offset
+		  psSphereOffsetUnit unit ///< Units for offset
 ;
 
 /** Apply an offset to a position */
 psSphere *
-psSphereApplyOffset(const psSphere *restrict position, ///< Position
-		    const psSphere *restrict offset, ///< Offset
-		    const char *type)	///< Type of offset: Spherical/Arcsec, Spherical/Degreees etc
-;
+psSphereSetOffset(const psSphere *position, ///< Position
+		  const psSphere *offset, ///< Offset
+		  psSphereOffsetMode mode, ///< Mode of offset
+		  psSphereOffsetUnit unit ///< Units of offset
+    );
+
+/************************************************************************************************************/
 
 /* Positions of well-known objects */
