Index: trunk/archive/pslib/include/psPosition.h
===================================================================
--- trunk/archive/pslib/include/psPosition.h	(revision 396)
+++ trunk/archive/pslib/include/psPosition.h	(revision 623)
@@ -9,20 +9,19 @@
 /** Structures *********************/
 
-/** A point in 2-D space, with errors.
- */
-typedef union {
-    struct {
-	double x;			///< x position
-	double y;			///< y position
-	double xErr;			///< Error in x position
-	double yErr;			///< Error in y position
-    } xy;
-    struct {
-	double r;			///< RA
-	double d;			///< Dec
-	double rErr;			///< Error in RA
-	double dErr;			///< Error in Dec
-    } rd;
-} psCoord;
+/** A point in 2-D space, with errors. */
+typedef struct {
+    double x;				///< x position
+    double y;				///< y position
+    double xErr;			///< Error in x position
+    double yErr;			///< Error in y position
+} psPlaneCoord;
+
+/** A point on the surface of a sphere, with errors */
+typedef struct {
+    double r;				///< RA
+    double d;				///< Dec
+    double rErr;			///< Error in RA
+    double dErr;			///< Error in Dec
+} psSphereCoord;
 
 /** A polynomial transformation between coordinate frames.  This may be a linear relationship, or may
@@ -32,5 +31,5 @@
     psDPolynomial2D *x;
     psDPolynomial2D *y;
-} psCoordXform;
+} psPlaneCoordXform;
 
 /** The optical distortion terms.  The lowest two terms are the x and y axis of the target system.  The higher
@@ -40,5 +39,5 @@
     psDPolynomial4D *x;
     psDPolynomial4D *y;
-} psDistortion;
+} psPlaneDistortion;
 
 /** Functions **************************************************************/
@@ -48,28 +47,28 @@
 
 /** apply the coordinate transformation to the given coordinate */
-psCoord *psCoordXformApply (psCoord *out, ///< Output coordinates, or NULL
-			    const psCoordXform *frame, ///< coordinate transformation
-			    const psCoord *coords ///< input coordiate
+psPlaneCoord *psPlaneCoordXformApply (psPlaneCoord *out, ///< Output coordinates, or NULL
+				      const psPlaneCoordXform *frame, ///< coordinate transformation
+				      const psPlaneCoord *coords ///< input coordiate
     );
 
 /** apply the optical distortion to the given coordinate, magnitude, color */
-psCoord *psDistortionApply (psCoord *out, ///< Output coordinates, or NULL
-			    const psDistortion *pattern, ///< optical distortion pattern
-			    const psCoord *coords, ///< input coordinate
-			    float mag,	///< magnitude of object
-			    float color ///< color of object
+psPlaneCoord *psPlaneDistortionApply (psPlaneCoord *out, ///< Output coordinates, or NULL
+				      const psPlaneDistortion *pattern, ///< optical distortion pattern
+				      const psPlaneCoord *coords, ///< input coordinate
+				      float mag, ///< magnitude of object
+				      float color ///< color of object
     );
 
 /** Get offset (RA,Dec) on the sky between two positions position1 and position2 may not be identical */
-psCoord *
-psGetOffset(const psCoord *restrict position1, ///< Position 1
-	    const psCoord *restrict position2, ///< Position 2
+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
     );
 
 /** Apply an offset to a position */
-psCoord *
-psApplyOffset(const psCoord *restrict position, ///< Position
-	      const psCoord *restrict offset, ///< Offset
+psSphereCoord *
+psApplyOffset(const psSphereCoord *restrict position, ///< Position
+	      const psSphereCoord *restrict offset, ///< Offset
 	      const char *type		///< Type of offset: Linear, Spherical/Arcsec, Spherical/Degreees etc
     );
@@ -78,10 +77,10 @@
 
 /** Get Sun Position */
-psCoord *
+psSphereCoord *
 psGetSunPos(float mjd			///< MJD to get position for
     );
 
 /** Get Moon position */
-psCoord *
+psSphereCoord *
 psGetMoonPos(float mjd,			///< MJD to get position for
 	     double latitude,		///< Latitude for apparent position
@@ -95,5 +94,5 @@
 
 /** Get Planet positions */
-psCoord *
+psSphereCoord *
 psGetSolarSystemPos(const char *solarSystemObject, ///< Named S.S. object
 		    float mjd		///< MJD to get position for
@@ -105,21 +104,21 @@
 
 /** Convert ICRS to Ecliptic */
-psCoord *
-psCoordinatesItoE(const psCoord *restrict coordinates ///< ICRS coordinates to convert
+psSphereCoord *
+psCoordinatesItoE(const psSphereCoord *restrict coordinates ///< ICRS coordinates to convert
     );
 
 /** Convert Ecliptic to ICRS */
-psCoord *
-psCoordinatesEtoI(const psCoord *restrict coordinates ///< Ecliptic coordinates to convert
+psSphereCoord *
+psCoordinatesEtoI(const psSphereCoord *restrict coordinates ///< Ecliptic coordinates to convert
     );
 
 /** Convert ICRS to Galactic */
-psCoord *
-psCoordinatesItoG(const psCoord *restrict coordinates ///< ICRS coordinates to convert
+psSphereCoord *
+psCoordinatesItoG(const psSphereCoord *restrict coordinates ///< ICRS coordinates to convert
     );
 
 /** Convert Galactic to ICRS */
-psCoord *
-psCoordinatesGtoI(const psCoord *restrict coordinates ///< Galactic coordinates to convert
+psSphereCoord *
+psCoordinatesGtoI(const psSphereCoord *restrict coordinates ///< Galactic coordinates to convert
     );
 
