Index: trunk/archive/pslib/include/psPosition.h
===================================================================
--- trunk/archive/pslib/include/psPosition.h	(revision 623)
+++ trunk/archive/pslib/include/psPosition.h	(revision 626)
@@ -62,14 +62,16 @@
 /** Get offset (RA,Dec) on the sky between two positions position1 and position2 may not be identical */
 psSphereCoord *
-psGetOffset(const psSphereCoord *restrict position1, ///< Position 1
-	    const psSphereCoord *restrict position2, ///< Position 2
-	    const char *type		///< Type of offset: Linear, Spherical/Arcsec, Spherical/Degreees etc
+psSphereCoordGetOffset(const psSphereCoord *restrict position1, ///< Position 1
+		       const psSphereCoord *restrict position2, ///< Position 2
+		       const char *type		///< Type of offset: Linear, Spherical/Arcsec,
+						///< Spherical/Degreees etc
     );
 
 /** Apply an offset to a position */
 psSphereCoord *
-psApplyOffset(const psSphereCoord *restrict position, ///< Position
-	      const psSphereCoord *restrict offset, ///< Offset
-	      const char *type		///< Type of offset: Linear, Spherical/Arcsec, Spherical/Degreees etc
+psSphereCoordApplyOffset(const psSphereCoord *restrict position, ///< Position
+			 const psSphereCoord *restrict offset, ///< Offset
+			 const char *type		///< Type of offset: Linear, Spherical/Arcsec,
+							///< Spherical/Degreees etc
     );
 
@@ -103,25 +105,52 @@
 /* Celestial coordinate conversions */
 
-/** Convert ICRS to Ecliptic */
-psSphereCoord *
-psCoordinatesItoE(const psSphereCoord *restrict coordinates ///< ICRS coordinates to convert
+/** General spherical transformation */
+typedef struct {
+    double sin1, sin2, sin3, cos1, cos2, cos3; ///< Sines and cosines for transformation
+} psSphereCoordTransformation;
+
+/** Constructor */
+psSphereCoordTransformation *
+psSphereCoordTransformationAlloc(double pole1, ///< First location of pole
+				 double pole2, ///< Second location of pole
+				 double rotation ///< Rotation between systems
     );
 
-/** Convert Ecliptic to ICRS */
-psSphereCoord *
-psCoordinatesEtoI(const psSphereCoord *restrict coordinates ///< Ecliptic coordinates to convert
+/** Destructor */
+void psSphereCoordTranformationFree(psSphereCoordTransformation *trans ///< Transformation to destroy
     );
 
-/** Convert ICRS to Galactic */
+/** Apply general spherical transformation */
 psSphereCoord *
-psCoordinatesItoG(const psSphereCoord *restrict coordinates ///< ICRS coordinates to convert
+psSphereCoordTransform(const psSphereCoord *coord, ///< Coordinates to convert
+		       psSphereCoordSystem *sys	///< System to use to convert
     );
 
-/** Convert Galactic to ICRS */
-psSphereCoord *
-psCoordinatesGtoI(const psSphereCoord *restrict coordinates ///< Galactic coordinates to convert
+/** Return transformation structure to convert ICRS to Ecliptic */
+psSphereCoordTransformation *psSphereCoordTransformationItoE(void);
+
+/** Return transformation structure to convert Ecliptic to ICRS */
+psSphereCoordTransformation *psSphereCoordTransformationEtoI(void);
+
+/** Return transformation structure to convert ICRS to Galactic */
+psSphereCoordTransformation *psSphereCoordTransformationItoG(void);
+
+/** Return transformation structure to convert Galactic to ICRS */
+psSphereCoordTransformation *psSphereCoordTransformationGtoI(void);
+
+/***********************************************************************************************************/
+
+
+/** Project spherical system onto a plane */
+psPlaneCoord *
+psCoordProject(const psSphereCoord *coord, ///< Spherical coordinates to project
+	       const char *projection	///< Projection to use
     );
 
-/***********************************************************************************************************/
+/** Deproject plane onto spherical system */
+psSphereCoord *
+psCoordDeproject(const psPlaneCoord *coord, ///< Plane coordinates to deproject
+		 const char *projection	///< Projection to use
+    );
 
 /* \} */ // End of AstroGroup Functions
