Index: trunk/psastro/src/pmAstromGrid.c
===================================================================
--- trunk/psastro/src/pmAstromGrid.c	(revision 5495)
+++ trunk/psastro/src/pmAstromGrid.c	(revision 5510)
@@ -47,5 +47,6 @@
 	st2r = pmAstromRotateObj (st2, center, angle);
 	newStat = pmAstromGridMatchAngle (st1, st2r, config);
-	newStat.angle = angle;
+	newStat.angle  = angle;
+	newStat.center = center;
 	if (newStat.minMetric < minStat.minMetric) {
 	    minStat = newStat;
@@ -147,6 +148,6 @@
 		    minMetric = metric;
 		    minVar    = var;
-		    minP      = i;
-		    minQ      = j;
+		    minX      = i;
+		    minY      = j;
 		}
 	    }
@@ -154,6 +155,6 @@
 
 	// convert the bin to delta-delta
-	matchStats.dX        = DP[minY][minX] / NP[minY][minX];
-	matchStats.dY        = DQ[minY][minX] / NP[minY][minX];
+	matchStats.offset.x  = DP[minY][minX] / NP[minY][minX];
+	matchStats.offset.y  = DQ[minY][minX] / NP[minY][minX];
 	matchStats.minMetric = minMetric;
 	matchStats.minVar    = minVar;
@@ -164,8 +165,8 @@
 
 // apply the measured FPA offset and rotation (stat) to the fpa astrom structures
-psFPA *pmAstromApplyGridMatch (psFPA *fpa, pmAstromGridMatchStat stat) {
+psFPA *pmAstromGridApply (psPlaneTransform *map, pmAstromGridMatchStat stat) {
 
-    // stat.angle modifies fpa.toTangentPlane (effective angle)
-    // stat.dP, stat.dQ modifies fpa.projection (Ro, Do)
+    // stat.angle, stat.center, stat.offse
+    // I think i need to know the center reference....
 
     return (fpa);
