Index: trunk/psLib/src/astronomy/psAstrometry.c
===================================================================
--- trunk/psLib/src/astronomy/psAstrometry.c	(revision 2001)
+++ trunk/psLib/src/astronomy/psAstrometry.c	(revision 2048)
@@ -8,6 +8,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-07 19:16:46 $
+ *  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-12 01:34:09 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -455,22 +455,26 @@
 psGrommit* psGrommitAlloc(const psExposure* exp)
 {
+    double* AOPRMS = psAlloc(sizeof(double)*14);
+
     if (exp == NULL) {
         psAbort(__func__, "the 'exp' parameter is NULL\n");
     }
 
-    double date = TBD;  // XXX: "mjd" in psExposure will become a psTime
-    // from which it will be possible to get UTC.
-    double dut = 0.0;
-    double elongm = TBD; // XXX
-    double phim = TBD;   // XXX
-    double hm = TBD;     // XXX
-    double xp = 0.0;
-    double yp = 0.0;
+    double date = psTimeToMJD(exp->time);
+    double dut = psTimeGetUT1Delta(exp->time);
+    double elongm = exp->observatory->longitude;
+    double phim = exp->observatory->latitude;
+    double hm = exp->observatory->height;
+
+    psSphere* polarMotion = psTimeGetPoleCoords(exp->time);
+    double xp = polarMotion->r;
+    double yp = polarMotion->d;
+    psFree(polarMotion);
+
     double tdk = exp->temperature;
     double pmb = exp->pressure;
     double rh = exp->humidity;
     double wl = exp->wavelength;
-    double tlr = TBD;    // XXX
-    double *AOPRMS = NULL;
+    double tlr = exp->observatory->tlr;
 
     slaAoppa(date, dut, elongm, phim, hm, xp, yp,
@@ -493,4 +497,6 @@
     *(double *)&grommit->siderealTime = AOPRMS[13];
 
+    psFree(AOPRMS);
+
     return (grommit);
 }
