Index: trunk/psLib/src/astronomy/psCoord.h
===================================================================
--- trunk/psLib/src/astronomy/psCoord.h	(revision 3540)
+++ trunk/psLib/src/astronomy/psCoord.h	(revision 3598)
@@ -10,6 +10,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-03-29 19:41:56 $
+*  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-03-31 23:01:46 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -344,8 +344,91 @@
 );
 
-psSphere *psSpherePrecess(psSphere *coords,
-                          const psTime *fromTime,
-                          const psTime *toTime);
-
+/** Generates the complete spherical rotation to account for precession
+ *  between two times.  The equinoxes shall be Julian equinoxes.
+ *
+ *  @return psSphere* the resulting spherical rotation
+ */
+psSphere* psSpherePrecess(
+    psSphere *coords,                  ///< coordinates (modified in-place)
+    const psTime *fromTime,            ///< equinox of coords input
+    const psTime *toTime               ///< equinox of coords output
+);
+
+// XXX: Doxygenate.
+psPlaneTransform *p_psPlaneTransformLinearInvert(
+    psPlaneTransform *transform
+);
+
+// XXX: Doxygenate
+psS32 p_psIsProjectionLinear(
+    psPlaneTransform *transform
+);
+
+/** inverts a given transformation.
+ *
+ *  It may assume that the input transformation is one-to-one, and that the
+ *  inverse transformation may be specified through using polynomials of the
+ *  same type and order as the forward transformation. In the event that the
+ *  input transformation is linear, an exact solution may be calculated;
+ *  otherwise nSamples samples in each axis, covering the region specified by
+ *  region shall be used as a grid to fit the best inverse transformation. The
+ *  function shall return NULL if it was unable to generate the inverse
+ *  transformation; otherwise it shall return the inverse transformation. In
+ *  the event that out is NULL, a new psPlaneTransform shall be allocated and
+ *  returned.
+ *
+ *  @return psPlaneTransform*  the resulting inverted transform
+ */
+psPlaneTransform* psPlaneTransformInvert(
+    psPlaneTransform *out,             ///< a transform to recycle, or NULL if one is to be created.
+    const psPlaneTransform *in,        ///< transform to invert
+    psRegion *region,                  ///< region to fit for non-linear transform inversion
+    int nSamples                       ///< number of samples in each axis for fit
+);
+
+/** Creates a single transformation that has the effect of performing trans1
+ *  followed by trans2.
+ *
+ *  psPlaneTransformCombine takes two transformations (trans1 and trans2) and
+ *  returns a single transformation that has the effect of performing trans1
+ *  followed by trans2. In the event that the input transformation is linear,
+ *  an exact solution may be calculated; otherwise nSamples samples in each
+ *  axis, covering the region specified by region shall be used as a grid to
+ *  fit the best inverse transformation. The function shall return NULL if it
+ *  was unable to generate the transformation; otherwise it shall return the
+ *  transformation.
+ *
+ *  @return psPlaneTransform*    resulting transformation
+ */
+psPlaneTransform* psPlaneTransformCombine(
+    psPlaneTransform *out,             ///< a transform to recycle, or NULL if one is to be created.
+    const psPlaneTransform *trans1,    ///< first transform to combine
+    const psPlaneTransform *trans2     ///< first transform to combine
+);
+
+
+/** takes two arrays containing matched coordinates and returns the
+ *  best-fitting transformation.
+ *
+ *  psPlaneTransformFit takes two arrays containing matched coordinates (i.e.,
+ *  coordinates in the source array correspond to the coordinates in the dest
+ *  array) and returns the best-fitting transformation. The source and dest
+ *  will contain psCoords. In the event that the number of coordinates in each
+ *  is not identical, the function shall generate a warning, and extra
+ *  coordinates in the longer of the two shall be ignored. The trans transform
+ *  may not be NULL, since it specifies the desired order, polynomial type and
+ *  any polynomial terms to mask. nRejIter rejection iterations shall be
+ *  performed, wherein coordinates lying more than sigmaClip standard
+ *  deviations from the fit shall be rejected.
+ *
+ *  @return bool        TRUE if successful, otherwise FALSE.
+ */
+bool psPlaneTransformFit(
+    psPlaneTransform *trans,
+    const psArray *source,
+    const psArray *dest,
+    int nRejIter,
+    float sigmaClip
+);
 
 /// @}
